var ie=document.all;
var dom=document.getElementById && !document.all;
var bTipOn=false;
var opera, ie, dom = 0;
var oTgt=0;
var SLTyCookie1='';
var bLeaving=false;
var bLeft=false;
var oExitTimer=0;
var t_vCount=0;
var t_wCount=0;
var t_showD=100;
var t_showD2=2000;
var t_hideD=500;
var t_exitD=3000;
var t_bgTime=10000;
var t_bgFirstTime=5000;
if(navigator.userAgent.indexOf("Opera") != -1) opera = true;
else if(document.all && !opera) ie = true;
else if(!document.all && document.getElementById) dom = true;

	function addLoadEvent(func) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				if (oldonload) {
					oldonload();
				}
				func();
			}
		}
	}

	function tton(){
		return false;
	}

	function leaveon(){
		if(dom||ie){
			if(oTgt.showTimer) window.clearTimeout(oTgt.showTimer);
			if(oTgt.hideTimer) window.clearTimeout(oTgt.hideTimer);
			dswap('ds-nt');
			dswap('ds-w');
			dswap('ds-p');
			if (!t_vCount) { t_exitD = 8000; }
			oTgt.showTimer = window.setTimeout("delayedexit()",t_exitD);
			bLeaving=true;
			return false;
		} else {
			bLeaving=true;
			delayedexit();
			return false;
		}
	}

function ReadCookie(cookieName) {
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") return ""; 
 var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length; 
 return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

	function delayedexit()
	{
		var today = new Date();
 		var expire = new Date();
 		var nDays = 31;
 		bLeft=true;
		expire.setTime(today.getTime() + 3600000*24*nDays);

		document.cookie='SLTy_ref2=SLTyCommunity;PATH=/'+ ";expires="+expire.toGMTString();
		if (SLTyCookie1.length)
		{
			document.cookie='SLTy_ref1='+SLTyCookie1+';PATH=/'+ ";expires="+expire.toGMTString();
;
		}
		document.location.href="/SLTy/";
		return false;
	}
	function ttoff(){
		return;
	}

	function dreset()
	{
		return;
	}


	function dsetup(sTargId){
		if(ie||dom){
			oTgt=document.getElementById(sTargId);
			SLTyCookie1=ReadCookie('SLTy_ref1');
		}
	}

	function dswap(sSrcId){
		var oS=0;
		var oT=0;
		var o3=0;
		var sTargId;
		if (bLeaving && bLeft) dreset();
		if (bLeaving) return false;
		switch (sSrcId)
		{
			case 'ds-v': sTargId='ds-nt';break;
			case 'ds-nt': 
				sTargId='ds-v';t_vCount++;
				break;
			case 'ds-w': sTargId='ds-w';break;
			case 'ds-wert': sSrcId='ds-w'; sTargId='ds-wert';break; /* for reset */
			case 'ds-p': sTargId='ds-p';break;
		}
		if(ie||dom){
			oS=document.getElementById(sSrcId);
			oT=document.getElementById(sTargId);
//			window.defaultStatus = self.status='S, S vis: '+sSrcId+'='+oS.style.visibility+'.... T, T vis: '+sTargId+'='+oT.style.visibility;
			oT.style.visibility="visible";
			if (oS != oT) oS.style.visibility="hidden";
		}
	}

