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_2 = new CodeZoneAD("ZoneAD_2");
ZoneAD_2.ZoneID      = 2;
ZoneAD_2.ZoneWidth   = 0;
ZoneAD_2.ZoneHeight  = 0;
ZoneAD_2.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 4;
objAD.ADType         = 4;
objAD.ADName         = "910尾";
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><table width=\"910\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\r    <tr>\n\r      <td id=\"indexmore\" style=\"color:#FFFFFF;\" width=\"910\" height=\"26\" align=\"center\" valign=\"middle\" background=\"/skin/images/ynkmcits_51.gif\"><a href=\"/zidingyi/guanyu.html\" target=\"_blank\"><font color=\"#FFFFFF\">公司介绍</font></a> | <a href=\"/zidingyi/pinzhi.html\" target=\"_blank\"><font color=\"#FFFFFF\">品质保证</font></a> | <a href=\"/zidingyi/lianxi.html\" target=\"_blank\"><font color=\"#FFFFFF\">联系我们</font></a> | <a href=\"/zidingyi/baoming.html\" target=\"_blank\"><font color=\"#FFFFFF\">报名参团</font></a> | <a href=\"/zidingyi/zhifu.html\" target=\"_blank\"><font color=\"#FFFFFF\">支付方式</font></a> | <a href=\"/zidingyi/map.html\" target=\"_blank\"><font color=\"#FFFFFF\">旅游地图</font></a> | <a href=\"/friendsite/index.asp\" target=\"_blank\"><font color=\"#FFFFFF\">友情链接</font></a> | <a href=\"/zidingyi/hetong.html\" target=\"_blank\"><font color=\"#FFFFFF\">旅游合同</font></a> | <a href=\"/zidingyi/banquan.html\" target=\"_blank\"><font color=\"#FFFFFF\">版权声明</font></a></td>\n\r    </tr>\n\r  </table></td>\n\r  </tr>\n\r  <tr>\n\r    <td><table width=\"910\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\r      <tr>\n\r        <td width=\"200\"><img src=\"/skin/images/B_logo.gif\" width=\"200\" height=\"169\" /></td>\n\r        <td width=\"710\" align=\"left\" valign=\"top\"><table width=\"780\" height=\"165\" cellpadding=\"0\" cellspacing=\"0\">\n\r          <TR>\n\r            <TD width=\"334\"><STRONG>【公司全称】昆明康辉旅行社有限公司</STRONG></TD>\n\r            <TD width=\"334\"><STRONG>【网站地址】<A href=\"/\" target=\"_blank\">www.ynkmlxs.com</A></STRONG></TD>\n\r          </TR>\n\r          <TR>\n\r            <TD><STRONG>【许可证号】L-YN-GJ00002</STRONG></TD>\n\r            <TD><STRONG>【网站备案】<A href=\"http://www.miibeian.gov.cn\" target=\"_blank\">滇ICP备05009312号</A></STRONG></TD>\n\r          </TR>\n\r          <TR>\n\r            <TD><STRONG>【联 系 人】宋雪丽 冯小姐 李先生 </STRONG></TD>\n\r            <TD><STRONG>【汇款名称】昆明康辉旅行社有限公司</STRONG></TD>\n\r          </TR>\n\r          <TR>\n\r            <TD><STRONG>【客服电话】18064884680 </STRONG></TD>\n\r            <TD><STRONG>【公司账号】0275 0104 0001 154</STRONG></TD>\n\r          </TR>\n\r          <TR>\n\r            <TD><STRONG>【全国免费电话】4006-978-991 4006-978-992</STRONG></TD>\n\r            <TD><strong>【开户银行】中国农业银行昆明市双龙支行永安路分理处</strong></TD>\n\r          </TR>\n\r          <TR>\n\r            <TD><STRONG>【业务传真】0871-3330332</STRONG></TD>\n\r            <TD><strong>【企业邮箱】<a href=\"mailto:ynkmlxs@gmail.com\">ynkmlxs@gmail.com</a><a href=\"mailto:kmcits@163.com\"></a></strong></TD>\n\r          </TR>\n\r          <TR>\n\r            <TD><STRONG>【联系手机】13888480807</STRONG></TD>\n\r            <TD><strong>【客服QQ】707695884 673748589</strong></TD>\n\r          </TR>\n\r          <TR>\n\r            <TD colspan=\"2\"><div align=\"left\"><STRONG>【联系地址】昆明永平路8号通怡大厦康辉旅行社B区498室</STRONG></div></TD>\n\r          </TR>\n\r        </table></td>\n\r      </tr>\n\r    </table></td>\n\r  </tr>\n\r</table>\n\r<div id=\"sorollDiv1\" style=\"width:130px;right:10px;position:absolute;top:120px;\">\n\r<img src=\"/Skin/images/kf1.gif\" width=\"130\" height=\"299\" border=\"0\" usemap=\"#Map\">\n\r<map name=\"Map\">\n\r<area shape=\"rect\" coords=\"4,229,126,248\" href=\"tencent://message/?uin=673748589&Site=http://www.ynkmlxs.com&Menu=yes\">\n\r<area shape=\"rect\" coords=\"4,253,126,272\" href=\"tencent://message/?uin=674584159&Site=http://www.ynkmlxs.com&Menu=yes\">\n\r<area shape=\"rect\" coords=\"5,276,126,294\" href=\"tencent://message/?uin=984674852&Site=http://www.ynkmlxs.com&Menu=yes\">\n\r</map></div>\n\r<script type=\"text/javascript\">\n\rvar lastScrollY=0;\n\rfunction heartBeat(){ \n\rdiffY=document.documentElement.scrollTop; \n\rpercent=0.1*(diffY-lastScrollY); \n\rif(percent>0)percent=Math.ceil(percent); \n\relse percent=Math.floor(percent); \n\rdocument.getElementById(\"sorollDiv1\").style.top=parseInt(document.getElementById(\"sorollDiv1\").style.top)+percent+\"px\";\n\rlastScrollY=lastScrollY+percent; \n\r}\n\rwindow.setInterval(\"heartBeat()\",1);\n\r</script>";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 1;
objAD.CountView      = 0;
objAD.CountClick     = 0;
objAD.InstallDir     = "/";
objAD.ADDIR          = "AD";
ZoneAD_2.AddAD(objAD);

ZoneAD_2.Show();

