﻿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       = "";
  this.OverdueDate = "";
}

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) {
  var date = new Date();
  var getdate = date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date.getDate();
  var today = new Date(getdate);
  var overdueDate = new Date(_AD.OverdueDate);
  if(today <= overdueDate)
  {
    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_7=new CodeZoneAD("ZoneAD_7");var objAD = new ObjectAD();
objAD.ADID= 7;objAD.ADType= 4;objAD.ADName= "heaton_留学TOP";objAD.ImgUrl= "";objAD.ImgWidth       = 0;objAD.ImgHeight      = 0;objAD.FlashWmode     = 0;objAD.ADIntro ="<ul>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/ \" title=\"地址：北京市朝阳区光华东里8号院中海广场2号楼5层 咨询热线：010-65883030 传真：010-65881625\" target=\"_blank\" rel=\"nofollow\">北京</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/ \" title=\"地址：重庆市渝中区邹容路50号半岛国际商务大厦18-D室 电话：023-86526393 传真：023-86214840\" target=\"_blank\" rel=\"nofollow\">重庆</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/ \"title=\"地址：甘肃省兰州市城关区庆阳路350号世纪广场B座21楼2103室(南关什字东北角) 电话：0931-8441641/42 传真：0931-8441643\" target=\"_blank\" rel=\"nofollow\">兰州</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/ \"title=\"地址：山西省太原市府西街9号王府商务大厦A座10－I室 电话：0351-5228798/96 传真：0351-3377266\" target=\"_blank\" rel=\"nofollow\">山西</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/ \" title=\"地址：新疆乌鲁木齐市新华北路中天广场33楼W座 电话：0991-2363288\" target=\"_blank\" rel=\"nofollow\">新疆</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/ \"title=\"地址：南京市新街口商茂世纪广场20楼C6座 电话：025-86890165,86890175 传真：025-86890483\" target=\"_blank\" rel=\"nofollow\">南京</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/ \"title=\"地址：辽宁省沈阳市和平北大街69号总统大厦A座18层 电话：024-22815960/1/2/3 传真：024-22815960/1/2/3-608\" target=\"_blank\" rel=\"nofollow\">沈阳</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">银川</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">广西</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\">湖北</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">江西</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">福建</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\">山东</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">辽宁</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">内蒙</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">湖南</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">陕西</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">吉林</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">浙江</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">广东</a>\r\n</li>\r\n<li style=\"background:url(\'/images/heaton/huangbian.gif\') no-repeat 38px 0px\">\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">四川</a>\r\n</li>\r\n<li>\r\n<a href=\"http://www.yolx.cn/lxwm/\" rel=\"nofollow\">江苏</a>\r\n</li>\r\n</ul>";objAD.LinkUrl        = "";objAD.LinkTarget     = 0;objAD.LinkAlt        = "";objAD.Priority       = 1;objAD.CountView      = false;objAD.CountClick     = false;objAD.OverdueDate    = "2015/01/29";objAD.InstallDir     = "/";objAD.ADDIR= "IAA";ZoneAD_7.AddAD(objAD);ZoneAD_7.ZoneID=7;ZoneAD_7.ZoneWidth=468;ZoneAD_7.ZoneHeight=60;ZoneAD_7.ShowType=1;ZoneAD_7.Show();
