📄 15.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 = "";
this.ADDIR = "";
}
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.ShowAD.ADDIR=="") this.ShowAD.ADDIR = "AD"
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 + this.ShowAD.ADDIR + "/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 + o.ADDIR + "/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_15 = new BannerZoneAD("ZoneAD_15");
ZoneAD_15.ZoneID = 15;
ZoneAD_15.ZoneWidth = 1;
ZoneAD_15.ZoneHeight = 1;
ZoneAD_15.ShowType = 1;
var objAD = new ObjectAD();
objAD.ADID = 16;
objAD.ADType = 4;
objAD.ADName = "新闻";
objAD.ImgUrl = "";
objAD.ImgWidth = 0;
objAD.ImgHeight = 0;
objAD.FlashWmode = 0;
objAD.ADIntro = "<table cellSpacing=1 cellPadding=0 width=590 align=center bgColor=#cccccc border=0>\n\r <tr>\n\r <td width=125 bgColor=#ffffff height=110>\n\r <table height=82 cellSpacing=0 cellPadding=0 width=120 align=center border=0>\n\r <tr>\n\r <td align=middle height=83><A href=\"/yszt/xw/200602/5665.html\" target=_blank><IMG height=80 src=\"http://photocdn.sohu.com/20060206/Img241688914.jpg??\" width=100 border=0></A></td>\n\r </tr>\n\r <tr>\n\r <td align=middle height=20><SPAN style=\"FONT-SIZE: 12px\"><A class=tuiguang href=\"/yszt/xw/200602/5665.html\" target=_blank>新搜索引擎挑战google</A></SPAN></td>\n\r </tr>\n\r </table>\n\r </td>\n\r <td width=125 bgColor=#ffffff height=110>\n\r <table height=82 cellSpacing=0 cellPadding=0 width=120 align=center border=0>\n\r <tr>\n\r <td align=middle height=83><A href=\"http://www.chinaccna.com/office/Excel/200602/5662.html\" target=_blank><IMG height=80 src=\"http://photocdn.sohu.com/20060205/Img241672151.jpg\" width=100 border=0></A></td>\n\r </tr>\n\r <tr>\n\r <td align=middle height=20><SPAN style=\"FONT-SIZE: 12px\"><A href=\"/office/Excel/200602/5662.html\">Excel文档安全技巧</A></SPAN></td>\n\r </tr>\n\r </table>\n\r </td>\n\r <td align=right width=340 bgColor=#ffffff rowSpan=2>\n\r <table class=tuiguang cellSpacing=0 cellPadding=0 width=\"98%\" border=0>\n\r <tr>\n\r <td align=middle height=18><STRONG>热门新闻</STRONG></td>\n\r </tr>\n\r <tr>\n\r <td class=tuiguang style=\"FONT-SIZE: 14px; LINE-HEIGHT: 18px\"><FONT color=#f98200>01</FONT> <A href=\"/yszt/bd/200602/5950.html\" target=_blank><FONT color=red>一个Windows危急漏洞价值1万美金</FONT></A><BR><FONT color=#f98200>02</FONT> <A href=\"/yszt/xw/200602/5936.html\" target=_blank>美专家公布所谓“中国黑客”攻击美军网站详情</A><BR><FONT color=#f98200>03</FONT> <A href=\"/yszt/xw/200602/5942.html\" target=_blank>微软将推出手机使用的免费网络语音软件</A><BR><FONT color=#f98200>04</FONT> <A href=\"/yszt/xw/200602/5944.html\" target=_blank>密码终结者?微软专家谈InfoCard</A><BR><FONT color=#f98200>05</FONT> <A href=\"/yszt/xw/200602/5898.html\" target=_blank>同室操戈:IE 7与Windows更新冲突?</A><BR></td>\n\r </tr>\n\r <tr>\n\r <td align=middle height=18><STRONG>热门教程</STRONG></td>\n\r </tr>\n\r <tr>\n\r <td class=tuiguang style=\"FONT-SIZE: 14px; LINE-HEIGHT: 18px\"><FONT color=#f98200>01</FONT> <A href=\"/yszt/xw/200602/5944.html\" target=_blank><FONT color=red>[组图]ADSL Modem设置含义及功能全知道</FONT></A><BR><FONT color=#f98200>02</FONT> <A href=\"/networky/fhq/200602/5935.html\" target=_blank>Internet防火墙基础技术综述</A><BR><FONT color=#f98200>03</FONT> <A href=\"/networky/gli/200602/5934.html\" target=_blank>确保PC机安全的五个关键步骤</A><BR><FONT color=#f98200>04</FONT> <A href=\"/networky/swf/aswf/200602/5919.html\">从交换机原理看广播风暴的几种原因</A><BR><FONT color=#f98200>05</FONT> <A href=\"/networky/swf/aswf/200602/5920.html\" target=_blank>详细解说超过255台电脑的内网IP规划</A><BR></td>\n\r </tr>\n\r </table>\n\r </td>\n\r </tr>\n\r <tr>\n\r <td width=125 bgColor=#ffffff height=110>\n\r <table height=82 cellSpacing=0 cellPadding=0 width=120 align=center border=0>\n\r <tr>\n\r <td align=middle height=83><A href=\"/yszt/bd/200602/5640.html\" target=_blank><IMG height=80 src=\"http://photocdn.sohu.com/20060205/Img241674788.jpg??\" width=100 border=0></A></td>\n\r </tr>\n\r <tr>\n\r <td align=middle height=20><SPAN style=\"FONT-SIZE: 12px\"><A href=\"/yszt/bd/200602/5640.html\">通过贴吧疯狂传播</A></SPAN></td>\n\r </tr>\n\r </table>\n\r </td>\n\r <td width=125 bgColor=#ffffff height=110>\n\r <table height=82 cellSpacing=0 cellPadding=0 width=120 align=center border=0>\n\r <tr>\n\r <td align=middle height=83><A href=\"/networky/gli/200602/5666.html\" target=_blank><IMG height=80 src=\"http://photocdn.sohu.com/20060205/Img241672226.jpg\" width=100 border=0></A></td>\n\r </tr>\n\r <tr>\n\r <td align=middle height=20><SPAN style=\"FONT-SIZE: 12px\"><A class=tuiguang href=\"/networky/gli/200602/5666.html\" target=_blank>BT下载怎样穿透防火墙</A></SPAN></td>\n\r </tr>\n\r </table>\n\r </td>\n\r </tr>\n\r <tr>\n\r <td bgColor=#ffffff colSpan=3>\n\r <table cellSpacing=5 cellPadding=0 width=\"100%\" border=0>\n\r <tr align=middle>\n\r <td style=\"FONT-SIZE: 14px\" width=\"16%\"><STRONG>欢迎访问:</STRONG></td>\n\r <td style=\"FONT-SIZE: 14px\" width=\"14%\"><SPAN class=style4><A href=\"/yszt/Index.html\" target=_blank>业界动态</A></SPAN></td>\n\r <td style=\"FONT-SIZE: 14px\" width=\"14%\"><SPAN class=style4><A href=\"/Article/Index.html\" target=_blank>操作系统</A></SPAN></td>\n\r <td style=\"FONT-SIZE: 14px\" width=\"14%\"><SPAN class=style4><A href=\"/shipin/Index.asp\" target=_blank><SPAN class=style5>视频教程</SPAN></A></SPAN></td>\n\r <td style=\"FONT-SIZE: 14px\" width=\"14%\"><SPAN class=style4><A href=\"/Soft/Index.asp\" target=_blank>书籍下载</A></SPAN></td>\n\r <td style=\"FONT-SIZE: 14px\" width=\"14%\"><SPAN class=style4><A href=\"/MCSE1.htm\" target=_blank><SPAN class=style5>考试题库</SPAN></A></SPAN></td>\n\r <td style=\"FONT-SIZE: 14px\" width=\"14%\"><SPAN class=style4><A href=\"http://bbs.chinaccna.com/\" target=_blank>技术论坛</A></SPAN></td>\n\r </tr>\n\r </table>\n\r </td>\n\r </tr>\n\r </table>";
objAD.LinkUrl = "";
objAD.LinkTarget = 1;
objAD.LinkAlt = "";
objAD.Priority = 1;
objAD.CountView = 0;
objAD.CountClick = 0;
objAD.InstallDir = "/";
objAD.ADDIR = "AD";
ZoneAD_15.AddAD(objAD);
ZoneAD_15.Show();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -