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         = "910头";
objAD.ImgUrl         = "";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<style type=\"text/css\">\n\r<!--\n\r.STYLE3 {color: #FF0000}\n\r-->\n\r</style>\n\r<table width=\"910\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\r  <tr>\n\r    <td><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"910\" height=\"198\">\n\r      <param name=\"movie\" value=\"/swf/910.swf\" />\n\r      <param name=\"quality\" value=\"high\" />\n\r      <embed src=\"/swf/910.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"910\" height=\"198\"></embed>\n\r    </object></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=\"7\" height=\"36\" rowspan=\"2\"><img src=\"/skin/images/index_80.gif\" width=\"7\" height=\"36\" /></td>\n\r    <td height=\"30\"><table width=\"901\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" id=\"dh\">\n\r      <tr>\n\r        <td width=\"64\" height=\"30\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_81.gif\"><a href=\"/\" target=\"_blank\"><a href=\"/\">首页</a></td>\n\r        <td width=\"75\" height=\"30\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_82.gif\"><span class=\"STYLE23\"><a href=\"/yunnanlvyou/Index.html\" target=\"_blank\">云南旅游</a></td>\n\r        <td width=\"75\" height=\"30\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_82.gif\"><span class=\"STYLE27\"><a href=\"/zidingyi/hotel.html\" target=\"_blank\">酒店宾馆</a></td>\n\r        <td width=\"75\" height=\"30\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_82.gif\"><a href=\"/kmtour/\" target=\"_blank\">昆明旅游</a></td>\n\r        <td width=\"75\" height=\"30\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_82.gif\"><span class=\"STYLE26\"><a href=\"/dltour/\" target=\"_blank\">大理旅游</a></td>\n\r        <td width=\"75\" height=\"30\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_82.gif\"><a href=\"/ljtour/\" target=\"_blank\">丽江旅游</a></td>\n\r        <td width=\"75\" height=\"30\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_82.gif\"><span class=\"STYLE25\"><a href=\"/xglltour/\" target=\"_blank\">中甸旅游</a></td>\n\r        <td width=\"75\" height=\"30\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_82.gif\"><a href=\"/tchtour/\" target=\"_blank\">腾冲旅游</a></td>\n\r        <td width=\"75\" height=\"30\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_82.gif\"><a href=\"/xshbntour/\" target=\"_blank\">版纳旅游</a></td>\n\r        <td width=\"75\" height=\"30\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_82.gif\"><a href=\"/convention/\" target=\"_blank\">会议会展</a></td>\n\r        <td width=\"75\" height=\"30\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_83.gif\"><span class=\"STYLE25\"><a href=\"/zhutitour/List_553.html\" target=\"_blank\">旅游租车</a></td>\n\r        <td width=\"69\" align=\"center\" valign=\"middle\" background=\"/skin/images/index_83.gif\" class=\"STYLE27\"><a href=\"/zhutitour/List_295.html\" target=\"_blank\">高尔夫</a></td>\n\r      </tr>\n\r    </table></td>\n\r    <td width=\"7\" height=\"36\" rowspan=\"2\"><img src=\"/skin/images/index_80.gif\" width=\"7\" height=\"36\" /></td>\n\r  </tr>\n\r  <tr>\n\r    <td><img src=\"/skin/images/index_79.gif\" width=\"901\" height=\"6\" /></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><img src=\"/skin/images/daohang910.jpg\" width=\"908\" height=\"68\" border=\"0\" usemap=\"#Map2\"></td>\n\r  </tr>\n\r</table>\n\r<map name=\"Map2\"><area shape=\"rect\" coords=\"10,8,93,60\" href=\"/zhutitour/List_554.html\" target=\"_blank\">\n\r<area shape=\"rect\" coords=\"106,9,188,61\" href=\"/zhutitour/List_555.html\" target=\"_blank\">\n\r<area shape=\"rect\" coords=\"201,8,284,64\" href=\"/zhutitour/List_556.html\" target=\"_blank\">\n\r<area shape=\"rect\" coords=\"297,8,379,61\" href=\"/zhutitour/List_557.html\" target=\"_blank\">\n\r<area shape=\"rect\" coords=\"391,8,474,58\" href=\"/zhutitour/List_558.html\" target=\"_blank\">\n\r<area shape=\"rect\" coords=\"487,9,570,59\" href=\"/zhutitour/List_559.html\" target=\"_blank\">\n\r<area shape=\"rect\" coords=\"583,9,666,60\" href=\"/zhutitour/List_560.html\" target=\"_blank\">\n\r<area shape=\"rect\" coords=\"677,8,760,60\" href=\"/zhutitour/List_564.html\" target=\"_blank\">\n\r<area shape=\"rect\" coords=\"770,7,854,60\" href=\"/zhutitour/List_565.html\" target=\"_blank\">\n\r<area shape=\"rect\" coords=\"863,17,901,56\" href=\"/zhutitour/\" target=\"_blank\">\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_1.AddAD(objAD);

ZoneAD_1.Show();
