﻿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_26=new CodeZoneAD("ZoneAD_26");var objAD = new ObjectAD();
objAD.ADID= 26;objAD.ADType= 4;objAD.ADName= "网摘";objAD.ImgUrl= "";objAD.ImgWidth       = 0;objAD.ImgHeight      = 0;objAD.FlashWmode     = 0;objAD.ADIntro ="<!-- 添加网摘 -->\r\n<img style=\"MARGIN: 4px 2px -4px 0px\" alt=\"收藏本文到...\" \r\nsrc=\"http://www.53169.com/skin/53169/wangzai/quote.gif\" /><strong></strong>&nbsp;<a \r\nhref=\"javascript:d=document;t=d.selection?(d.selection.type!=\'None\'?d.selection.createRange().text:\'\'):(d.getSelection?d.getSelection():\'\');void(vivi=window.open(\'http://vivi.sina.com.cn/collect/icollect.php?pid=28&amp;title=\'+escape(d.title)+\'&amp;url=\'+escape(d.location.href)+\'&amp;desc=\'+escape(t),\'vivi\',\'scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes\'));vivi.focus();\"><img \r\nalt=新浪ViVi src=\"http://www.53169.com/skin/53169/wangzai/vivi.gif\" border=0 /></a> \r\n<a href=\"javascript:d=document;t=d.selection?(d.selection.type!=\'None\'?d.selection.createRange().text:\'\'):(d.getSelection?d.getSelection():\'\');void(yesky=window.open(\'http://hot.yesky.com/dp.aspx?t=\'+escape(d.title)+\'&amp;u=\'+escape(d.location.href)+\'&amp;c=\'+escape(t)+\'&amp;st=2\',\'yesky\',\'scrollbars=no,width=400,height=480,left=75,top=20,status=no,resizable=yes\'));yesky.focus();\"><img \r\nalt=天极网摘 src=\"http://www.53169.com/skin/53169/wangzai/yesky.gif\" border=0 /></a> \r\n<a href=\"javascript:d=document;t=d.selection?(d.selection.type!=\'None\'?d.selection.createRange().text:\'\'):(d.getSelection?d.getSelection():\'\');void(wozhai=window.open(\'http://www.wozhai.com/wozhai/Cento.asp#t=\'+escape(d.title)+\'&amp;u=\'+escape(d.location.href)+\'&amp;c=\'+escape(t),\'wozhai\',\'scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes\'));wozhai.focus();\"><img \r\nalt=我摘 src=\"http://www.53169.com/skin/53169/wangzai/wozhai.gif\" border=0 /></a> \r\n<a href=\"javascript:d=document;t=d.selection?(d.selection.type!=\'None\'?d.selection.createRange().text:\'\'):(d.getSelection?d.getSelection():\'\');void(keyit=window.open(\'http://my.poco.cn/fav/storeIt.php?t=\'+escape(d.title)+\'&amp;u=\'+escape(d.location.href)+\'&amp;c=\'+escape(t)+\'&amp;img=http://www.h-strong.com/blog/logo.gif\',\'keyit\',\'scrollbars=no,width=475,height=575,status=no,resizable=yes\'));keyit.focus();\"><img \r\nalt=POCO网摘 src=\"http://www.53169.com/skin/53169/wangzai/poco.gif\" border=0 /></a> \r\n<a href=\"javascript:d=document;t=d.selection?(d.selection.type!=\'None\'?d.selection.createRange().text:\'\'):(d.getSelection?d.getSelection():\'\');void(keyit=window.open(\'http://blogmark.bokee.com/jsp/key/quickaddkey.jsp?k=\'+encodeURI(d.title)+\'&amp;u=\'+encodeURI(d.location.href)+\'&amp;c=\'+encodeURI(t),\'keyit\',\'scrollbars=no,width=500,height=430,status=no,resizable=yes\'));keyit.focus();\"><img \r\nalt=博采网摘 src=\"http://www.53169.com/skin/53169/wangzai/bokee.gif\" border=0 /></a> \r\n<a href=\"javascript:u=location.href;t=document.title;void(open(\'http://www.YouNote.com/NoteIt.aspx?u=\'+escape(u)+\'&amp;t=\'+escape(t)+\'&amp;c=\'+escape(document.selection.createRange().text),\'网络书签\', \'toolbar=no,width=475,height=575,left=75,top=20,status=no,resizable=yes\'));\"><img \r\nalt=YouNote网摘 src=\"http://www.53169.com/skin/53169/wangzai/younote.gif\" border=0 /></a> \r\n<a href=\"javascript:t=document.title;u=location.href;e=document.selection?(document.selection.type!=\'None\'?document.selection.createRange().text:\'\'):(document.getSelection?document.getSelection():\'\');void(open(\'http://bookmark.hexun.com/post.aspx?title=\'+escape(t)+\'&amp;url=\'+escape(u)+\'&amp;excerpt=\'+escape(e),\'HexunBookmark\',\'scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes\'));\"><img \r\nalt=和讯网摘 src=\"http://www.53169.com/skin/53169/wangzai/hexun.gif\" border=0 /></a>\r\n<a href=\"javascript:location.href=\'http://www.google.com/bookmarks/mark?op=add&amp;bkmk=\'+encodeURIComponent(location.href)+\'&amp;title=\'+encodeURIComponent(document.title)\" target=\"_blank\"><img \r\nalt=Google书签 src=\"http://www.53169.com/skin/53169/wangzai/google.gif\" border=0 /></a> \r\n<a onClick=\"window.open(\'http://myweb.cn.yahoo.com/popadd.html?url=\'+encodeURIComponent(document.location.href)+\'&amp;title=\'+encodeURIComponent(document.title), \'Yahoo\',\'scrollbars=yes,width=780,height=455,left=80,top=80,status=yes,resizable=yes\');\"><img \r\nalt=Yahoo书签 src=\"http://www.53169.com/skin/53169/wangzai/yahoo.gif\" border=0 /></a> \r\n\r\n<a href=\'javascript:u=location.href;t=document.title;c%20=%20\"\"%20+%20(window.getSelection%20? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text);var url=\"http://cang.baidu.com/do/add?it=\"+encodeURIComponent(t)+\"&amp;iu=\"+encodeURIComponent(u)+\"&amp;dc=\"+encodeURIComponent(c)+\"&amp;fr=ien#nw=1\";window.open(url,\"_blank\",\"scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\"); void 0\'><img alt=添加到百度搜藏 src=\"http://www.53169.com/skin/53169/wangzai/baidu.gif\" border=0 /></a> \r\n\r\n<a href=\"javascript:window.open(\'http://shuqian.qq.com/post?from=3&title=\'+encodeURIComponent(document.title)+\'&uri=\'+encodeURIComponent(document.location.href)+\'&jumpback=2&noui=1\',\'favit\',\'width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes\');void(0)\"><img alt=QQ书签 src=\"http://www.53169.com/skin/53169/wangzai/qq.gif\" border=0></a>\r\n<!-- 添加网摘结束 -->";objAD.LinkUrl        = "";objAD.LinkTarget     = 0;objAD.LinkAlt        = "";objAD.Priority       = 1;objAD.CountView      = false;objAD.CountClick     = false;objAD.OverdueDate    = "2308/11/14";objAD.InstallDir     = "/";objAD.ADDIR= "IAA";ZoneAD_26.AddAD(objAD);ZoneAD_26.ZoneID=26;ZoneAD_26.ZoneWidth=468;ZoneAD_26.ZoneHeight=60;ZoneAD_26.ShowType=1;ZoneAD_26.Show();