function ObjectAD() {
  /* Define Variables*/
  this.ADID        = 0;
  this.ADType      = 0;
  this.ADName      = "";
  this.ImgUrl      = "";
  this.ImgWidth    = 0;
  this.ImgHeight   = 0;
  this.FlashWmode  = 0;
  this.LinkUrl     = "";
  this.LinkTarget  = 0;
  this.LinkAlt     = "";
  this.Priority    = 0;
  this.CountView   = 0;
  this.CountClick  = 0;
  this.InstallDir  = "";
  this.ADDIR       = "";
}

function CodeZoneAD(_id) {
  /* Define Common Variables*/
  this.ID          = _id;
  this.ZoneID      = 0;

  /* Define Unique Variables*/

  /* Define Objects */
  this.AllAD       = new Array();
  this.ShowAD      = null;

  /* Define Functions */
  this.AddAD       = CodeZoneAD_AddAD;
  this.GetShowAD   = CodeZoneAD_GetShowAD;
  this.Show        = CodeZoneAD_Show;

}

function CodeZoneAD_AddAD(_AD) {
  this.AllAD[this.AllAD.length] = _AD;
}

function CodeZoneAD_GetShowAD() {
  if (this.ShowType > 1) {
    this.ShowAD = this.AllAD[0];
    return;
  }
  var num = this.AllAD.length;
  var sum = 0;
  for (var i = 0; i < num; i++) {
    sum = sum + this.AllAD[i].Priority;
  }
  if (sum <= 0) {return ;}
  var rndNum = Math.random() * sum;
  i = 0;
  j = 0;
  while (true) {
    j = j + this.AllAD[i].Priority;
    if (j >= rndNum) {break;}
    i++;
  }
  this.ShowAD = this.AllAD[i];
}

function CodeZoneAD_Show() {
  if (!this.AllAD) {
    return;
  } else {
    this.GetShowAD();
  }

  if (this.ShowAD == null) return false;
  document.write(this.ShowAD.ADIntro);
}

var ZoneAD_35 = new CodeZoneAD("ZoneAD_35");
ZoneAD_35.ZoneID      = 35;
ZoneAD_35.ZoneWidth   = 0;
ZoneAD_35.ZoneHeight  = 0;
ZoneAD_35.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 39;
objAD.ADType         = 4;
objAD.ADName         = "QQ浮动客服";
objAD.ImgUrl         = "";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<body>\n\r<script language=\"JavaScript\">\n\r var delta=0.15\n\r var collection;\n\r function floaters() {\n\r  this.items = [];\n\r  this.addItem = function(id,x,y,content)\n\r      {\n\r     document.write(\'<DIV id=\'+id+\' style=\"Z-INDEX: 10; POSITION: absolute;  width:80px; height:60px;left:\'+(typeof(x)==\'string\'?eval(x):x)+\';top:\'+(typeof(y)==\'string\'?eval(y):y)+\'\">\'+content+\'</DIV>\');\n\r     var newItem    = {};\n\r     newItem.object   = document.getElementById(id);\n\r     newItem.x    = x;\n\r     newItem.y    = y;\n\r     this.items[this.items.length]  = newItem;\n\r      }\n\r  this.play = function()\n\r      {\n\r     collection    = this.items\n\r     setInterval(\'play()\',10);\n\r      }\n\r}\n\r  function play()\n\r  {\n\r   for(var i=0;i<collection.length;i++)\n\r   {\n\r    var followObj  = collection[i].object;\n\r    var followObj_x  = (typeof(collection[i].x)==\'string\'?eval(collection[i].x):collection[i].x);\n\r    var followObj_y  = (typeof(collection[i].y)==\'string\'?eval(collection[i].y):collection[i].y);\n\r    if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {\n\r     var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;\n\r     dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));\n\r     followObj.style.left=followObj.offsetLeft+dx;\n\r     }\n\r    if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {\n\r     var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;\n\r     dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));\n\r     followObj.style.top=followObj.offsetTop+dy;\n\r     }\n\r    followObj.style.display = \'\';\n\r   }\n\r  }\n\r var theFloaters  = new floaters();\n\r theFloaters.addItem(\'followDiv1\',\'document.body.clientWidth-110\',100,\'<TABLE cellSpacing=0 cellPadding=0 width=110 border=0><TBODY><TR><TD width=110><IMG height=70 src=/sysmoder/webmodqq/img/kefu_up_20100810.gif width=110></TD></TR><TR><TD vAlign=center background=/sysmoder/webmodqq/img/kefu_middle_20100810.gif><TABLE cellSpacing=1 cellPadding=1 width=\"100%\" border=0><TBODY><TR><TD><DIV align=center>在线客服</DIV></TD></TR><TR><TD style=\"padding-left:15px;\"><img src=/sysmoder/webmodqq/img/QQonline_20100810.gif border=0 align=middle><a href=tencent://message/?uin=800085846&Site=www.dzyzw.com&Menu=yes  style=font-size:9pt><b>业务咨询01</b></a><br><img src=/sysmoder/webmodqq/img/QQonline2.gif border=0 align=middle><a href=tencent://message/?uin=800085846&Site=www.dzyzw.com&Menu=yes style=font-size:9pt><b>业务咨询02</b></a><br><img src=/sysmoder/webmodqq/img/QQonline2.gif border=0 align=middle><a href=tencent://message/?uin=800085846&Site=www.dzyzw.com&Menu=yes style=font-size:9pt><b>业务咨询03</b></a></TD></TR></TBODY></TABLE></TD></TR><TD width=110><IMG height=31 src=/sysmoder/webmodqq/img/kefu_down_20100810.gif width=110></TD></TR></TBODY></TABLE>\');\n\r theFloaters.play();\n\r</script>\n\r</body>";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 1;
objAD.CountView      = 0;
objAD.CountClick     = 0;
objAD.InstallDir     = "http://www.dzyzw.com/";
objAD.ADDIR          = "AD";
ZoneAD_35.AddAD(objAD);

ZoneAD_35.Show();
