⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 4.js

📁 本软件为销售管理软件
💻 JS
字号:
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  = "";
}

function BannerZoneAD(_id) {
  /* Define Constants */
  this.adNum       = 0;
  this.adDelay     = 6000;

  /* Define Common Variables*/
  this.ID          = _id;
  this.ZoneID      = 0;
  this.ZoneName    = "";
  this.ZoneWidth   = 0;
  this.ZoneHeight  = 0;
  this.ShowType    = 1;
  this.DivName     = "";
  this.Div         = null;

  /* Define Unique Variables*/

  /* Define Objects */
  this.AllAD       = new Array();
  this.ShowAD      = null;

  /* Define Functions */
  this.AddAD       = BannerZoneAD_AddAD;
  this.GetShowAD   = BannerZoneAD_GetShowAD;
  this.Show        = BannerZoneAD_Show;
  this.LoopShow    = BannerZoneAD_LoopShow;

}

function BannerZoneAD_AddAD(_AD) {
  this.AllAD[this.AllAD.length] = _AD;
}

function BannerZoneAD_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 BannerZoneAD_Show() {
  if (!this.AllAD) {
    return;
  } else {
    this.GetShowAD();
  }

  if (this.ShowAD == null) return false;
  this.DivName = "BannerZoneAD_Div" + this.ZoneID;
  if (this.ShowAD.ImgWidth) this.ShowAD.ImgWidth = this.ZoneWidth
  if (this.ShowAD.ImgHeight) this.ShowAD.ImgHeight = this.ZoneHeight
  if (this.ShowType == 3) {
    document.write("<div id='" + this.DivName + "' style='visibility:visible; z-index:1; width:" + this.ZoneWidth + "; height:" + this.ZoneHeight + "; filter: revealTrans(duration=2,transition=20);'>" + AD_Content(this.ShowAD) + "</div>");
  } else {
    if (navigator.appName == "Netscape") {
      document.write("<layer id='" + this.DivName + "' width='" + this.ZoneWidth + "' height='" + this.ZoneHeight + "'>" + AD_Content(this.ShowAD) + "</layer>");
    } else {
      document.write("<div id='" + this.DivName + "' style='visibility:visible; z-index:1; width:" + this.ZoneWidth + "; height:" + this.ZoneHeight + ";'>" + AD_Content(this.ShowAD) + "</div>");
    }
    if (this.ShowAD.CountView) {
      document.write ("<script src='" + this.ShowAD.InstallDir + "1-1gg/ADCount.asp?Action=View&ADID=" + this.ShowAD.ADID + "'></" + "script>")
    }
  }
  this.Div = document.getElementById(this.DivName);
  if (this.ShowType == 3) this.LoopShow();
}

function BannerZoneAD_LoopShow() {
  if(this.adNum<this.AllAD.length-1) this.adNum++ ; 
  else this.adNum=0; 
  this.Div.filters.revealTrans.Transition=Math.floor(Math.random()*23); 
  this.Div.filters.revealTrans.apply(); 
  if (this.AllAD[this.adNum].ImgWidth) this.AllAD[this.adNum].ImgWidth = this.ZoneWidth
  if (this.AllAD[this.adNum].ImgHeight) this.AllAD[this.adNum].ImgHeight = this.ZoneHeight
  this.Div.innerHTML=AD_Content(this.AllAD[this.adNum]);
  this.Div.filters.revealTrans.play() 
  this.Div.timer=setTimeout(this.ID+".LoopShow()",this.adDelay);
}

function AD_Content(o) {
  var str = "";
  if (o.ADType == 1 || o.ADType == 2) {
    o.ImgUrl = o.ImgUrl.toLowerCase()
    if (o.ImgUrl.indexOf(".swf") !=  - 1) {
      str = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0'";
      str += " name='AD_" + o.ADID + "' id='AD_" + o.ADID + "'";
      str += " width='" + o.ImgWidth + "'";
      str += " height='" + o.ImgHeight + "'";
      if (o.style) str += " style='" + o.style + "'";
      if (o.extfunc) str += " " + o.extfunc + " ";
      str += ">";
      str += "<param name='movie' value='" + o.ImgUrl + "'>";
      if (o.FlashWmode == 1) str += "<param name='wmode' value='Transparent'>";
      if (o.play) str += "<param name='play' value='" + o.play + "'>";
      if (typeof(o.loop) != "undefined") str += "<param name='loop' value='" + o.loop + "'>";
      str += "<param name='quality' value='autohigh'></object>";
      str = "<embed ";
      str += " name='AD_" + o.ADID + "' id='AD_" + o.ADID + "'";
      str += " width='" + o.ImgWidth + "'";
      str += " height='" + o.ImgHeight + "'";
      if (o.style) str += " style='" + o.style + "'";
      if (o.extfunc) str += " " + o.extfunc + " ";
      str += " src='" + o.ImgUrl + "'";
      if (o.FlashWmode == 1) str += " wmode='Transparent'";
      if (o.play) str += " play='" + o.play + "'";
      if (typeof(o.loop) != "undefined") str += " loop='" + o.loop + "'";
      str += " quality='autohigh'"
      str += " pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed>";
      str += "</object>";
    } else if (o.ImgUrl.indexOf(".gif") !=  - 1 || o.ImgUrl.indexOf(".jpg") !=  - 1 || o.ImgUrl.indexOf(".jpeg") !=  - 1 || o.ImgUrl.indexOf(".bmp") !=  - 1 || o.ImgUrl.indexOf(".png") !=  - 1) {
      if (o.LinkUrl) {
        if (o.CountClick) o.LinkUrl = o.InstallDir + "1-1gg/ADCount.asp?Action=Click&ADID=" + o.ADID
        str += "<a href='" + o.LinkUrl + "' target='" + ((o.LinkTarget == 0) ? "_self" : "_blank") + "' title='" + o.LinkAlt + "'>";
      }
      str += "<img ";
      str += " name='AD_" + o.ADID + "' id='AD_" + o.ADID + "'";
      if (o.style) str += " style='" + o.style + "'";
      if (o.extfunc) str += " " + o.extfunc + " ";
      str += " src='" + o.ImgUrl + "'";
      if (o.ImgWidth) str += " width='" + o.ImgWidth + "'";
      if (o.ImgHeight) str += " height='" + o.ImgHeight + "'";
      str += " border='0'>";
      if (o.LinkUrl) str += "</a>";
    }
  } else if (o.ADType == 3 || o.ADType == 4) {
    str = o.ADIntro
  } else if (o.ADType == 5) {
    str = "<iframe id='" + "AD_" + o.ADID + "' marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no width=100% height=100% src='" + o.ADIntro + "'>wait</iframe>";
  }
  return str;
}


