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_20 = new CodeZoneAD("ZoneAD_20");
ZoneAD_20.ZoneID      = 20;
ZoneAD_20.ZoneWidth   = 0;
ZoneAD_20.ZoneHeight  = 0;
ZoneAD_20.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 38;
objAD.ADType         = 4;
objAD.ADName         = "2008页头导航";
objAD.ImgUrl         = "";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<table style=\"WIDTH: 100%\" borderColor=#ffffff cellSpacing=2 cellPadding=0 width=\"100%\" bgColor=#ffffff border=0>\n\r          <tr>\n\r            <td>∣<A title=各类英语资料下载首页 href=\"/Soft/Index.html\" target=_blank><B>英语资料下载</B></A>∣<A title=考研英语资料下载 href=\"/Soft/kyyy/Index.html\" target=_blank>考研</A>∣<A title=大学4级6级英语资料，大学英语教程，新视野教程 href=\"/Soft/dxyy/Index.html\" target=_blank>大学</A>∣<A title=新标准，人教版高中课程 href=\"/Soft/gzyy/Index.html\" target=_blank>高中</A>∣<A title=人教版，新标准课程 href=\"/Soft/czyy/Index.html\" target=_blank>初中</A>∣<A title=剑桥少儿英语，小学同步英语教程 href=\"/Soft/xxyy/Index.html\" target=_blank>小学</A>∣<A title=托福，雅思，GRE考试资料下载 href=\"/Soft/cgyy/Index.html\" target=_blank>出国英语</A>∣<A title=公共英语，BEC英语，托业，口译，自学考试等资料下载 href=\"/Soft/cglx/Index.html\" target=_blank>综合考试</A>∣<A title=新概念英语，李阳，许国璋，赖世雄等资料下载 href=\"/Soft/rmjc/Index.html\" target=_blank>经典教程</A>∣<A title=各类行业英语资料 href=\"/Soft/qtyy/zyyy/Index.html\" target=_blank>专业英语</A>∣<A title=原声电影，小说，剧本 href=\"/Soft/ysdy/Index.html\" target=_blank>小说,电影</A>∣<A title=没有归类的其他英语资料 href=\"/Soft/qtyy/Index.html\" target=_blank>其他</A>∣<A title=其他外语资料下载首页 href=\"/rhyl/Index.html\" target=_blank><B>其他外语下载</B></A>∣<A title=日语资料，日语能力测试 href=\"/rhyl/ryxx/Index.html\" target=_blank>日语</A>∣<A title=韩语资料下载 href=\"/rhyl/hyxx/Index.html\" target=_blank>韩语</A>∣<A title=法语资料下载 href=\"/rhyl/fy/Index.html\" target=_blank>法语</A>∣<A title=德语资料下载 href=\"/rhyl/dy/Index.html\" target=_blank>德语</A>∣</td>\n\r          </tr>\n\r          <tr>\n\r            <td>∣<A title=资格证书考试资料下载首页 href=\"/cwkj/Index.html\" target=_blank><B>资格考试下载</B></A>∣<A title=CPA课程下载 href=\"/cwkj/zkks/Index.html\" target=_blank>注册会计师</A>∣<A title=中级会计职称课程 href=\"/cwkj/zjkj/Index.html\" target=_blank>中级会计职称</A>∣<A title=初级会计职称课程 href=\"/cwkj/cjkjzc/Index.html\" target=_blank>初级会计职称</A>∣<A title=会计从业资格课程 href=\"/cwkj/kjz/Index.html\" target=_blank>会计证&其他</A>∣<A title=造价工程师考试资料 href=\"/cwkj/zjgcs/Index.html\" target=_blank>造价工程师</A>∣<A title=司法考试资料 href=\"/cwkj/sfks/Index.html\" target=_blank>司法考试</A>∣<A title=各类外语及其他在线学习视频 href=\"/spzx/Index.html\" target=_blank><B>在线教育视频</B></A>∣<A title=有关英语学习的视频 href=\"/spzx/ShowClass.asp?ClassID=110\" target=_blank>英语视频</A>∣<A title=外语原声电影 href=\"/spzx/ShowSpecial.asp?SpecialID=17\" target=_blank>原声电影视频</A>∣<A title=日语教育视频教程 href=\"/spzx/ShowClass.asp?ClassID=111\" target=_blank>日语类视频</A>∣</td>\n\r          </tr>\n\r          <tr>\n\r            <td>∣<A title=外语学习文章交流首页 href=\"/sywz/Index.asp\" target=_blank><B>实用外语文摘</B></A>∣<A title=英文著作，美文在线阅读 href=\"/sywz/ShowClass.asp?ClassID=119\" target=_blank>英文精品阅读</A>∣<A title=大量英语学习文本 href=\"/sywz/ShowClass.asp?ClassID=143\" target=_blank>英语学习文摘</A>∣<A title=大量各类考试英语学习文本 href=\"/sywz/ShowClass.asp?ClassID=117\" target=_blank>考试英语文章</A>∣<A title=大量英文广播电台，电视台 href=\"/yytv.htm\" target=_blank><B>英语广播电视</B></A>∣<A title=日语，韩语广播电台，电视台 href=\"/rhtv.htm\" target=_blank>日语韩语广播电视</A>∣<A title=法语，德语广播电台，电视台 href=\"/fdtv.htm\" target=_blank>法语德语广播电视</A>∣<A title=休闲小游戏首页，有多类小游戏供您选择 href=\"/xxyl/Index.asp\" target=_blank><B>休闲小游戏</B></A>∣<A title=动脑筋小游戏 href=\"/xxyl/ShowClass.asp?ClassID=122\" target=_blank>益智游戏</A>∣<A title=帮助您浏览波波学习网站的全部资源以及所有的服务。 href=\"/wzdt.htm\" target=_blank><B>网站地图</B></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          = "jkgygg";
ZoneAD_20.AddAD(objAD);

ZoneAD_20.Show();
