


function $(id){return document.getElementById(id)}
//对联式的广告
function initEcAd() {
$("AdLayer1").style.posTop = -300;
$("AdLayer1").style.visibility = 'visible'
$("AdLayer2").style.posTop = -300;
$("AdLayer2").style.visibility = 'visible'
MoveLeftLayer("AdLayer1");
MoveRightLayer("AdLayer2");
}
function MoveLeftLayer(layerName) {
var x = 5;
var y = 100;// 左侧广告距离页首高度
var diff = (document.body.scrollTop + y - $("AdLayer1").style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
$(layerName).style.posTop = parseInt(y+10);
$(layerName).style.posLeft = x;
setTimeout("MoveLeftLayer('AdLayer1');", 200);
}
function MoveRightLayer(layerName) {
var x = 5;
var y = 100;// 右侧广告距离页首高度
var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
$(layerName).style.posTop = parseInt(y+10);
$(layerName).style.posRight = x;
setTimeout("MoveRightLayer('AdLayer2');", 200);
}
initEcAd();


