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_25 = new CodeZoneAD("ZoneAD_25");
ZoneAD_25.ZoneID      = 25;
ZoneAD_25.ZoneWidth   = 0;
ZoneAD_25.ZoneHeight  = 0;
ZoneAD_25.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 32;
objAD.ADType         = 4;
objAD.ADName         = "快捷通道js";
objAD.ImgUrl         = "";
objAD.InstallDir     = "http://www.2191.cn/";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<table width=\"98%\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n\r	<tr><td align=\"right\"><img src=\"../skin/wypic/NewArticle.gif\" alt=\"快速通道\"></td></tr>\n\r</table>\n\r<table width=\"98%\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n\r	<tr><td width=\"25\" height=\"25\"><img src=\"../skin/wypic/Buy_icon1.gif\"></td>\n\r		<td><a href=\"../help.asp\"><b>帮助中心</b></a></td>\n\r		<td width=\"25\" height=\"25\"><img src=\"../skin/wypic/Buy_icon2.gif\"></td>\n\r		<td><a href=\"../shop/payonline.asp\" target=\"_blank\" ><b>在线支付</b></a></td>\n\r	</tr>\n\r	<tr><td width=\"25\" height=\"25\"><img src=\"../skin/wypic/Buy_icon3.gif\"></td>\n\r		<td><a href=\"../tgxz.asp\" target=\"_blank\" ><b>投稿需知</b></a></td>\n\r		<td width=\"25\" height=\"25\"><img src=\"../skin/wypic/Buy_icon4.gif\"></td>\n\r		<td><a href=\"../User/User_Exchange.asp?Action=Exchange\" target=\"_blank\"><b>兑换点券</b></a></td>\n\r	</tr>\n\r	<tr><td width=\"25\" height=\"25\"><img src=\"../skin/wypic/Buy_icon5.gif\"></td>\n\r		<td><a href=\"../hkxz.asp\" target=\"_blank\" ><b>汇款需知</b></a></td>\n\r		<td width=\"25\" height=\"25\"><img src=\"../skin/wypic/Buy_icon8.gif\"></td>\n\r		<td><a href=\"../User/User_Exchange.asp?Action=Valid\" target=\"_blank\" ><b>兑换期效</b></a></td>\n\r	</tr>\n\r	<tr><td width=\"25\" height=\"25\"><img src=\"../skin/wypic/Buy_icon7.gif\"></td>\n\r		<td><a href=\"../User/User_Article.asp?ChannelID=1&Action=Add\" target=\"_blank\"><b>在线投稿</b></a></td>\n\r		<td width=\"25\" height=\"25\"><img src=\"../skin/wypic/Buy_icon6.gif\"></td>\n\r		<td><a href=\"../User/User_Exchange.asp?Action=Recharge\" target=\"_blank\" ><b>点卡充值</b></a></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.ADDIR          = "NewAdd";
ZoneAD_25.AddAD(objAD);

ZoneAD_25.Show();
