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           = 6;
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=\"348\"><img src=\"/Skin/images/in_02.gif\" width=\"348\" height=\"71\" alt=\"\"></td>\n\r    <td width=\"316\"> </td>\n\r    <td width=\"140\" id=\"ydsc\"><p><a href=\"http://www.miibeian.gov.cn/\" target=\"_blank\">滇备07002701号\n\r</a><br>\n\r      <a onClick=\"this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.lijiangcits.com\');\" href=\"#\">[设为首页]</a> <br>\n\r<a  href=\"javascript:window.external.AddFavorite(\'http://www.lijiangcits.com\',\'丽江旅游网\')\">[加入收藏]</a></p>\n\r    </td>\n\r    <td width=\"106\"><img src=\"/Skin/images/in_04.gif\" width=\"106\" height=\"71\" alt=\"\"></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=\"910\"> </td></tr><tr>\n\r    <td width=\"910\" bgcolor=\"#248C29\" id=\"dhfont\" height=25>　<a href=\"/\">首　　页</a> | <a href=\"/zidingyi/lijgl.html\">丽江国旅</a> | <a href=\"/ljtour/List_547.html\">走进丽江</a> | <a href=\"/ljtour/List_262.html\">吃在丽江</a> | <a href=\"/ljtour/List_258.html\">住在丽江</a> | <a href=\"/ljtour/List_539.html\">行在丽江</a> | <a href=\"/ljtour/List_540.html\">游在丽江</a> | <a href=\"/ljtour/List_541.html\">购在丽江</a> | <a href=\"/ljtour/List_542.html\">娱在丽江</a> | <a href=\"/ljtour/List_543.html\">票务服务</a> | <a href=\"/ljtour/List_544.html\">民族风情</a> | <a href=\"/ljtour/List_545.html\">旅游指南</a> | <a href=\"/zidingyi/fkfsh.html\">付款方式</a>\n\r    </td></tr><tr><td width=\"908\"  background=\"/Skin/images/in_09.gif\" align=center id=\"dhfont\" height=25>\n\r              <a href=\"/ljtour/List_257.html\">线路预订</a>|<a href=\"/ljtour/List_548.html\">商务会议</a>|<a href=\"/zhutitour/List_295.html\">高尔夫游</a>|<a href=\"/zidingyi/zuche.html\">租车服务</a>|<a href=\"/Photo/Index.html\">云南各地旅游</a>|<a href=\"/ljtour/List_553.html\">漫游丽江古城</a>|24小时服务热线：86-0888-5152861、3106877、6688578   QQ在线咨询：<A href=\"tencent://message/?uin=30282484&Site=www.lijiangcits.com&Menu=yes\" target=blank>30282484</a>\n\r</td>\n\r    </tr><tr><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=\"180\">\n\r        <param name=\"movie\" value=\"/swf/top.swf\">\n\r        <param name=\"wmode\" value=\"opaque\">\n\r        <param name=\"quality\" value=\"high\">\n\r        <embed src=\"/swf/top.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"910\" height=\"180\"></embed>\n\r      </object>\n\r    </td>  </tr>\n\r</table>\n\r<table width=\"910\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\r  <tr>\n\r    <td> </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 height=\"21\"><iframe src=\"http://www.tianqi123.com/small_page/chengshi_2231.html?c0=red&c1=D96C00&bg=&w=100%&h=21&text=yes\" width=100% height=21 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url></iframe></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_6.AddAD(objAD);

ZoneAD_6.Show();

