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=\"980\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\r  <tr>\n\r    <td width=\"300\"><img src=\"/skin/images/200710695222153_2.gif\" width=\"300\" height=\"89\"></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\"><a href=\"tencent://message/?uin=294685941&Site=云南旅游&Menu=yes\"><img border=\"0\" SRC=/images/index55_02.gif></a></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<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<table width=\"980\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"dh4\">\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=\"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>  <a href=\"/yunnanlvyou/List_541.html\">商务租车</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=\"980\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"dh5\">\n\r  <tr>\n\r    <td width=\"530\" 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=\"/guestbook/\" target=\"_blank\">结伴同玩</a> | </td>\n\r    <td width=\"371\" background=\"/images/in_11.gif\" id=nr>云南旅游咨询热线:<strong>13312503888 13888455637</strong></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();
