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_1 = new CodeZoneAD("ZoneAD_1");
ZoneAD_1.ZoneID      = 1;
ZoneAD_1.ZoneWidth   = 0;
ZoneAD_1.ZoneHeight  = 0;
ZoneAD_1.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 1;
objAD.ADType         = 4;
objAD.ADName         = "950头";
objAD.ImgUrl         = "";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<table width=\"950\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\r  <tr>\n\r    <td height=\"114\" valign=\"top\" background=\"/skin/images/cct008com_1index_03.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\r      <tr>\n\r        <td align=\"center\" style=\"color:#88ab12; padding-top:5px;\">云南国际旅行社十强第一名 云南旅行社十佳诚信单位 五星级诚信旅行社第一名 全国国际旅行社一百强</td>\n\r        <td width=\"240\" class=\"wy_331_s1\" style=\"padding-top:5px;\"><a  href=\"javascript:window.external.AddFavorite(\'http://www.cct008.com\',\'昆明康辉旅行社有限公司\')\">收藏本站</a>    <a href=\"/zidingyi/lianxi.html\" target=\"_blank\">联系我们</a>    <a href=\"/zidingyi/zhifu.html\" target=\"_blank\">支付方式</a>    <a href=\"/zidingyi/map.html\" target=\"_blank\">合同范本</a></td>\n\r      </tr>\n\r    </table></td>\n\r  </tr>\n\r</table>\n\r<table width=\"950\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\r  <tr>\n\r    <td height=\"38\" background=\"/skin/images/cct008com_2index_05.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"wy_331_s3\">\n\r      <tr>\n\r        <td style=\"padding-left:5px;\"><a href=\"/\" target=\"_self\">首    页</a></td>\n\r        <td width=\"2\"><img src=\"/skin/images/cct008com_2index_11.gif\" width=\"2\" height=\"11\" /></td>\n\r        <td><a href=\"/zidingyi/guanyu.html\" target=\"_blank\">公司简介</a></td>\n\r          <td width=\"2\"><img src=\"/skin/images/cct008com_2index_11.gif\" width=\"2\" height=\"11\" /></td>\n\r        <td><a href=\"/yunnanlvyou/\" target=\"_blank\">云南旅游</a></td>\n\r          <td width=\"2\"><img src=\"/skin/images/cct008com_2index_11.gif\" width=\"2\" height=\"11\" /></td>\n\r        <td><a href=\"/zhutitour/List_537.html\" target=\"_blank\">国内旅游</a></td>\n\r         <td width=\"2\"><img src=\"/skin/images/cct008com_2index_11.gif\" width=\"2\" height=\"11\" /></td>\n\r        <td><a href=\"/zhutitour/List_538.html\" target=\"_blank\">出境旅游</a></td>\n\r          <td width=\"2\"><img src=\"/skin/images/cct008com_2index_11.gif\" width=\"2\" height=\"11\" /></td>\n\r        <td><a href=\"/zhutitour/List_553.html\" target=\"_blank\">旅游租车</a></td>\n\r          <td width=\"2\"><img src=\"/skin/images/cct008com_2index_11.gif\" width=\"2\" height=\"11\" /></td>\n\r        <td><a href=\"/kmtour/List_254.html\" target=\"_blank\">民族风情</a></td>\n\r          <td width=\"2\"><img src=\"/skin/images/cct008com_2index_11.gif\" width=\"2\" height=\"11\" /></td>\n\r        <td><a href=\"/kmtour/List_255.html\" target=\"_blank\">云南特产</a></td>\n\r         <td width=\"2\"><img src=\"/skin/images/cct008com_2index_11.gif\" width=\"2\" height=\"11\" /></td>\n\r        <td><a href=\"/zhutitour/List_295.html\" target=\"_blank\">高尔夫旅游</a></td>\n\r        <td width=\"210\" valign=\"bottom\" style=\"font-size:14px; color:#197738;\"><script language=\"javascript\">\n\rfunction showtime()\n\r{\n\rvar today,hour,second,minute,year,month,date;\n\rvar strDate ;\n\r   today=new Date();\n\r var n_day = today.getDay();\n\r switch (n_day)\n\r {\n\r case 0:{\n\r strDate = \"星期日\"\n\r }break;\n\r case 1:{\n\r strDate = \"星期一\"\n\r }break;\n\r case 2:{\n\r strDate =\"星期二\"\n\r }break;\n\r case 3:{\n\r strDate =  \"星期三\"\n\r }break;\n\r case 4:{\n\r strDate =  \"星期四\"\n\r }break;\n\r case 5:{\n\r strDate =  \"星期五\"\n\r }break;\n\r case 6:{\n\r strDate =  \"星期六\"\n\r }break;\n\r case 7:{\n\r strDate =  \"星期日\"\n\r }break;\n\r }\n\r \n\r\n\ryear = today.getYear();\n\rmonth = today.getMonth()+1;\n\rdate = today.getDate();\n\rhour = today.getHours();\n\rminute =today.getMinutes();\n\rsecond = today.getSeconds();\n\rif (minute < 10) {\n\rminute = \"0\"+minute+\"\";\n\r} \n\relse {\n\rminute = minute+\"\";\n\r}\n\rif (second < 10) {\n\rsecond = \"0\"+second+\"\";\n\r} else {\n\rsecond = second+\"\";\n\r}\n\rdocument.getElementById(\'time\').innerHTML = year + \"年\" + month + \"月\" + date + \"日 \" +  strDate +\" \" + hour + \":\" + minute + \":\" + second; //显示时间\n\rsetTimeout(\"showtime();\", 1000); //设定函数自动执行时间为 1000 ms(1 s)\n\r}\n\r</script>\n\r<div id=\"time\"></div>\n\r<script language=\"javascript\"> showtime();</script></td>\n\r      </tr>\n\r    </table></td>\n\r  </tr>\n\r</table>";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 1;
objAD.CountView      = 0;
objAD.CountClick     = 0;
objAD.InstallDir     = "/";
objAD.ADDIR          = "AD";
ZoneAD_1.AddAD(objAD);

ZoneAD_1.Show();

