timePopup=15;
var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
adCount=0;
adCount1=0;
adCount2=0;
adCount3=0;


function initPopup(){
	if(!ns && !ie && !w3) return;
	if(ie) adDiv=eval('document.all.lbplocation.style');
	else if(ns) adDiv=eval('document.layers["lbplocation"]');
	else if(w3) adDiv=eval('document.getElementById("lbplocation").style');
	if (ie||w3) adDiv.visibility="visible";
	else adDiv.visibility ="show";
	showPopup();
}
function initPopup1(){
	if(!ns && !ie && !w3) return;
	if(ie) adDiv1=eval('document.all.lbplocation1.style');
	else if(ns) adDiv1=eval('document.layers["lbplocation1"]');
	else if(w3) adDiv1=eval('document.getElementById("lbplocation1").style');
	if (ie||w3) adDiv1.visibility="visible";
	else adDiv1.visibility ="show";
	showPopup1();
}
function initPopup2(){
	if(!ns && !ie && !w3) return;
	if(ie) adDiv2=eval('document.all.lbplocation2.style');
	else if(ns) adDiv2=eval('document.layers["lbplocation2"]');
	else if(w3) adDiv2=eval('document.getElementById("lbplocation2").style');
	if (ie||w3) adDiv2.visibility="visible";
	else adDiv1.visibility ="show";
	showPopup2();
}
function initPopup3(){
	if(!ns && !ie && !w3) return;
	if(ie) adDiv3=eval('document.all.lbplocation3.style');
	else if(ns) adDiv3=eval('document.layers["lbplocation3"]');
	else if(w3) adDiv3=eval('document.getElementById("lbplocation3").style');
	if (ie||w3) adDiv3.visibility="visible";
	else adDiv1.visibility ="show";
	showPopup3();
}

function showPopup(){
	if(adCount<timePopup){
		adCount+=1;
		if (ie){
			documentWidth  =document.body.offsetWidth/2+document.body.scrollLeft-20;
			documentHeight =document.body.offsetHeight/2+document.body.scrollTop-20;
		} 
		else if (ns){
			documentWidth=window.innerWidth/2+window.pageXOffset-20;
			documentHeight=window.innerHeight/2+window.pageYOffset-20;
		} 
		else if (w3){
			documentWidth=self.innerWidth/2+window.pageXOffset-20;
			documentHeight=self.innerHeight/2+window.pageYOffset-20;
		} 
		adDiv.left=documentWidth-250;
		adDiv.top =documentHeight-150;
		
		setTimeout("showPopup()",1000);
	}
	else closePopup();
}

function showPopup1(){
	if(adCount1<timePopup){
		adCount1+=1;
		if (ie){
			documentWidth  =document.body.offsetWidth/2+document.body.scrollLeft-20;
			documentHeight =document.body.offsetHeight/2+document.body.scrollTop-20;
		} 
		else if (ns){
			documentWidth=window.innerWidth/2+window.pageXOffset-20;
			documentHeight=window.innerHeight/2+window.pageYOffset-20;
		} 
		else if (w3){
			documentWidth=self.innerWidth/2+window.pageXOffset-20;
			documentHeight=self.innerHeight/2+window.pageYOffset-20;
		} 
		adDiv1.left=documentWidth-250;
		adDiv1.top =documentHeight-150;
		
		setTimeout("showPopup1()",1000);
	}
	else closePopup1();
}
function showPopup2(){
	if(adCount2<timePopup){
		adCount2+=1;
		if (ie){
			documentWidth  =document.body.offsetWidth/2+document.body.scrollLeft-20;
			documentHeight =document.body.offsetHeight/2+document.body.scrollTop-20;
		} 
		else if (ns){
			documentWidth=window.innerWidth/2+window.pageXOffset-20;
			documentHeight=window.innerHeight/2+window.pageYOffset-20;
		} 
		else if (w3){
			documentWidth=self.innerWidth/2+window.pageXOffset-20;
			documentHeight=self.innerHeight/2+window.pageYOffset-20;
		} 
		adDiv2.left=documentWidth-250;
		adDiv2.top =documentHeight-150;
		
		setTimeout("showPopup2()",1000);
	}
	else closePopup2();
}
function showPopup3(){
	if(adCount3<timePopup){
		adCount3+=1;
		if (ie){
			documentWidth  =document.body.offsetWidth/2+document.body.scrollLeft-20;
			documentHeight =document.body.offsetHeight/2+document.body.scrollTop-20;
		} 
		else if (ns){
			documentWidth=window.innerWidth/2+window.pageXOffset-20;
			documentHeight=window.innerHeight/2+window.pageYOffset-20;
		} 
		else if (w3){
			documentWidth=self.innerWidth/2+window.pageXOffset-20;
			documentHeight=self.innerHeight/2+window.pageYOffset-20;
		} 
		adDiv3.left=documentWidth-250;
		adDiv3.top =documentHeight-150;
		
		setTimeout("showPopup3()",1000);
	}
	else closePopup3();
}

function closePopup(){
	if (ie||w3) adDiv.display="none"; 
	else adDiv.visibility ="hide";
}

function closePopup1(){
	if (ie||w3) adDiv1.display="none"; 
	else adDiv1.visibility ="hide";
}


function closePopup2(){
	if (ie||w3) adDiv2.display="none"; 
	else adDiv2.visibility ="hide";
}

function closePopup3(){
	if (ie||w3) adDiv3.display="none"; 
	else adDiv3.visibility ="hide";
}
