function initEcAd() {
document.all.AdLayer1.style.posTop = -0;
document.all.AdLayer1.style.visibility = 'visible'

MoveRightLayer('AdLayer1');
}

function MoveRightLayer(layerName) {
var x =0;
var y =25;// 右侧广告距离页首高度
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.posRight = x");
setTimeout("MoveRightLayer('AdLayer1');", 20);

}

function divdrag(obj,_Id)
 {
  var s = document.getElementById(_Id).style
  var b = document.body
  var x = event.clientX + b.scrollLeft - s.pixelLeft
  var y = event.clientY + b.scrollTop - s.pixelTop
     if(s.position == "")
     {
         s.position = "absolute"
     }
  var m = function()
  {
   if (event.button == 1)
   {
    s.pixelLeft = event.clientX + b.scrollLeft - x
    s.pixelTop = event.clientY + b.scrollTop - y
   }
   else document.detachEvent("onmousemove", m)
  }
  document.attachEvent("onmousemove", m)

        /*
  if (!this.z) this.z = 999
  s.zIndex = ++this.z*/
  
  event.cancelBubble = true
 }
 
document.writeln("<div id=AdLayer1 style=\"position: absolute;visibility:hidden;width: 81px;height: 195px; z-index:20\">");
document.writeln("<div id=\"panel\" style=\"left: 0px; top: 0px; position: absolute;border:0px;\">");
document.writeln("<div onMouseDown=\"divdrag(this,\'panel\')\" style=\"height:20PX;\"><span onClick=\"panel.style.display=\'none\';\" style=\"float: right; display: inline;cursor: hand; color: #ADC7DE;\">×<\/span><\/div>");
document.writeln("<div><IFRAME WIDTH=\"82\" height=\"195\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" HSPACE=\"0\" VSPACE=\"0\" FRAMEBORDER=\"0\" SCROLLING=\"no\" SRC=\"\/Right_Move\/Right_Move_Inc.asp\" allowTransparency=\"true\"><\/IFRAME><\/div>");
document.writeln("<\/div>");
document.writeln("<\/div>");

initEcAd()// JavaScript Document