var ZoneAD_9 = new BannerZoneAD("ZoneAD_9");
ZoneAD_9.ZoneID      = 9;
ZoneAD_9.ZoneWidth   = 750;
ZoneAD_9.ZoneHeight  = 70;
ZoneAD_9.ShowType    = 1;

var objAD = new ObjectAD();
objAD.ADID           = 13;
objAD.ADType         = 4;
objAD.ADName         = "sou";
objAD.ImgUrl         = "";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<iframe border=0 align=center vspace=0 hspace=0 name=searchbar marginwidth=0 marginheight=0 framespacing=0 frameborder=0 scrolling=no width=760 height=80 src=\"http://template.union.163.com/search/tpl1.jsp?ID=taiconcn&NO=25818&sessionID=2280ic160774540ffai000000&codeDate=2005n7y8h&logo=0&select=0&SearchHeight=80&SearchWidth=760&boxColor=000000&txtColor=00ff00&borderColor=333333&Key=%u7F8E%u5973%u5171%u6D74:%u88F8%u4F53%u8DF3%u6C34:%u95F4%u8C0D%u5185%u88E4:%u7537%u5993%u8C03%u67E5:%u88F8%u821E%u6C42%u96E8:%u5185%u88E4%u63D2%u4EF6:%u62CD%u5356%u53CC%u4E73:%u73B0%u4EE3%u6625%u5BAB:%u9686%u80F8%u7206%u88C2:%u797C%u9A91%u547C%u5401:%u8427%u8537%u5288%u817F:%u9177%u5211%u63ED%u79D8:%u8D31%u4EBA%u5F81%u5A5A:%u5973%u4EBA%u5C41%u80A1:%u5947%u7279%u8FCE%u5BBE:%u9519%u4F4D%u80F8%u7F69:%u6027%u7231%u6028%u8A00:%u4E30%u80F8%u79D8%u65B9:%u5B50%u5BAB%u6A21%u578B:%u53D8%u6001%u51CF%u80A5:%u88F8%u4F53%u6297%u8BAE:%u7F8E%u5973%u51FA%u6D74:%u88F8%u4F53%u6563%u6B65:%u7537%u751F%u9686%u4E73:%u604B%u7231%u5C34%u5C2C:%u534E%u4ED4%u6027%u53F2:%u5973%u661F%u5931%u8EAB\"></iframe><br>\n\r<iframe scrolling=\'no\' frameborder=\'0\' marginheight=\'0\' marginwidth=\'0\' width=760 height=80 src=http://union.kingsoft.com/union/db/style_286.html?uid=9437&adid=286&adtype=6></iframe>					";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 1;
objAD.CountView      = 1;
objAD.CountClick     = 0;
objAD.InstallDir     = "/";
ZoneAD_9.AddAD(objAD);

var objAD = new ObjectAD();
objAD.ADID           = 12;
objAD.ADType         = 4;
objAD.ADName         = "photo";
objAD.ImgUrl         = "";
objAD.ImgWidth       = 0;
objAD.ImgHeight      = 0;
objAD.FlashWmode     = 0;
objAD.ADIntro        = "<iframe WIDTH=750 HEIGHT=70 align=center MARGINWIDTH=0 Name=union163com MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no src=\"http://news2.163.com/product/photo/tpl2.jsp?ID=taiconcn&NO=25818&codeDate=2005n6y9h&productid=0422\"></iframe><br>\n\r<iframe scrolling=\'no\' frameborder=\'0\' marginheight=\'0\' marginwidth=\'0\' width=760 height=80 src=http://union.kingsoft.com/union/db/style_286.html?uid=9437&adid=286&adtype=6></iframe>";
objAD.LinkUrl        = "";
objAD.LinkTarget     = 1;
objAD.LinkAlt        = "";
objAD.Priority       = 1;
objAD.CountView      = 1;
objAD.CountClick     = 0;
objAD.InstallDir     = "/";
ZoneAD_9.AddAD(objAD);

ZoneAD_9.Show();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -