function initEcAd() { document.all.AdLayer1.style.posTop = -200; document.all.AdLayer1.style.visibility = 'visible' document.all.AdLayer2.style.posTop = -200; document.all.AdLayer2.style.visibility = 'visible' MoveLeftLayer('AdLayer1'); MoveRightLayer('AdLayer2'); } function MoveLeftLayer(layerName) { var x = 300; var y = 40; var theimagewidth=90; var w=document.body.scrollWidth; x=(w-826)/2-theimagewidth; //在此调节左边位置 if(x<-theimagewidth+10)x=-theimagewidth+10; var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.40; var y = document.body.scrollTop + y - diff; eval("document.all." + layerName + ".style.posTop = y"); eval("document.all." + layerName + ".style.posLeft = x"); setTimeout("MoveLeftLayer('AdLayer1');", 20); } function MoveRightLayer(layerName) { var x = 5; var y = 40; var theimagewidth=90; var w=document.body.scrollWidth; x=(w-826)/2-theimagewidth; if(x<-theimagewidth+10)x=-theimagewidth+10; var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40; var y = document.body.scrollTop + y - diff; eval("document.all." + layerName + ".style.posTop = y"); eval("document.all." + layerName + ".style.posRight = x"); setTimeout("MoveRightLayer('AdLayer2');", 20); } //document.write("
") document.write("" //document.write("" +""); if(screen.Width >800)initEcAd()