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_40 = new CodeZoneAD("ZoneAD_40");
ZoneAD_40.ZoneID      = 40;
ZoneAD_40.ZoneWidth   = 0;
ZoneAD_40.ZoneHeight  = 0;
ZoneAD_40.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 63;
objAD.ADType         = 4;
objAD.ADName         = "一排QQ";
objAD.ImgUrl         = "";
objAD.InstallDir     = "/";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\">\n\r  <tr>\n\r    <td width=\"10\"> </td>\n\r    <td valign=\"middle\">一个电话改变你一生，<font color=\"#FF0000\">立即拨打</font>：020－34330086(上班时间), 020-39862039(夜间值班)，<a href=\"http://www.gz-benet.com.cn/gbook\" target=\"_blank\" title=\"QQ和右侧客服不在线，可点击此处报名\"><font color=\"#FF0000\">网上报名</font></a>  <a href=\"http://sighttp.qq.com/cgi-bin/check?sigkey=d5f41f16f88d957301c45d4388865218fcbec967820cd8257af7a66685694335\"; target=_blank; onClick=\"var tempSrc=\'http://sighttp.qq.com/wpa.js?rantime=\'+Math.random()+\'&sigkey=d5f41f16f88d957301c45d4388865218fcbec967820cd8257af7a66685694335\';var oldscript=document.getElementById(\'testJs\');var newscript=document.createElement(\'script\');newscript.setAttribute(\'type\',\'text/javascript\'); newscript.setAttribute(\'id\', \'testJs\');newscript.setAttribute(\'src\',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;\"><img border=\"0\" SRC=\'http://wpa.qq.com/pa?p=1:910800627:41\' alt=\"曾老师\"></a>  <a target=\"_blank\" href=\"http://wpa.qq.com/msgrd?v=1&uin=1220603624&site=qq&menu=yes\"><img border=\"0\" src=\"http://wpa.qq.com/pa?p=2:1220603624:41 &r=0.7690340701050456\" alt=\"兰老师\"></a> <a href=\"http://sighttp.qq.com/cgi-bin/check?sigkey=44acdaefa6da0a4d908186b39965779a20a49a62312f4c958710d07010aab6ed\"; target=_blank; onClick=\"var tempSrc=\'http://sighttp.qq.com/wpa.js?rantime=\'+Math.random()+\'&sigkey=44acdaefa6da0a4d908186b39965779a20a49a62312f4c958710d07010aab6ed\';var oldscript=document.getElementById(\'testJs\');var newscript=document.createElement(\'script\');newscript.setAttribute(\'type\',\'text/javascript\'); newscript.setAttribute(\'id\', \'testJs\');newscript.setAttribute(\'src\',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;\"><img border=\"0\" SRC=\'http://wpa.qq.com/pa?p=1:245784660:41\' alt=\"喻老师\"></a><a href=\"http://sighttp.qq.com/cgi-bin/check?sigkey=61d81a4766b05c3dfd43e9fbe5f6094019434eff24ec114aba47709ede9a70fd\"; target=_blank; onClick=\"var tempSrc=\'http://sighttp.qq.com/wpa.js?rantime=\'+Math.random()+\'&sigkey=61d81a4766b05c3dfd43e9fbe5f6094019434eff24ec114aba47709ede9a70fd\';var oldscript=document.getElementById(\'testJs\');var newscript=document.createElement(\'script\');newscript.setAttribute(\'type\',\'text/javascript\'); newscript.setAttribute(\'id\', \'testJs\');newscript.setAttribute(\'src\',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;\"><img border=\"0\" SRC=\'http://wpa.qq.com/pa?p=1:1037401109:41\' alt=\"王老师\"></a> <a href=\"http://sighttp.qq.com/cgi-bin/check?sigkey=ba06923291594d3197570e3c98d06ad20779a4133c6c003d681ab67dc1a332a8\"; target=_blank; onClick=\"var tempSrc=\'http://sighttp.qq.com/wpa.js?rantime=\'+Math.random()+\'&sigkey=ba06923291594d3197570e3c98d06ad20779a4133c6c003d681ab67dc1a332a8\';var oldscript=document.getElementById(\'testJs\');var newscript=document.createElement(\'script\');newscript.setAttribute(\'type\',\'text/javascript\'); newscript.setAttribute(\'id\', \'testJs\');newscript.setAttribute(\'src\',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;\"><img border=\"0\" SRC=\'http://wpa.qq.com/pa?p=1:597715328:41\' alt=\"贾老师\"></a></td>\n\r    <td width=\"2\"> </td>\n\r  </tr>\n\r</table>\n\r";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 1;
objAD.CountView      = 0;
objAD.CountClick     = 0;
objAD.ADDIR          = "qingniao";
ZoneAD_40.AddAD(objAD);

ZoneAD_40.Show();
