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_3 = new CodeZoneAD("ZoneAD_3");
ZoneAD_3.ZoneID      = 3;
ZoneAD_3.ZoneWidth   = 0;
ZoneAD_3.ZoneHeight  = 0;
ZoneAD_3.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 3;
objAD.ADType         = 4;
objAD.ADName         = "网页头";
objAD.ImgUrl         = "";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<table cellspacing=\"0\" cellpadding=\"0\" width=\"910\" align=\"center\" border=\"0\">\n\r  <tr>\n\r    <td width=\"303\"><marquee onMouseOver=\"stop()\" onMouseOut=\"start()\" scrollamount=\"3\">\n\r      <a class=\"AnnounceBody2\" title=\"热烈庆祝云南即将建成云南最丰富的旅游信息目的地数据库系统！http://网址\" onClick=\"javascript:window.open(\'/Announce.asp?ChannelID=0&ID=1\', \'newwindow\', \'height=440, width=400, toolbar=no, menubar=no, scrollbars=auto, resizable=no, location=no, status=no\')\" href=\"#\">热烈庆祝即将建成云南最丰富的旅游信息目的地数据库系统！  [admin  2006-08-10]</a>\n\r    </marquee></td>\n\r    <td width=\"607\" align=\"right\" id=\"dh5\"><a href=\"/zidingyi/guanyu.html\">关于我们</a> | <a href=\"/zidingyi/pinzhi.html\">品质保证</a> | <a href=\"/zidingyi/baoming.html\">报名参团</a> | <a href=\"/zidingyi/zhifu.html\">支付方式</a> | <a href=\"/zidingyi/jiandu.html\">监督投诉</a> | <a href=\"/zidingyi/lianxi.html\">联系我们</a> | <a href=\"/zidingyi/map.html\">网站地图</a> | <a href=\"javascript:window.external.addFavorite(\'http://www.yxynly.com\',\'印象云南旅游网\');\">加入收藏</a></td>\n\r  </tr>\n\r</table>\n\r<table width=\"910\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\r  <tr>\n\r    <td width=\"372\"><embed src=\"/swf/nrtop.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"372\" height=\"89\"></embed></td>\n\r    <td width=\"95\"><img src=\"/images/index55_01.gif\" alt=\"\" width=\"95\" height=\"89\" border=\"0\" usemap=\"#Map77\" /></td>\n\r    <td width=\"77\"><img SRC=/images/index55_02.gif border=\"0\" usemap=\"#Map\"></td>\n\r    <td width=\"366\"><img src=\"/images/index55_03.gif\" alt=\"\" width=\"366\" height=\"89\" border=\"0\" usemap=\"#Map88\" /></td>\n\r  </tr>\n\r</table>\n\r\n\r<table width=\"910\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"dh4\">\n\r  <tr>\n\r    <td width=\"10\"><img src=\"/images/index3_06.gif\" width=\"10\" height=\"35\" alt=\"\" /></td>\n\r    <td width=\"132\" background=\"/images/index3_07.gif\"><div align=\"center\"><a href=\"/\">网站首页</a></div></td>\n\r    <td width=\"755\" background=\"/images/index3_09.gif\"><a href=\"/zhutitour/List_537.html\"></a><a href=\"/yunnanlvyou/\">云南旅游</a>  <a href=\"/convention/\">云南会议</a>  <a href=\"/zhutitour/List_295.html\">高尔夫旅游</a>  <a href=\"/yunnanlvyou/List_471.html\">旅游指南</a>  <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=\"13\"><img src=\"/images/index3_10.gif\" width=\"13\" height=\"35\" alt=\"\" /></td>\n\r  </tr>\n\r</table>\n\r<table width=\"910\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"dh5\">\n\r  <tr>\n\r    <td width=\"651\" height=\"37\" background=\"/images/in_11.gif\" >推荐栏目：<a href=\"/zhutitour/\" target=\"_blank\">主题旅游</a> | <a href=\"/photo/\" target=\"_blank\">美景图库</a> | <a href=\"/kmtour/List_251.html\" target=\"_blank\">昆明酒店</a> | <a href=\"/zhutitour/List_297.html\" target=\"_blank\">生态旅游</a> | <a href=\"/zidingyi/jpcx.asp\" target=\"_blank\">机票查询</a> |   客服QQ：<A href=\"http://wpa.qq.com/msgrd?V=1&Uin=409296802&Site\" target=\"_blank\"><img border=\"0\" SRC=http://wpa.qq.com/pa?p=1:409296802:1 alt=\"点击这里给我发消息\"></A> <A href=\"http://wpa.qq.com/msgrd?V=1&Uin=469166692&Site\" target=\"_blank\"><img border=\"0\" SRC=http://wpa.qq.com/pa?p=1:469166692:1 alt=\"点击这里给我发消息\"></A></td>\n\r    <td width=\"259\" background=\"/images/in_11.gif\" style=\"font-size:14px\"><marquee onMouseOver=\"stop()\" onMouseOut=\"start()\" scrollamount=\"3\">\n\r    云南旅游咨询热线：0871-3525628  13888092722\n\r    </marquee></td>\n\r  </tr>\n\r</table>\n\r<map name=\"Map77\" id=\"Map77\">\n\r<area shape=\"rect\" coords=\"11,51,66,65\" href=\"/zhutitour/\" />\n\r</map>\n\r<map name=\"Map88\" id=\"Map88\">\n\r  <area shape=\"rect\" coords=\"24,49,85,67\" href=\"/kmtour/List_251.html\" />\n\r  <area shape=\"rect\" coords=\"214,52,268,65\" href=\"/photo/\" />\n\r<area shape=\"rect\" coords=\"303,50,361,67\" href=\"/zhutitour/List_297.html\" />\n\r<area shape=\"rect\" coords=\"117,50,177,68\" href=\"/zidingyi/baoming.html\" />\n\r</map>\n\r<map name=\"Map\"><area shape=\"rect\" coords=\"7,52,73,67\" href=\"tencent://message/?uin=409296802&Site=云南旅游&Menu=yes\">\n\r</map>";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 1;
objAD.CountView      = 0;
objAD.CountClick     = 0;
objAD.InstallDir     = "/";
objAD.ADDIR          = "AD";
ZoneAD_3.AddAD(objAD);

ZoneAD_3.Show();
