// JavaScript Document

var preloadedimages=new Array();
for (i=1;i<bannerAD2.length;i++){
	preloadedimages[i]=new Image();
	preloadedimages[i].src=bannerAD2[i];
}

function setTransition(){
	if (document.all){
		bannerAD2rotator=document.getElementById("bannerAD2rotator");
		bannerAD2rotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
		bannerAD2rotator.filters.revealTrans.apply();
	}
}

function playTransition2(){
	if (document.all){
	bannerAD2rotator=document.getElementById("bannerAD2rotator");
	bannerAD2rotator.filters.revealTrans.play();}
}

function nextAd2(){
	if(adNum2<4)adNum2++ ;
	else adNum2=1;
	for(i=1;i<5;i++)
	{
		ss = "d"+i;
		if(i==adNum2)
		{
			if(document.getElementById(ss))
			{
				document.getElementById(ss).background="images/tpqh/d_0"+i+".gif";
			}			
		}else{
			if(document.getElementById(ss))
			{
				document.getElementById(ss).background="images/tpqh/c_0"+i+".gif";
			}
		}
	}
	//document.getElementById("web").innerHTML=bannerAD2text[adNum];
	 document.getElementById("web").href=bannerADlink2[adNum];
	setTransition();
	document.images.bannerAD2rotator.src=bannerAD2[adNum];
	playTransition2();
	theTimer=setTimeout("nextAd2()",6000);
}

function jump2url(){
	jumpUrl=bannerAD2link2[adNum];
	jumpTarget='';
	if (jumpUrl != ''){
		if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
		else location.href=jumpUrl;
	}
}

function displayStatusMsg() { 
	status=bannerAD2link2[adNum];
	document.returnValue = true;
}
function onMousover2(id)
{
	for(i=1;i<5;i++)
	{
		ss = "d"+i;
		if(i==id)
		{
			if(document.getElementById(ss))
			{
				document.getElementById(ss).background="images/tpqh/d_0"+i+".gif";
				
				
			}			
		}else{
			if(document.getElementById(ss))
			{
				document.getElementById(ss).background="images/tpqh/c_0"+i+".gif";
			}
		}
	}
	//document.getElementById("web").innerHTML=bannerAD2text[id];
	document.getElementById("web").href=bannerADlink2[id];
	setTransition();
	document.images.bannerAD2rotator.src=bannerAD2[id];
	playTransition2();
}
//-->
