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_11 = new CodeZoneAD("ZoneAD_11");
ZoneAD_11.ZoneID      = 11;
ZoneAD_11.ZoneWidth   = 0;
ZoneAD_11.ZoneHeight  = 0;
ZoneAD_11.ShowType    = 2;

var objAD = new ObjectAD();
objAD.ADID           = 11;
objAD.ADType         = 4;
objAD.ADName         = "站内广告";
objAD.ImgUrl         = "";
objAD.InstallDir     = "/";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"686\" height=\"96\" align=\"left\">\n\r    <tbody>\n\r        <tr>\n\r            <td width=\"410\" align=\"left\" height=\"44\" valign=\"bottom\"><a target=\"_blank\" href=\"/Shop/chongzhika/fuzhu/Index.html\"><u><b><font color=\"#0000ff\"><span style=\"font-size: 14px\">购买游戏脚本/注册码</span></font></b></u></a>&nbsp;&nbsp;&nbsp;<a target=\"_blank\" href=\"/User/User_Order.asp\"><u>查看我的订单</u></a>&nbsp;&nbsp;&nbsp;<a href=\"/User/User_Exchange.asp?Action=GetCard\"><u>查询注册码</u></a>&nbsp;&nbsp;&nbsp;<a title=\"有不懂，看帮助！\" target=\"_blank\" href=\"/bangzhu.html\"><u><b>使用帮助</b></u></a></td>\n\r            <td rowspan=\"2\" width=\"280\">\n\r<table border=\"0\" cellspacing=\"2\" width=\"100%\">\n\r    <tbody>\n\r        <tr>\n\r            <td class=\"productpic\" align=\"center\"><a title=\"大话2商人管家月卡\" href=\"/Shop/chongzhika/fuzhu/201102/35.html\" target=\"_blank\"><img class=\"pic5\" border=\"0\" src=\"/Shop/UploadPhotos/201102/2011020802571074.jpg\" width=\"130\" height=\"90\" alt=\"\" /></a></td>\n\r            <td align=\"left\"><font color=\"#8d0988\"><b>最新推荐脚本：</b></font><br><a title=\"大话2商人管家月卡\" href=\"/Shop/chongzhika/fuzhu/201102/35.html\" target=\"_blank\">大话2商人管家月卡</a><br />\n\r  特价：<font class=\"price\">￥120.00</font><br />\n\r            <a href=\"/Shop/ShoppingCart.asp?Action=Add&ProductID=35\" target=\"ShoppingCart\"><img border=\"0\" src=\"/Shop/images/ProductBuy.gif\" alt=\"\" /></a>&nbsp;<a title=\"大话2商人管家月卡\" href=\"/Shop/chongzhika/fuzhu/201102/35.html\" target=\"_blank\"><img border=\"0\" src=\"/Shop/images/ProductContent.gif\" alt=\"\" /></a></td>\n\r        </tr>\n\r    </tbody>\n\r</table></td>\n\r        </tr>\n\r                <tr>\n\r            <td width=\"420\" height=\"52\" align=left valign=\"middle\"><a target=\"_blank\" href=\"/User/User_Wholesale.asp\"><u><font color=\"#008000\"><b><span style=\"font-size: 14px\">注册码批发</span></b></font></u>（优惠多多）</a>&nbsp;&nbsp;客服一QQ:<font color=\"#d70f3e\">10657147</font> 客服二QQ:<font color=\"#d70f3e\">1357985972</font></td>\n\r        </tr>\n\r    </tbody>\n\r</table>\n\r<p>&nbsp;</p>";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 11;
objAD.CountView      = 0;
objAD.CountClick     = 0;
objAD.ADDIR          = "zanzhu";
ZoneAD_11.AddAD(objAD);

ZoneAD_11.Show();

