bver=navigator.appVersion.split(";");

function tipstart(){
	if(bver[1].match("5."))
		rv=window.showModalDialog("/tip/tip.htm",null,"dialogWidth:426px;dialogHeight:230px;center:1;scroll:0;help:0;status:0");
	else
		rv=window.showModalDialog("/tip/tip.htm",null,"dialogWidth:426px;dialogHeight:250px;center:1;scroll:0;help:0");
	nd= new Date();
	nd.setTime (nd.getTime()+(365*24*60*60*1000));
	cdomain = (location.domain) ? location.domain : null;
	cpath = (location.domain) ? location.pathname : null;
	if (rv!=0)
		SetCookie ("totdc", "true", nd, cpath, cdomain);
}

function tipinit(){
	if (document.all){
		var t=document.getElementById('InsertTip');
		if (GetCookie("totdc")!="true")
			tipstart()
		else
			t.insertAdjacentHTML('afterEnd','<div id="tipact" onclick="enable()" onmouseover="mover()" onmouseout="mout()"> News aktivieren ? </div>');
	}
}

function enable(){
	DeleteCookie("totdc");
	tipact.innerHTML="News sind aktiv !";
	setTimeout('tipact.style.visibility="hidden";tipstart()',1000);
}

function mover(){
	tipact.innerHTML="jetzt aktivieren !";
	tipact.style.backgroundColor="#FFFFFF";
	tipact.style.color="#0031CE";
	tipact.style.borderTop="#0026A0 solid 2px";
	tipact.style.borderLeft="#0026A0 solid 2px";
	tipact.style.borderRight="#698CFF solid 2px";
	tipact.style.borderBottom="#698CFF solid 2px";
}

function mout(){
	tipact.innerHTML="News aktivieren ?";
	tipact.style.backgroundColor="#0031CE";
	tipact.style.color="#FFFFFF";
	tipact.style.borderTop="#698CFF solid 2px";
	tipact.style.borderLeft="#698CFF solid 2px";
	tipact.style.borderRight="#0026A0 solid 2px";
	tipact.style.borderBottom="#0026A0 solid 2px";
}

//  Cookie Functions - Second Helping  (21-Jan-96)
//  Written by:  Bill Dortch, hIdaho Design <bdortch@netw.com>
//  The following functions are released to the public domain.

function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
		return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
	}
	return null;
}

function SetCookie (name, value) {
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 4) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain));
}

function DeleteCookie(name){
	exp=new Date();
	exp.setTime (exp.getTime() - 1);
	var cval = GetCookie ("name");
	document.cookie = name + "=" + cval +"; expires=" + exp.toGMTString();
}

