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_4 = new CodeZoneAD("ZoneAD_4");
ZoneAD_4.ZoneID      = 4;
ZoneAD_4.ZoneWidth   = 0;
ZoneAD_4.ZoneHeight  = 0;
ZoneAD_4.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 4;
objAD.ADType         = 4;
objAD.ADName         = "左边代码";
objAD.ImgUrl         = "";
objAD.InstallDir     = "/";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<style type=\"text/css\">\n\r<!--\n\r.STYLE1 {color: #FF0000}\n\r.STYLE2 {color: #009900}\n\r-->\n\r</style>\n\r<TABLE cellSpacing=0 cellPadding=0 width=100 border=0>\n\r        <TBODY>\n\r        <TR>\n\r          <TD height=10></TD></TR></TBODY></TABLE>\n\r      <TABLE cellSpacing=0 cellPadding=0 width=259 border=0>\n\r        <TBODY>\n\r        <TR>\n\r          <TD>\n\r		  <FORM name=search action=/search.asp method=\"get\">\n\r<Input id=Keyword maxLength=50 value=\"\" name=\"Keyword\"> \n\r<Input id=Submit type=submit value=·搜索· name=Submit>\n\r<Input id=Field type=hidden value=Article name=ModuleName>\n\r<Input id=Field type=hidden value=Title name=Field>\n\r</FORM><IMG src=\"/imgs2008/index_sw_01.gif\">\n\r</TD></TR>\n\r        <TR>\n\r          <TD style=\"LINE-HEIGHT: 100%\">\n\r            <UL style=\"MARGIN: 5px 0px 10px 20px\"><iframe src=\"/book.html\" frameborder=\"0\" height=\"230\" width=\"240\" scrolling=\"no\"></iframe></UL></TD></TR>\n\r  </TBODY></TABLE>\n\r      <TABLE cellSpacing=0 cellPadding=0 width=100 border=0>\n\r        <TBODY>\n\r        <TR>\n\r          <TD height=10></TD></TR></TBODY></TABLE>\n\r      <TABLE cellSpacing=0 cellPadding=0 width=259 border=0>\n\r        <TBODY>\n\r        <TR>\n\r          <TD width=\"259\" align=right><table width=\"259\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\r            <tr>\n\r              <td width=\"259\"><img src=\"/imgs2008/Index_31.jpg\" width=\"259\" height=\"31\" alt=\"\"></td>\n\r            </tr>\n\r            <tr>\n\r              <td align=\"right\"><table width=\"247\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"/imgs2008/Index_33.gif\">\n\r                  <tr>\n\r                    <td height=\"10\" colspan=\"2\"></td>\n\r                  </tr>\n\r                  <tr>\n\r                    <td width=\"76\" class=\"ItemB\"><a href=\"/fuke2009/fuke/Index.html\" style=\"color:#0066CC;font-size:14px;line-height:25px\">专业妇科</a></td>\n\r                    <td width=\"171\" valign=\"middle\"><img src=\"/imgs2008/Index_36.jpg\"> </td>\n\r                  </tr>\n\r                  <tr>\n\r                    <td colspan=\"2\" class=\"C1\"><a href=\"/fuke2009/gjnl//Index.html\" id=\"aFuke1\" style=\"font-size:12px\">宫颈糜烂</a> | <a href=\"/fuke2009/yjjb/Index.html\" id=\"aFuke2\" style=\"font-size:12px\">月经疾病</a> | <a href=\"/fuke2009/bdyc/Index.html\" id=\"aFuke3\" style=\"font-size:12px\">白带异常</a> <br>\n\r                      <a href=\"/fuke2009/zgjl/Index.html\" id=\"aFuke4\" style=\"font-size:12px\">子宫肌瘤</a> | <a href=\"/fuke2009/lcnz/Index.html\"  id=\"aFuke5\" style=\"font-size:12px\">卵巢囊肿</a> | <a href=\"/fuke2009/nxby/Index.html\" id=\"aFuke6\" style=\"font-size:12px\">女性不孕</a>\n\r					   <br>\n\r                      <a href=\"/fuke2009/gjy/Index.html\" id=\"aFuke4\" style=\"font-size:12px\">宫 颈 炎</a> | <a href=\"/fuke2009/ydy/Index.html\"  id=\"aFuke5\" style=\"font-size:12px\">阴 道 炎</a> | <a href=\"/fuke2009/pqy/Index.html\" id=\"aFuke6\" style=\"font-size:12px\">盆 腔 炎</a><br>\n\r                      <a href=\"/fuke2009/wyy/Index.html\"  id=\"aFuke5\" style=\"font-size:12px\">外 阴 炎</a> | <a href=\"/fuke2009/fjy/Index.html\" id=\"aFuke6\" style=\"font-size:12px\">附 件 炎</a>\n\r					  </td>\n\r                  </tr>\n\r                  <tr>\n\r                    <td class=\"ItemB\"><a href=\"/fuke2009/jihuashengyu/Index.html\" style=\"color:#0066CC;font-size:14px;line-height:25px\">人流专科</a></td>\n\r                    <td valign=\"middle\"><img src=\"/imgs2008/Index_36.jpg\"> </td>\n\r                  </tr>\n\r                  <tr>\n\r                    <td colspan=\"2\" class=\"C1\"><a href=\"/fuke2009/rlcs/Index.html\" id=\"aNanke1\" style=\"font-size:12px\">人流知识</a> | <a href=\"/fuke2009/ylcs/Index.html\" id=\"aNanke2\" style=\"font-size:12px\">人流<span class=\"STYLE1\">前</span>注意事项</a><br>\n\r                    <a href=\"/fuke2009/zxwtrljs/Index.html\" id=\"aNanke2\" style=\"font-size:12px\">避孕指南</a> | <a href=\"/fuke2009/wtrl/Index.html\" id=\"aNanke2\" style=\"font-size:12px\">人流<span class=\"STYLE2\">后</span>注意事项</a></td>\n\r                  </tr>\n\r                  <tr>\n\r                    <td colspan=\"2\"><img src=\"/imgs2008/Index_43.gif\" width=\"247\" height=\"3\" alt=\"\"></td>\n\r                  </tr>\n\r                  <tr>\n\r                    <td colspan=\"2\" class=\"C2\" style=\"line-height:30px\"><a href=\"/jiankangzhuhai/jiankangtijian/\" style=\"color:Gray;font-size:14px\" id=\"aKeshi1\">健康体检</a>　　<a href=\"/jiankangzhuhai/chanke/\" style=\"color:Gray;font-size:14px\" id=\"aKeshi2\">产科</a>　　<a href=\"/jiankangzhuhai/erbihouke/\" style=\"color:Gray;font-size:14px\" id=\"aKeshi3\">耳鼻喉科</a><br>\n\r                        <a href=\"/jiankangzhuhai/jishengke/\" style=\"color:Gray;font-size:14px\" id=\"aKeshi4\">计生科</a>　 <a href=\"/jiankangzhuhai/neike/\" style=\"color:Gray;font-size:14px\" id=\"aKeshi5\">内科</a>　　<a href=\"/jiankangzhuhai/waike/\" style=\"color:Gray;font-size:14px\" id=\"aKeshi6\">外科</a> 　<a href=\"/jiankangzhuhai/pifuke/\" style=\"color:Gray;font-size:14px\" id=\"aKeshi7\">皮肤科</a></td>\n\r                  </tr>\n\r              </table></td>\n\r            </tr>\n\r            <tr>\n\r              <td height=\"11\"></td>\n\r            </tr>\n\r            <tr>\n\r              <td><img src=\"/imgs2008/Index_83.jpg\" alt=\"\" width=\"259\" height=\"151\" border=\"0\" usemap=\"#LeftMenu\"></td>\n\r            </tr>\n\r          </table>\n\r            <map name=\"LeftMenu\">\n\r              <area shape=\"rect\" coords=\"23,84,257,140\" href=\"/GuestBook/index.asp?KindID=1\">\n\r              <area shape=\"rect\" coords=\"23,14,257,70\" href=\"/online_registration.html\">\n\r            </map></TD></TR>\n\r        <TR>\n\r          <TD height=6></TD></TR></TBODY></TABLE>";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 1;
objAD.CountView      = 0;
objAD.CountClick     = 0;
objAD.ADDIR          = "AD";
ZoneAD_4.AddAD(objAD);

ZoneAD_4.Show();
