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           = 3;
objAD.ADType         = 4;
objAD.ADName         = "950top";
objAD.ImgUrl         = "";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<table cellSpacing=0 cellPadding=0 width=950 align=center border=0>\n\r    <tr>\n\r      <td background=/Skin/images/001yn_001.jpg height=22>\n\r        <table height=\"100%\" cellSpacing=0 cellPadding=0 width=\"100%\" border=0>\n\r          <tr>\n\r            <td style=\"COLOR: #0099ff\">云南百强诚信旅游社 云南省五星诚信旅行社第一名</td>\n\r            <td class=index_td_01 width=500><a href=\"#\" target=\"_self\" onClick=\"this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.78yn.cn\');\">【设为首页】</A><a href=\"javascript:window.external.AddFavorite(\'http://www.78yn.cn\',\'昆明中国国际旅行社\')\" target=\"_self\">【加入收藏】</A><A href=\"/zidingyi/lianxi.html\">【联系我们】</A><A href=\"/zidingyi/zhifu.html\">【汇款方式】</A><A href=\"/zidingyi/zzry.html\">【国旅荣誉】</A><a href=\"http://www.ciotour.com/\" target=\"_blank\">峨眉山</a></td>\n\r          </tr>\n\r        </table>\n\r      </td>\n\r    </tr>\n\r  </table>\n\r  <table width=950 height=\"112\" border=0 align=center cellPadding=0 cellSpacing=0 background=\"/Skin/images/001yn_004.jpg\">\n\r    <tr>\n\r      <td width=\"435\" align=\"center\"></td>\n\r      <td align=\"left\" valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\r        <tr>\n\r          <td height=\"13\"></td>\n\r        </tr>\n\r        <tr>\n\r          <td><iframe src=\"http://m.weather.com.cn/m/pn4/weather.htm \" width=\"160\" height=\"20\" marginwidth=\"0\" marginheight=\"0\" hspace=\"0\" vspace=\"0\" frameborder=\"0\" scrolling=\"no\" allowTransparency=\"true\"></iframe></td>\n\r        </tr>\n\r      </table></td>\n\r    </tr>\n\r</table>\n\r  <table height=210 cellSpacing=0 cellPadding=0 width=950 align=center border=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=\"950\" height=\"210\">\n\r        <param name=\"movie\" value=\"/swf/top.swf\">\n\r        <param name=\"quality\" value=\"high\">\n\r		<param name=\"wmode\" value=\"opaque\" />\n\r        <embed src=\"/swf/top.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"950\" height=\"210\"></embed>\n\r      </object></td>\n\r    </tr>\n\r</table>\n\r  <table cellSpacing=0 cellPadding=0 width=950 align=center border=0>\n\r    <tr>\n\r      <td width=11><IMG height=37 src=\"/Skin/images/001yn_006.jpg\" width=11></td>\n\r      <td background=/Skin/images/001yn_010.jpg>\n\r        <table cellSpacing=0 cellPadding=0 width=\"100%\" border=0>\n\r          <tr>\n\r            <td class=index_td_02 style=\"PADDING-TOP: 8px\" align=center width=68><A href=\"/\">首页</A></td>\n\r            <td align=center width=9><IMG height=37 src=\"/Skin/images/001yn_008.jpg\" width=6></td>\n\r            <td class=index_td_02 style=\"PADDING-TOP: 8px\" align=center width=67><A href=\"/zhutitour/Index.html\">云南旅游</A></td>\n\r            <td align=center width=6><IMG height=37 src=\"/Skin/images/001yn_008.jpg\" width=6></td>\n\r            <td class=index_td_02 style=\"PADDING-TOP: 8px\" align=center width=81><A href=\"/zhutitour/List_536.html\">腾冲瑞丽</A></td>\n\r            <td align=center width=6><IMG height=37 src=\"/Skin/images/001yn_008.jpg\" width=6></td>\n\r            <td class=index_td_02 style=\"PADDING-TOP: 8px\" align=center width=77><A href=\"/zidingyi/guanyu.html\">关于我们</A></td>\n\r            <td align=center width=10><IMG height=37 src=\"/Skin/images/001yn_008.jpg\" width=6></td>\n\r            <td class=index_td_02 style=\"PADDING-TOP: 8px\" align=center width=81><A href=\"/zidingyi/hotel.html\">云南酒店</A></td>\n\r            <td align=center width=6><IMG height=37 src=\"/Skin/images/001yn_008.jpg\" width=6></td>\n\r            <td class=index_td_02 style=\"PADDING-TOP: 8px\" align=center width=60><A href=\"/zhutitour/List_295.html\">高尔夫</A></td>\n\r            <td align=center width=6><IMG height=37 src=\"/Skin/images/001yn_008.jpg\" width=6></td>\n\r            <td class=index_td_02 style=\"PADDING-TOP: 8px\" align=center width=81><A href=\"/yunnanlvyou/List_565.html\">云南特产</A></td>\n\r            <td align=center width=6><IMG height=37 src=\"/Skin/images/001yn_008.jpg\" width=6></td>\n\r            <td class=index_td_02 style=\"PADDING-TOP: 8px\" align=center width=81><A href=\"/convention/Index.html\">商务会议</A></td>\n\r            <td align=center width=6><IMG height=37 src=\"/Skin/images/001yn_008.jpg\" width=6></td>\n\r            <td class=index_td_02 style=\"PADDING-TOP: 8px\" align=center width=81><A href=\"/Photo/\">云南景点</A></td>\n\r            <td align=center width=6><IMG height=37 src=\"/Skin/images/001yn_008.jpg\" width=6></td>\n\r            <td class=index_td_02 style=\"PADDING-TOP: 8px\" align=center width=81><A href=\"/yunnanlvyou/List_470.html\">旅游新闻</A></td>\n\r            <td align=center width=6><IMG height=37 src=\"/Skin/images/001yn_008.jpg\" width=6></td>\n\r            <td class=index_td_02 style=\"PADDING-TOP: 8px\" align=center width=101><A href=\"/zidingyi/map.html\">旅游合同</A></td>\n\r          </tr>\n\r        </table>\n\r      </td>\n\r      <td width=13><IMG height=37 src=\"/Skin/images/001yn_011.jpg\" width=13></td>\n\r    </tr>\n\r  </table>\n\r  <table cellSpacing=0 cellPadding=0 width=950 align=center border=0 style=\"margin-bottom:5px;\">\n\r    <tr>\n\r      <td class=index_td_03 style=\"PADDING-LEFT: 15px; COLOR: #0188f4\" background=/Skin/images/001yn_012.jpg height=35>按日期分类：<A href=\"/zhutitour/List_599.html\">云南一日游</A> | <A href=\"/zhutitour/List_611.html\">云南二日游</A> | <A href=\"/zhutitour/List_556.html\">云南三日游</A> | <A href=\"/zhutitour/List_557.html\">云南四日游</A> | <A href=\"/zhutitour/List_558.html\">云南五日游</A> | <A href=\"/zhutitour/List_559.html\">云南六日游</A> | <A href=\"/zhutitour/List_560.html\">云南七日游</A> |<a href=\"/zhutitour/List_561.html\"> 云南八日游</a> | <A href=\"/zhutitour/List_562.html\">云南九日游</A> | <A href=\"/zhutitour/List_602.html\">云南十日游</A> | <A href=\"/zhutitour/List_600.html\">云南全景游</A></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();

