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_6 = new CodeZoneAD("ZoneAD_6");
ZoneAD_6.ZoneID      = 6;
ZoneAD_6.ZoneWidth   = 0;
ZoneAD_6.ZoneHeight  = 0;
ZoneAD_6.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 5;
objAD.ADType         = 4;
objAD.ADName         = "内容页头";
objAD.ImgUrl         = "";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<table width=\"910\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\r  <tr>\n\r    <td width=\"372\"><img src=\"/images/index3_03.gif\" width=\"372\" height=\"89\"></td>\n\r    <td><a target=blank href=tencent://message/?uin=33765856&Site=云南旅游&Menu=yes></a>\n\r    <embed src=\"/swf/qiu2.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"610\" height=\"89\"></embed></td>\n\r  </tr>\n\r</table>\n\r<table width=\"980\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"dh\">\n\r  <tr>\n\r    <td width=\"10\" background=\"/images/index3_07.gif\"><img src=\"/images/index3_06.gif\" width=\"10\" height=\"35\" alt=\"\" /></td>\n\r    <td width=\"127\" background=\"/images/index3_07.gif\"><div align=\"center\"><a href=\"/\">网站首页</a></div></td>\n\r    <td background=\"/images/index3_09.gif\"><a href=\"/zidingyi/guanyu.html\"></a>  <a href=\"/yunnanlvyou/List_470.html\">新闻资讯</a>  <a href=\"/zhutitour/\">云南旅游</a>  <a href=\"/zhutitour/List_537.html\">国内旅游</a>  <a href=\"/zhutitour/List_538.html\">出境旅游</a>  <a href=\"/zhutitour/List_295.html\">高尔夫旅游</a>  <a href=\"/convention/\">商务会议</a>  <a href=\"/zidingyi/hotel.html\">酒店预订</a>  <a href=\"/photo/\">景点大全</a>  <a href=\"/yunnanlvyou/List_471.\">旅游指南</a> <a href=\"/emeiyou/\" target=\"_blank\">峨眉山</a></td>\n\r    <td width=\"14\"><img src=\"/images/index3_10.gif\" width=\"13\" height=\"35\" alt=\"\" /></td>\n\r  </tr>\n\r</table>\n\r<table width=\"980\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\r  <tr>\n\r    <td width=\"534\" height=\"37\" background=\"/images/in_11.gif\" id=nr>推荐栏目：<a href=\"/kmtour/\">昆明旅游</a> | <a href=\"/ljtour/\">丽江旅游</a> | <a href=\"/dltour/\">大理旅游</a> | <a href=\"/xglltour/\">香格里拉旅游</a> | <a href=\"/xshbntour/\">西双版纳旅游</a> | <a href=\"/tchtour/\">腾冲旅游</a></td>\n\r    <td width=\"182\" background=\"/images/in_11.gif\" bgcolor=\"#993333\" id=nr><span id=\"liveclock\" style\"=width: 109px; height: 15px\"></span>\n\r<script language=\"JavaScript\">\n\rtoday=new Date();\n\rvar hours = today.getHours();\n\rvar minutes = today.getMinutes();\n\rvar seconds = today.getSeconds();\n\rvar timeValue = \"<FONT COLOR=black>\" + ((hours >12) ? hours -12 :hours); timeValue += ((minutes < 10) ? \"<BLINK><FONT COLOR=black>:</FONT></BLINK>0\" : \"<BLINK><FONT COLOR=black>:</FONT></BLINK>\") + minutes+\"</FONT></FONT>\";\n\rtimeValue += (hours >= 12) ? \"<FONT COLOR=black>pm</FONT>\" : \"<FONT COLOR=black>am</FONT>\";\n\rfunction initArray(){\n\rthis.length=initArray.arguments.length\n\rfor(var i=0;i<this.length;i++)\n\rthis[i+1]=initArray.arguments[i]  }\n\rvar d=new initArray(\"<font color=RED>星期日\",\"<font color=black>星期一\",\"<font color=black>星期二\",\"<font color=black>星期三\",\"<font color=black>星期四\",\"<font color=black>星期五\",\"<font color=black>星期六\"); document.write(\"<font color=black>\",today.getYear(),\"<font color=black>年\",\"<font color=black>\",today.getMonth()+1,\"<font color=black>月\",\"<font color=black>\",today.getDate(),\"<font color=black>日 </FONT>\",d[today.getDay()+1],\" \",timeValue);  //-->\n\r</script></td>\n\r<td width=\"194\" height=\"37\" background=\"/images/in_11.gif\" id=nr><iframe src=\"http://www.tianqi123.com/small_page/chengshi_2129.html?c0=red&c1=D96C00&bg=&w=100%&h=100%&text=yes\" width=100% height=100% marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url></iframe></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.InstallDir     = "/";
objAD.ADDIR          = "AD";
ZoneAD_6.AddAD(objAD);

ZoneAD_6.Show();

