PageSourceSearch

http://jzrb.com/AD/201301/136.js

js jzrb.com collected 2026-10-05 18:05:31 UTC 7,979 bytes, 207 lines download raw bytes

1function ObjectAD() {
2  /* Define Variables*/
3  this.ADID        = 0;
4  this.ADType      = 0;
5  this.ADName      = "";
6  this.ImgUrl      = "";
7  this.ImgWidth    = 0;
8  this.ImgHeight   = 0;
9  this.FlashWmode  = 0;
10  this.LinkUrl     = "";
11  this.LinkTarget  = 0;
12  this.LinkAlt     = "";
13  this.Priority    = 0;
14  this.CountView   = 0;
15  this.CountClick  = 0;
16  this.InstallDir  = "";
17  this.ADDIR       = "";
18}
19
20function BannerZoneAD(_id) {
21  /* Define Constants */
22  this.adNum       = 0;
23  this.adDelay     = 6000;
24
25  /* Define Common Variables*/
26  this.ID          = _id;
27  this.ZoneID      = 0;
28  this.ZoneName    = "";
29  this.ZoneWidth   = 0;
30  this.ZoneHeight  = 0;
31  this.ShowType    = 1;
32  this.DivName     = "";
33  this.Div         = null;
34
35  /* Define Unique Variables*/
36
37  /* Define Objects */
38  this.AllAD       = new Array();
39  this.ShowAD      = null;
40
41  /* Define Functions */
42  this.AddAD       = BannerZoneAD_AddAD;
43  this.GetShowAD   = BannerZoneAD_GetShowAD;
44  this.Show        = BannerZoneAD_Show;
45  this.LoopShow    = BannerZoneAD_LoopShow;
46
47}
48
49function BannerZoneAD_AddAD(_AD) {
50  this.AllAD[this.AllAD.length] = _AD;
51}
52
53function BannerZoneAD_GetShowAD() {
54  if (this.ShowType > 1) {
55    this.ShowAD = this.AllAD[0];
56    return;
57  }
58  var num = this.AllAD.length;
59  var sum = 0;
60  for (var i = 0; i < num; i++) {
61    sum = sum + this.AllAD[i].Priority;
62  }
63  if (sum <= 0) {return ;}
64  var rndNum = Math.random() * sum;
65  i = 0;
66  j = 0;
67  while (true) {
68    j = j + this.AllAD[i].Priority;
69    if (j >= rndNum) {break;}
70    i++;
71  }
72  this.ShowAD = this.AllAD[i];
73}
74
75function BannerZoneAD_Show() {
76  if (!this.AllAD) {
77    return;
78  } else {
79    this.GetShowAD();
80  }
81
82  if (this.ShowAD == null) return false;
83  this.DivName = "BannerZoneAD_Div" + this.ZoneID;
84  if (!this.ShowAD.ImgWidth) this.ShowAD.ImgWidth = this.ZoneWidth
85  if (!this.ShowAD.ImgHeight) this.ShowAD.ImgHeight = this.ZoneHeight
86  if (this.ShowAD.ADDIR=="") this.ShowAD.ADDIR = "AD"
87  if (this.ShowType == 3) {
88    if(document.all) {
89      document.write("<div id='" + this.DivName + "' style='visibility:visible; z-index:1; width:" + this.ZoneWidth + "px; height:" + this.ZoneHeight + "px; filter: revealTrans(duration=2,transition=20);'>" + AD_Content(this.ShowAD) + "</div>");
90    }
91    else {
92      document.write("<div id='" + this.DivName + "' style='visibility:visible; z-index:1; width:" + this.ZoneWidth + "px; height:" + this.ZoneHeight + "px'>" + AD_Content(this.ShowAD) + "</div>");
93    }
94  } 
95  else {
96    document.write("<div id='" + this.DivName + "' style='visibility:visible; z-index:1; width:" + this.ZoneWidth + "px; height:" + this.ZoneHeight + "px;'>" + AD_Content(this.ShowAD) + "</div>");
97    if (this.ShowAD.CountView) {
98      document.write ("<script src='" + this.ShowAD.InstallDir + this.ShowAD.ADDIR + "/ADCount.asp?Action=View&ADID=" + this.ShowAD.ADID + "'></" + "script>")
99    }
100  }
101  this.Div = document.getElementById(this.DivName);
102  if (this.ShowType == 3) this.LoopShow();
103}
104
105function BannerZoneAD_LoopShow() {
106  if(document.all) {
107    if(this.adNum<this.AllAD.length-1) this.adNum++ ; 
108    else this.adNum=0; 
109    this.Div.filters.revealTrans.Transition=Math.floor(Math.random()*23); 
110    this.Div.filters.revealTrans.apply(); 
111    if (this.AllAD[this.adNum].ImgWidth) this.AllAD[this.adNum].ImgWidth = this.ZoneWidth
112    if (this.AllAD[this.adNum].ImgHeight) this.AllAD[this.adNum].ImgHeight = this.ZoneHeight
113    this.Div.innerHTML=AD_Content(this.AllAD[this.adNum]);
114    this.Div.filters.revealTrans.play() 
115    this.Div.timer=setTimeout(this.ID+".LoopShow()",this.adDelay);
116  }
117  else {
118    if(this.adNum<this.AllAD.length-1) this.adNum++ ; 
119    else this.adNum=0;
120    if (this.AllAD[this.adNum].ImgWidth) this.AllAD[this.adNum].ImgWidth = this.ZoneWidth
121    if (this.AllAD[this.adNum].ImgHeight) this.AllAD[this.adNum].ImgHeight = this.ZoneHeight
122    this.Div.innerHTML=AD_Content(this.AllAD[this.adNum]);
123    this.Div.timer=setTimeout(this.ID+".LoopShow()",this.adDelay);
124  }
125}
126
127function AD_Content(o) {
128  var str = "";
129  if (o.ADType == 1 || o.ADType == 2) {
130  imgurl = o.ImgUrl .toLowerCase()
131    if (o.InstallDir.indexOf("http://") != - 1) imgurl = o.InstallDir.substr(0, o.InstallDir.length - 1) + imgurl;
132    if (imgurl.indexOf(".swf") !=  - 1) {
133      str = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/s
133hockwave/cabs/flash/swflash.cab#version=7,0,0,0'";
134      str += " name='AD_" + o.ADID + "' id='AD_" + o.ADID + "'";
135      str += " width='" + o.ImgWidth + "px'";
136      str += " height='" + o.ImgHeight + "px'";
137      if (o.style) str += " style='" + o.style + "'";
138      if (o.extfunc) str += " " + o.extfunc + " ";
139      str += ">";
140      str += "<param name='movie' value='" + imgurl + "'>";
141      if (o.FlashWmode == 1) str += "<param name='wmode' value='Transparent'>";
142      if (o.play) str += "<param name='play' value='" + o.play + "'>";
143      if (typeof(o.loop) != "undefined") str += "<param name='loop' value='" + o.loop + "'>";
144      str += "<param name='quality' value='autohigh'>";
145      str += "<embed ";
146      str += " name='AD_" + o.ADID + "' id='AD_" + o.ADID + "'";
147      str += " width='" + o.ImgWidth + "px'";
148      str += " height='" + o.ImgHeight + "px'";
149      if (o.style) str += " style='" + o.style + "'";
150      if (o.extfunc) str += " " + o.extfunc + " ";
151      str += " src='" + imgurl + "'";
152      if (o.FlashWmode == 1) str += " wmode='Transparent'";
153      if (o.play) str += " play='" + o.play + "'";
154      if (typeof(o.loop) != "undefined") str += " loop='" + o.loop + "'";
155      str += " quality='autohigh'"
156      str += " pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed>";
157      str += "</object>";
158    } else if (imgurl.indexOf(".gif") !=  - 1 || imgurl.indexOf(".jpg") !=  - 1 || imgurl.indexOf(".jpeg") !=  - 1 || imgurl.indexOf(".bmp") !=  - 1 || imgurl.indexOf(".png") !=  - 1) {
159      if (o.LinkUrl) {
160        if (o.CountClick) o.LinkUrl = o.InstallDir + o.ADDIR + "/ADCount.asp?Action=Click&ADID=" + o.ADID
161        str += "<a href='" + o.LinkUrl + "' target='" + ((o.LinkTarget == 0) ? "_self" : "_blank") + "' title='" + o.LinkAlt + "'>";
162      }
163      str += "<img ";
164      str += " name='AD_" + o.ADID + "' id='AD_" + o.ADID + "'";
165      if (o.style) str += " style='" + o.style + "'";
166      if (o.extfunc) str += " " + o.extfunc + " ";
167      str += " src='" + imgurl + "'";
168      if (o.ImgWidth) str += " width='" + o.ImgWidth + "px'";
169      if (o.ImgHeight) str += " height='" + o.ImgHeight + "px'";
170      str += " border='0'>";
171      if (o.LinkUrl) str += "</a>";
172    }
173  } else if (o.ADType == 3 || o.ADType == 4) {
174    str = o.ADIntro
175  } else if (o.ADType == 5) {
176    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>";
177  }
178  return str;
179}
180
181
182var ZoneAD_136 = new BannerZoneAD("ZoneAD_136");
183ZoneAD_136.ZoneID      = 136;
184ZoneAD_136.ZoneWidth   = 496;
185ZoneAD_136.ZoneHeight  = 50;
186ZoneAD_136.ShowType    = 2;
187
188var objAD = new ObjectAD();
189objAD.ADID           = 214;
190objAD.ADType         = 1;
191objAD.ADName         = "˾·¨¾Ö";
192objAD.ImgUrl         = "/AD/UploadADPic/201901/2019010809162406.gif";
193objAD.InstallDir     = "/";
194objAD.ImgWidth       = 496;
195objAD.ImgHeight      = 50;
196objAD.FlashWmode     = 0;
197objAD.ADIntro        = "";
198objAD.LinkUrl        = "http://sfj.jiaozuo.gov.cn/";
199objAD.LinkTarget     = 1;
200objAD.LinkAlt        = "";
201objAD.Priority       = 10;
202objAD.CountView      = 1;
203objAD.CountClick     = 0;
204objAD.ADDIR          = "AD";
205ZoneAD_136.AddAD(objAD);
206
207ZoneAD_136.Show();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.