﻿var imgWidth=1200;              
var imgHeight=194;             
var TimeOut=7000;              
var adNum=0;

document.write('<style type="text/css">');
document.write('#focuseFrom{width:'+(imgWidth)+'px;margin:0px;padding:0px;height:'+(imgHeight)+'px; overflow:hidden;border:none;}');
document.write('</style>');
document.write('<div id="focuseFrom">');


function changeimg(n)
{
adNum=n;
window.clearInterval(theTimer);
adNum=adNum-1;
nextAd();
}
function goUrl(){
window.open(imgLink[adNum],'_blank');
}

if (navigator.appName == "Netscape")
{
function nextAd(){
if(adNum<(imgUrl.length-1))adNum++;
else adNum=1;
theTimer=setTimeout("nextAd()", TimeOut);
document.images.imgInit.src=imgUrl[adNum];
document.getElementById('imgLink').href=imgLink[adNum];
}
document.write('<a id="imgLink" href="'+imgLink[1]+'" target=_blank><img src="'+imgUrl[1]+'" name="imgInit" width='+imgWidth+' height='+imgHeight+' border=1 class="imgClass"></a>')
document.write('</div>');
nextAd();
}

else
{
var count=0;
for (i=1;i<imgUrl.length;i++) {
if( (imgUrl[i]!="") && (imgLink[i]!="") ) {
count++;
} else {
break;
}
}
function playTran(){
if (document.all)
imgInit.filters.revealTrans.play();		
}
var key=0;
function nextAd(){
if(adNum<count)adNum++ ;
else adNum=1;
if( key==0 ){
key=1;
} else if (document.all){
imgInit.filters.revealTrans.Transition=23;
imgInit.filters.revealTrans.apply();
playTran();
}
document.images.imgInit.src=imgUrl[adNum];
	
theTimer=setTimeout("nextAd()", TimeOut);
}
document.write('<a target=_self href="javascript:goUrl();"><img style="FILTER: revealTrans(duration=1,transition=5);" src="javascript:nextAd();" width='+imgWidth+' height='+imgHeight+' border=0 vspace="0" name=imgInit class="imgClass"></a><br>');

document.write('</div>');
}
//IE结束