adTime=10;  // seconds ad reminder is shown
chanceAd=1; // ad will be shown 1 in X times (put 1 for everytime)

var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
var calunit=ns? "" : "px"
adCount=0;
function mOver1(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.sub01.style');
	else if(ns)	adDiv=eval('document.layers["sub01"]');
	else if(w3)	adDiv=eval('document.getElementById("sub01").style');
	//randAd=Math.ceil(Math.random()*chanceAd);
        //if (ie||w3)
        //adDiv.visibility="visible";
        //else
        //adDiv.visibility ="show";
	showAd1();
	for (k = 0; k < document.forms.length; ++k) {
				for(j = 0; j< document.forms[k].length; ++j) { 
					var e = document.forms[k].elements[j]; 
					if(e.type == "select-one") {
						document.forms[k].elements[j].style.visibility = "hidden"
					}
				}
	}
}
function showAd1(){
	if (ie){documentWidth  =truebody().offsetWidth/2-153;
	documentHeight = 344}	
	else if (ns){documentWidth=window.innerWidth/2-143;
	documentHeight=344} 
	else if (w3){documentWidth=self.innerWidth/2-143;
	documentHeight=344} 
	

	adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
	if (ie||w3)
    adDiv.visibility="visible";
    else
    adDiv.visibility ="show";
	//setTimeout("showAd1()",1000);}
	//else closeAd();
}
function mOut1(){
	if(!ns && !ie && !w3) return;
		if(ie)		adDiv=eval('document.all.sub01.style');
		else if(ns)	adDiv=eval('document.layers["sub01"]');
		else if(w3)	adDiv=eval('document.getElementById("sub01").style');
	if (ie||w3)
	adDiv.visibility="hidden";
	else
	adDiv.visibility ="hide";
	
	for (k = 0; k < document.forms.length; ++k) {
				for(j = 0; j< document.forms[k].length; ++j) { 
					var e = document.forms[k].elements[j]; 
					if(e.type == "select-one") {
						document.forms[k].elements[j].style.visibility = "visible"
					}
				}
	}
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function mOver2(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.sub02.style');
	else if(ns)	adDiv=eval('document.layers["sub02"]');
	else if(w3)	adDiv=eval('document.getElementById("sub02").style');
	//randAd=Math.ceil(Math.random()*chanceAd);
        
	showAd2();
	for (k = 0; k < document.forms.length; ++k) {
				for(j = 0; j< document.forms[k].length; ++j) { 
					var e = document.forms[k].elements[j]; 
					if(e.type == "select-one") {
						document.forms[k].elements[j].style.visibility = "hidden"
					}
				}
	}
}
function showAd2(){
	if (ie){documentWidth  =truebody().offsetWidth/2-76;
	documentHeight = 344}	
	else if (ns){documentWidth=window.innerWidth/2-66;
	documentHeight=344} 
	else if (w3){documentWidth=self.innerWidth/2-66;
	documentHeight=344} 
		
	adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
	
	if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	//setTimeout("showAd2()",1000);}
	//else closeAd();
}
function mOut2(){
if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.sub02.style');
	else if(ns)	adDiv=eval('document.layers["sub02"]');
	else if(w3)	adDiv=eval('document.getElementById("sub02").style');
if (ie||w3)
adDiv.visibility="hidden";
else
adDiv.visibility ="hide";
for (k = 0; k < document.forms.length; ++k) {
				for(j = 0; j< document.forms[k].length; ++j) { 
					var e = document.forms[k].elements[j]; 
					if(e.type == "select-one") {
						document.forms[k].elements[j].style.visibility = "visible"
					}
				}
	}
}

function mOver3(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.sub03.style');
	else if(ns)	adDiv=eval('document.layers["sub03"]');
	else if(w3)	adDiv=eval('document.getElementById("sub03").style');
	//randAd=Math.ceil(Math.random()*chanceAd);
        
	showAd3();
	for (k = 0; k < document.forms.length; ++k) {
				for(j = 0; j< document.forms[k].length; ++j) { 
					var e = document.forms[k].elements[j]; 
					if(e.type == "select-one") {
						document.forms[k].elements[j].style.visibility = "hidden"
					}
				}
	}
}
function showAd3(){
	if (ie){documentWidth  =truebody().offsetWidth/2+2;
	documentHeight = 344}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset+12;
	documentHeight=344;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset+12;
	documentHeight=344;} 
	adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
	if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	//setTimeout("showAd3()",1000);}
	//else closeAd();
}
function mOut3(){
if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.sub03.style');
	else if(ns)	adDiv=eval('document.layers["sub03"]');
	else if(w3)	adDiv=eval('document.getElementById("sub03").style');
if (ie||w3)
adDiv.visibility="hidden";
else
adDiv.visibility ="hide";
for (k = 0; k < document.forms.length; ++k) {
				for(j = 0; j< document.forms[k].length; ++j) { 
					var e = document.forms[k].elements[j]; 
					if(e.type == "select-one") {
						document.forms[k].elements[j].style.visibility = "visible"
					}
				}
	}
}

function mOver4(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.sub04.style');
	else if(ns)	adDiv=eval('document.layers["sub04"]');
	else if(w3)	adDiv=eval('document.getElementById("sub04").style');
	//randAd=Math.ceil(Math.random()*chanceAd);
        
	showAd4();
	for (k = 0; k < document.forms.length; ++k) {
				for(j = 0; j< document.forms[k].length; ++j) { 
					var e = document.forms[k].elements[j]; 
					if(e.type == "select-one") {
						document.forms[k].elements[j].style.visibility = "hidden"
					}
				}
	}
}
function showAd4(){
	if (ie){documentWidth  =truebody().offsetWidth/2+81;
	documentHeight = 344}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset+91;
	documentHeight=344;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset+91;
	documentHeight=344;} 
	adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
	if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	//setTimeout("showAd4()",1000);}
	//else closeAd();
}
function mOut4(){
if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.sub04.style');
	else if(ns)	adDiv=eval('document.layers["sub04"]');
	else if(w3)	adDiv=eval('document.getElementById("sub04").style');
if (ie||w3)
adDiv.visibility="hidden";
else
adDiv.visibility ="hide";
for (k = 0; k < document.forms.length; ++k) {
				for(j = 0; j< document.forms[k].length; ++j) { 
					var e = document.forms[k].elements[j]; 
					if(e.type == "select-one") {
						document.forms[k].elements[j].style.visibility = "visible"
					}
				}
	}
}