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_9 = new CodeZoneAD("ZoneAD_9");
ZoneAD_9.ZoneID      = 9;
ZoneAD_9.ZoneWidth   = 0;
ZoneAD_9.ZoneHeight  = 0;
ZoneAD_9.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 9;
objAD.ADType         = 4;
objAD.ADName         = "页面头部flash广告";
objAD.ImgUrl         = "";
objAD.InstallDir     = "http://www.wxjshx.com/";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<SCRIPT type=\"text/javascript\">\n\r								  var focus_width=787\n\rvar focus_height=242\n\rvar text_height=0\n\rvar swf_height = focus_height+text_height\n\r\n\rvar pics=\'/guanggao/201101/ad/hsj-zz.jpg|/guanggao/201101/ad/rlzz_xjy.jpg|/guanggao/201101/ad/hnj.jpg|/guanggao/201101/ad/bghgzz.jpg\'\n\rvar links=\'http://www.0510jshx.com/huodong/hsj/|http://www.wxrlyy.com/huodong/xjy/|http://www.wxjshx.com.cn/huodong/hnj/|http://rl.wxjshx.com/ssjc/a/2011/0928/15728.html\'\n\rvar texts=\'\'\n\r\n\rdocument.write(\'<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"\'+ focus_width +\'\" height=\"\'+ swf_height +\'\">\');\n\rdocument.write(\'<param name=\"allowScriptAccess\" value=\"sameDomain\"><param name=\"movie\" value=\"/images/sgpicviewer.swf\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"#ffffff\">\');\n\rdocument.write(\'<param name=\"menu\" value=\"false\"><param name=wmode value=\"opaque\">\');\n\rdocument.write(\'<param name=\"FlashVars\" value=\"pics=\'+pics+\'&links=\'+links+\'&texts=\'+texts+\'&borderwidth=\'+focus_width+\'&borderheight=\'+focus_height+\'&textheight=\'+text_height+\'\">\');\n\rdocument.write(\'<embed src=\"/images/sgpicviewer.swf\" wmode=\"opaque\" FlashVars=\"pics=\'+pics+\'&links=\'+links+\'&texts=\'+texts+\'&borderwidth=\'+focus_width+\'&borderheight=\'+focus_height+\'&textheight=\'+text_height+\'\" menu=\"false\" bgcolor=\"#000000\" quality=\"high\" width=\"\'+ focus_width +\'\" height=\"\'+ swf_height +\'\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\');		document.write(\'</object>\');\n\r</SCRIPT>";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 1;
objAD.CountView      = 1;
objAD.CountClick     = 0;
objAD.ADDIR          = "GuangGao";
ZoneAD_9.AddAD(objAD);

ZoneAD_9.Show();
<!--|/guanggao/201101/ad/gfj-zz.jpg |http://www.wxjshx.com/huodong/gfj/ -->

