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_5 = new CodeZoneAD("ZoneAD_5");
ZoneAD_5.ZoneID      = 5;
ZoneAD_5.ZoneWidth   = 0;
ZoneAD_5.ZoneHeight  = 0;
ZoneAD_5.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 5;
objAD.ADType         = 4;
objAD.ADName         = "内容头部代码";
objAD.ImgUrl         = "";
objAD.InstallDir     = "/";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<TABLE height=70 cellSpacing=0 cellPadding=0 width=987 align=center border=0>\n\r  <TBODY>\n\r  <TR>\n\r    <TD width=247><A href=\"http://www.huiai.com.cn/\"><IMG \n\r      height=60 alt=\"\" src=\"/imgs2008/logo.gif\" width=239 border=0></A></TD>\n\r    <TD style=\"PADDING-BOTTOM: 10px\" vAlign=bottom align=right width=740>\n\r      <TABLE cellSpacing=0 cellPadding=0 width=724 border=0>\n\r        <TBODY>\n\r        <TR>\n\r          <TD align=right colSpan=2 style=\"padding:0 10px 0 0;\"><a id=\"StranLink\" style=\"color:#0000FF;\">繁體中文</a><script src=\"/js/gb_big5.js\" type=\"text/javascript\" language=\"JavaScript\"></script></a></TD></TR>\n\r        <TR>\n\r          <TD width=16><IMG height=30 alt=\"\" src=\"/imgs2008/index_05.gif\" \n\r            width=16></TD>\n\r          <TD background=/imgs2008/index_07.gif>\n\r            <TABLE \n\r            style=\"PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 6px\" \n\r            cellSpacing=0 cellPadding=0 width=\"100%\" border=0>\n\r              <TBODY>\n\r              <TR>\n\r                <TD class=menubg align=middle width=55><A style=\"FONT-WEIGHT: bold; FONT-SIZE: 14px\" href=\"http://www.huiai.com.cn/\">首页</A></TD>\n\r                <TD class=menubg align=middle width=85><A \n\r                  style=\"FONT-WEIGHT: bold; FONT-SIZE: 14px\" \n\r                  href=\"/about.html\">医院简介</A></TD>\n\r                <TD class=menubg align=middle width=85><A \n\r                  style=\"FONT-WEIGHT: bold; FONT-SIZE: 14px;\" \n\r                  href=\"/jiankangzhuhai/news/\">新闻资讯</A></TD>\n\r                <TD class=menubg align=middle width=55><A \n\r                  style=\"FONT-WEIGHT: bold; FONT-SIZE: 14px;\" \n\r                  href=\"/fuke2009/fuke/Index.html\">妇科</A></TD>\n\r                <TD class=menubg align=middle width=118><A \n\r                  style=\"FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #ff0000\" \n\r                  href=\"/fuke2009/jihuashengyu/Index.html\">无痛人流专科</A></TD>\n\r                <TD class=menubg align=middle width=55><A \n\r                  style=\"FONT-WEIGHT: bold; FONT-SIZE: 14px\" \n\r                  href=\"/nanke/\">男科</A></TD>\n\r                <TD class=menubg align=middle width=85><A \n\r                  style=\"FONT-WEIGHT: bold; FONT-SIZE: 14px\" \n\r                  href=\"/advanced_equipment.html\">先进设备</A></TD>\n\r                <TD class=menubg align=middle width=85><A \n\r                  style=\"FONT-WEIGHT: bold; FONT-SIZE: 14px\" \n\r                  href=\"/Boutique_Section.html\">精品科室</A></TD>\n\r                <TD class=menubg align=middle width=85><A \n\r                  style=\"FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #ff0000\" \n\r                  href=\"/online_registration.html\">在线挂号</A></TD>\n\r                <TD align=middle width=85><A \n\r                  style=\"FONT-WEIGHT: bold; FONT-SIZE: 14px\" \n\r                  href=\"/GuestBook/index.asp?KindID=1\">在线咨询</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>\n\r<table width=\"987\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\r  <tr>\n\r    <td align=\"right\" style=\"padding:0 10px 0 0;\">\n\r<strong style=\"color:#009900;\">绿色通道：</strong> <a href=\"/fuke2009/ylcs/index.html\" style=\"color:#FF0000;\"><<人流前注意事项</a> | <a href=\"/fuke2009/wtrl/index.html\" style=\"color:#009900;\">人流后注意事项>></a> <a href=\"/fuke2009/gjnl/index.html\">宫颈糜烂</a>  <a href=\"/fuke2009/zgjl/index.html\">子宫肌瘤</a> <a href=\"/fuke2009/lcnz/index.html\">卵巢囊肿</a> <a href=\"/fuke2009/nxby/index.html\">女性不孕</a> <a href=\"/fuke2009/yjjb/index.html\">月经疾病</a>  <a href=\"/fuke2009/bdyc/index.html\">白带异常</a>  <a href=\"/fuke2009/pqy/index.html\">盆腔炎</a> <a href=\"/fuke2009/ydy/index.html\">阴道炎</a></td>\n\r  </tr>\n\r</table>\n\r<TABLE cellSpacing=0 cellPadding=0 width=987 align=center border=0>\n\r  <TBODY>\n\r  <TR>\n\r    <TD background=\"/imgs2008/huiai2009.png\">\n\r      <OBJECT id=scriptmain \n\r      codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/\n\rflash/swflash.cab#version=6,0,29,0\" \n\r      height=187 width=987 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 \n\r      name=scriptmain>\n\r        <PARAM NAME=\"movie\" VALUE=\"/imgs2008/huiai2009.swf\"><PARAM NAME=\"quality\" VALUE=\"high\"><PARAM NAME=\"scale\" VALUE=\"noscale\"><PARAM NAME=\"LOOP\" VALUE=\"true\"><PARAM NAME=\"wmode\" VALUE=\"transparent\">\n\r        <embed src=\"/imgs2008/huiai2009.swf\" \n\r      width=\"987\" height=\"187\" loop=\"false\" quality=\"high\" \n\r      pluginspage=\"http://www.macromedia.com/go/getflashplayer\" \n\r      type=\"application/x-shockwave-flash\" salign=\"T\" name=\"scriptmain\" wmode=\"transparent\"></embed>  </OBJECT></TD></TR>\n\r  <TR>\n\r    <TD><IMG height=21 alt=\"\" src=\"/imgs2008/index_53.jpg\" width=259><IMG src=\"/imgs2008/index_54_a.jpg\" alt=\"\" name=\"imgHeadBar\" \n\r    width=728 height=21 \n\r      id=imgHeadBar></TD>\n\r  </TR></TBODY></TABLE>";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 1;
objAD.CountView      = 0;
objAD.CountClick     = 0;
objAD.ADDIR          = "AD";
ZoneAD_5.AddAD(objAD);

ZoneAD_5.Show();
