ie4=(document.all)?true:false;
ns4=(document.layers)?true:false;

function toExit(){
var args=toExit.arguments;
var visible=args[0];
if(ns4){
  theObj=eval("document.layers[\'"+args[1]+"\']");
  if(theObj)theObj.visibility=visible;
  }
else if(ie4){
  if(visible=='show')visible='visible';
  if(visible=='hide')visible='hidden';
  theObj=eval("document.all[\'"+args[1]+"\']");
  if(theObj)theObj.style.visibility=visible;
  }

}     

function initEcAd() {
document.all.AdLayer1.style.posTop = -50;
document.all.AdLayer1.style.visibility = 'visible'
document.all.AdLayer2.style.posTop = -50;
document.all.AdLayer2.style.visibility = 'visible'
MoveLeftLayer('AdLayer1');
MoveRightLayer('AdLayer2');
}
function MoveLeftLayer(layerName) {
var x = 10;
var y = 450;
var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.20;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = parseInt(y)");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLeftLayer('AdLayer1');", 20);
}
function MoveRightLayer(layerName) {
var x = 10;
var y = 450;
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("<div id=AdLayer1 style='position: absolute;visibility:hidden;z-index:1;background-color:#D8E5F0'><a href=http://www.51100.net/cxedu target=blank><img src=/Files/Ad/cxedubm.GIF border=0 alt=四川大学助学班正在报名></a><br><a href=javascript:toExit('hide','AdLayer1')><img src=/lw/img/close.jpg border=0 alt=关闭></a></div>"
 +"<div id=AdLayer2 style='position: absolute;visibility:hidden;z-index:1;background-color:#D8E5F0'><a href=/payhelp.asp target=blank><img src=/Files/Ad/4009.gif border=0 alt=网上银行支付常见问题解答></a><br><a href=javascript:toExit('hide','AdLayer2')><img src=/lw/img/close.jpg border=0 alt=关闭></a></div>");
initEcAd()
//插入动画代码：<embed src=http://www.tlbaby.com/images/4djs.swf quality=high pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash width=90 height=286></embed> -->
