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_14 = new CodeZoneAD("ZoneAD_14");
ZoneAD_14.ZoneID      = 14;
ZoneAD_14.ZoneWidth   = 0;
ZoneAD_14.ZoneHeight  = 0;
ZoneAD_14.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 14;
objAD.ADType         = 4;
objAD.ADName         = "网站顶部导航";
objAD.ImgUrl         = "";
objAD.InstallDir     = "/";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<div align=center>\n\r<CENTER>\n\r  <table style=\"COLOR: #000000\" border=0 cellSpacing=0 cellPadding=0 width=980 height=60>\n\r    <tr>\n\r      <td bgColor=#ffffff height=60 vAlign=center rowSpan=3 width=150 align=middle><IMG border=0 align=middle src=\"{$InstallDir}images/logo.gif\" width=150 height=60></td>\n\r      <td style=\"FONT-SIZE: 14pt\" bgColor=#ffffff height=20 align=middle><FONT size=4><SPAN class=style1><FONT color=#000000>|</FONT></SPAN><A class=Top href=\"{$InstallDir}\" target=_parent>网站首页</A><FONT color=#000000><SPAN class=style1>|</SPAN><A class=Top href=\"{$InstallDir}Article/\" target=_parent>走进资中</A><SPAN class=style1>|</SPAN><A class=Top href=\"{$InstallDir}AA/\" target=_parent>资讯速递</A><SPAN class=style1>|<A class=Top href=\"{$InstallDir}AB\" target=_parent>为您服务</A>|<A class=Top href=\"{$InstallDir}AE\" target=_parent>人才招聘</A>|<A class=Top href=\"{$InstallDir}AK\" target=_parent>电脑网络</A>|</SPAN></FONT><SPAN class=style1></SPAN><A class=Top href=\"{$InstallDir}AQ\" target=_parent>休闲娱乐</A><SPAN class=style1>|</SPAN></FONT></td>\n\r      <td style=\"COLOR: #000000\" bgColor=#ffffff height=40 rowSpan=2 width=40 align=middle>\n\r      <P align=center><a href=\"%3ca%20name=StranLink%20href=\'\'%3e繁體中文%3c/a%3e%3cscript%20language=%22javascript%22%20src=%22js/gb_big5.js%22%3e%3c/script%3e\">简繁<br>\n\r      转换</a></P></td>\n\r      <td style=\"COLOR: #000000\" bgColor=#ffffff height=40 rowSpan=2 align=middle>\n\r      250×60广告位虚位以待　</td>\n\r    </tr>\n\r    <tr>\n\r      <td style=\"FONT-SIZE: 14pt\" bgColor=#ffffff height=20 align=middle><FONT size=4><SPAN class=style1>|</SPAN><A class=Top href=\"{$InstallDir}AG\" target=_parent>健康之友</A><SPAN class=style1>|</SPAN><A class=Top href=\"{$InstallDir}AJ\" target=_parent>精选文章</A><SPAN class=style1>|</SPAN><A class=Top href=\"{$InstallDir}AH\" target=_parent>美食广场</A><SPAN class=style1>|<A class=Top href=\"{$InstallDir}AO\" target=_parent>影视看台</A>|</SPAN><A class=Top href=\"{$InstallDir}AF\" target=_parent>幽默笑话</A><SPAN class=style1>|<A class=Top href=\"{$InstallDir}AN\" target=_parent>祝福短信</A>|<A class=Top href=\"{$InstallDir}photo\" target=_parent>图形图像</A>|</SPAN></FONT></td>\n\r    </tr>\n\r    <tr>\n\r      <td bgColor=#ffffff height=20 align=middle><SPAN class=style1>\n\r<div align=center>\n\r        <table border=1 cellSpacing=0 cellPadding=0 width=\"100%\">\n\r          <tr>\n\r            <td width=\"12%\" align=middle>\n\r            <P align=center><FONT size=1>100×20文字广告</FONT></P></td><FONT size=2>\n\r            <td width=\"12%\" align=middle><SPAN class=style1><FONT size=1>100×20文字广告</FONT></SPAN></td>\n\r            <td width=\"12%\" align=middle><SPAN class=style1><FONT size=1>100×20文字广告</FONT></SPAN></td>\n\r            <td width=\"12%\" align=middle><SPAN class=style1><FONT size=1>100×20文字广告</FONT></SPAN></td>\n\r            <td width=\"13%\" align=middle><SPAN class=style1><FONT size=1>100×20文字广告</FONT></SPAN></td>\n\r            <td width=\"13%\" align=middle><SPAN class=style1><FONT size=1>100×20文字广告</FONT></SPAN></td>\n\r            <td width=\"13%\" align=middle><SPAN class=style1><FONT size=1>100×20文字广告</FONT></SPAN></td>\n\r          </tr>\n\r        </table>\n\r      </div></FONT></SPAN></td>\n\r    </tr>\n\r  </table>\n\r  <table border=0 cellSpacing=0 cellPadding=0 width=980 align=center>\n\r    <tr>\n\r      <td>\n\r<HR color=#ff0000 SIZE=1>\n\r      </td>\n\r        <tr>\n\r          <td class=top_nav_menu>\n\r          <script language=\"JavaScript1.2\" type=\"text/JavaScript\" src=\"{$InstallDir}{$ChannelDir}/JS/ShowClass_Menu.js\"></script></td>\n\r        </tr>\n\r</CENTER>\n\r      </table>\n\r</div>";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 1;
objAD.CountView      = 0;
objAD.CountClick     = 0;
objAD.ADDIR          = "AD";
ZoneAD_14.AddAD(objAD);

ZoneAD_14.Show();

