📄 template0.js
字号:
function ObjectAD() {
this.ADID = 0;
this.ADType = 0;
this.ADName = "";
this.ADFileURL = "";
this.ADWidth = 0;
this.ADHeight = 0;
this.LinkURL = "";
this.LinkTitle = "";
this.OpenType = 0;
this.FlashWmode = true;
this.ADRight = 0;
}
function BannerZoneAD(_id) {
this.adNum = 0;
this.adDelay = 5000;
this.ID = _id;
this.ZoneID = 0;
this.ZoneName = "";
this.ZoneWidth = 0;
this.ZoneHeight = 0;
this.ShowType = 0;
this.DivName = "";
this.Div = null;
this.AllAD = new Array();
this.ShowAD = null;
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.AllAD.length <= 0) { return; }
if (this.ShowType > 0) {
this.ShowAD = this.AllAD[0];
return;
}
var arrRnd = new Array();
for (var i = 0; i < this.AllAD.length; i++) {
for(var j = 0; j < this.AllAD[i].ADRight; j++){
arrRnd[arrRnd.length] = this.AllAD[i];
}
}
var sum = arrRnd.length;
var rndNum = parseInt(Math.random() * sum);
this.ShowAD = arrRnd[rndNum];
}
function BannerZoneAD_Show() {
if (!this.AllAD) { return; }
this.GetShowAD();
if (this.ShowAD == null) return false;
this.DivName = "BannerZoneAD_Div" + this.ZoneID;
if (this.ShowAD.ADWidth) this.ShowAD.ADWidth = this.ZoneWidth;
if (this.ShowAD.ADHeight) this.ShowAD.ADHeight = this.ZoneHeight;
if (ADDir == "") ADDir = "AD";
if (this.ShowType == 2) {
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>");
}
}
this.Div = document.getElementById(this.DivName);
if (this.ShowType == 2 && this.AllAD.length>1) 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].ADWidth) this.AllAD[this.adNum].ADWidth = this.ZoneWidth
if (this.AllAD[this.adNum].ADHeight) this.AllAD[this.adNum].ADHeight = 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 == 0 || o.ADType == 1) {
o.ADFileURL = o.ADFileURL.toLowerCase()
if (o.ADFileURL.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.ADWidth + "'";
str += " height='" + o.ADHeight + "'";
if (o.style) str += " style='" + o.style + "'";
if (o.extfunc) str += " " + o.extfunc + " ";
str += ">";
str += "<param name='movie' value='" + o.ADFileURL + "'>";
if (o.FlashWmode) 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.ADWidth + "'";
str += " height='" + o.ADHeight + "'";
if (o.style) str += " style='" + o.style + "'";
if (o.extfunc) str += " " + o.extfunc + " ";
str += " src='" + o.ADFileURL + "'";
if (o.FlashWmode) 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.ADFileURL.indexOf(".gif") != - 1 || o.ADFileURL.indexOf(".jpg") != - 1 || o.ADFileURL.indexOf(".jpeg") != - 1 || o.ADFileURL.indexOf(".bmp") != - 1 || o.ADFileURL.indexOf(".png") != - 1) {
if (o.LinkURL) {
o.LinkURL = InstallDir + ADDir + "/ADCount.asp?Action=Click&ADID=" + o.ADID
str += "<a href='" + o.LinkURL + "' target='" + ((o.OpenType == 0) ? "_self" : "_blank") + "' title='" + o.LinkTitle + "'>";
}
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.ADFileURL + "'";
if (o.ADWidth) str += " width='" + o.ADWidth + "'";
if (o.ADHeight) str += " height='" + o.ADHeight + "'";
str += " border='0'>";
if (o.LinkURL) str += "</a>";
}
}
return str;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -