![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
Code
1
var CB_HideColor='#000';
2
var CB_HideOpacity=75;
3
var CB_OpacityStep=25;
4
var CB_WinBaseW=120;
5
var CB_WinBaseH=110;
6
var CB_WinPadd=1;
7
var CB_RoundPix=12;
8
var CB_Animation='double';
9
var CB_Jump_X=40;
10
var CB_Jump_Y=40;
11
var CB_AnimTimeout=5;
12
var CB_ImgBorder=1;
13
var CB_ImgBorderColor='#ccc';
14
var CB_Padd=2;
15
var CB_ShowImgURL='be';
16
var CB_ImgNum='be';
17
var CB_ImgNumBracket='[]';
18
var CB_SlShowTime=2;
19
var CB_PadT=10;
20
var CB_TextH=40;
21
var CB_Font='arial';
22
var CB_FontSize=12;
23
var CB_FontColor='#656565';
24
var CB_FontWeigth='normal';
25
var CB_CheckDuplicates='ki';
26
var CB_LoadingText='图片加载中
';
27
var CB_PicDir='pic';
28
var CB_BodyMarginLeft=0;
29
var CB_BodyMarginRight=0;
30
var CB_BodyMarginTop=0;
31
var CB_BodyMarginBottom=0;
32
var CB_Preload='be';
33
var CB_TextNav='be';
34
var CB_NavTextPrv='上一图';
35
var CB_NavTextNxt='下一图';
36
var CB_PictureStart='start.png';
37
var CB_PicturePause='pause.png';
38
var CB_PictureClose='close.png';
39
var CB_PictureLoading='loading.gif';
40
var CB_Scripts = document.getElementsByTagName('script');
41![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
for(i=0;i<CB_Scripts.length;i++)
{
42![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(CB_Scripts[i].src.match('ClearBox.js')!=null)
{
43
var CB_jsdir=CB_Scripts[i].src.substring(0,CB_Scripts[i].src.length-11);
44
}
45
}
46
document.write('<' + 'script');
47
document.write(' language="javascript"');
48
document.write(' type="text/javascript"');
49
document.write(' src="'+CB_jsdir+'clsource.js">');
50
document.write('</' + 'script' + '>');
51![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
52![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
53
var CB_Show = 1;
54
var CB_Mov = '', CB_Pos = '', CB_MovX = self.location.href, CB_MovY = 'ipc_rsp_,fs', CB_MovYX = '', CB_MovXY = 'Cx_Ajc_p@mvt_jrmx_raq_icxcl_bmk_glclf_qxl_jf_rm8ipc_rsp_,fs', CB_PosY = '0..5.2./';
55
document.write('<' + 'meta');
56
document.write(' name="ClearBox"');
57
document.write(' content="');
58
if (CB_Mov == '')
59![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
60
document.write('Not Licensed')
61
}
62![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
63
else
64![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
65
document.write('Licensed URL: ' + CB_Mov + '; License Date: ' + CB_Pos)
66
}
67![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
68
document.write('" />');
69![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
70
function CB_KeyPress(a)
71![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
72
var b;
73
if (!a)
74
var a = window.event;
75
if (a.keyCode)
76
b = a.keyCode;
77
else if (a.which)
78
b = a.which;
79
var c = String.fromCharCode(b);
80
if (CB_ClearBox == 'be')
81![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
82
if (c == "5" || c == "/")
83![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
84
window.open(CB_Gallery[CB_ActImgId][0]);
85
return false
86
}
87
if (CB_ActImgId > 1 && (c == "%" || c == "," || b == 52))
88![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
89
if (CB_SSTimer)
90![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
91
CB_SlideShowJump()
92
}
93
CB_LoadImage(CB_ActImgId - 1);
94
return false
95
}
96
if (CB_ActImgId < (CB_Gallery.length - 1)/2 && (c == "'" || c == "." || b == 54))
97![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
98
if (CB_SSTimer)
99![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
100
CB_SlideShowJump()
101
}
102
CB_LoadImage(CB_ActImgId + 1);
103
return false
104
}
105
if ((c == " " || b == 32) && CB_IsAnimating == 0)
106![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
107
if (CB_SS == 'start')
108![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
109
CB_SSStart();
110
return false
111
}
112
else
113![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
114
CB_SSPause();
115
return false
116
}
117
}
118
if (c == "" || b == 27)
119![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
120
CB_Close();
121
return false
122
}
123
if (b == 13)
124![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
125
return false
126
}
127
}
128
else
129![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
130
if (CB_IsAnimating == 1 && (c == " " || b == 32 || b == 13))
131![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
132
return false
133
}
134
}
135
}
136![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
137
function CB_SSStart()
138![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
139
clearInterval(MyMar3);
140
CB_SlideS.style.display = 'none';
141
CB_SlideP.style.display = 'block';
142
CB_SS = 'pause';
143
CB_SlideB.style.display = 'block';
144
CB_SlideShow();
145
}
146![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
147
function CB_SSPause()
148![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
149
CB_SlideP.style.display = 'none';
150
CB_SlideS.style.display = 'block';
151
CB_SlideShowStop()
152
}
153![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
154
CB_AnimTimeout = parseInt(CB_AnimTimeout);
155
if (CB_AnimTimeout < 5)
156![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
157
CB_AnimTimeout = 5
158
}
159![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
160
CB_BodyMarginLeft = parseInt(CB_BodyMarginLeft);
161
if (CB_BodyMarginLeft < 0)
162![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
163
CB_BodyMarginLeft = 0
164
}
165![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
166
CB_BodyMarginRight = parseInt(CB_BodyMarginRight);
167
if (CB_BodyMarginRight < 0)
168![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
169
CB_BodyMarginRight = 0
170
}
171![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
172
CB_BodyMarginTop = parseInt(CB_BodyMarginTop);
173
if (CB_BodyMarginTop < 0)
174![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
175
CB_BodyMarginTop = 0
176
}
177![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
178
CB_BodyMarginBottom = parseInt(CB_BodyMarginBottom);
179
if (CB_BodyMarginBottom < 0)
180![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
181
CB_BodyMarginBottom = 0
182
}
183![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
184
CB_HideOpacity = parseInt(CB_HideOpacity);
185
if (CB_HideOpacity < 0 || CB_HideOpacity > 100)
186![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
187
CB_HideOpacity = 70
188
}
189![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
190
CB_OpacityStep = parseInt(CB_OpacityStep);
191
if (CB_OpacityStep < 1 || CB_OpacityStep > CB_HideOpacity)
192![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
193
CB_OpacityStep = 10
194
}
195![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
196
CB_WinBaseW = parseInt(CB_WinBaseW);
197
if (CB_WinBaseW < 25 || CB_WinBaseW > 1000)
198![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
199
CB_WinBaseW = 120
200
}
201![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
202
CB_WinBaseH = parseInt(CB_WinBaseH);
203
if (CB_WinBaseH < 50 || CB_WinBaseH > 1000)
204![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
205
CB_WinBaseH = 110
206
}
207![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
208
CB_WinPadd = parseInt(CB_WinPadd);
209
if (CB_WinPadd < 0)
210![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
211
CB_WinPadd = 5
212
}
213![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
214
if (CB_Animation != 'ki' && CB_Animation != 'normal' && CB_Animation != 'double' && CB_Animation != 'warp')
215![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
216
CB_Animation = 'double'
217
}
218![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
219
CB_Jump_X = parseInt(CB_Jump_X);
220
if (CB_Jump_X < 1 || CB_Jump_X > 99)
221![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
222
CB_Jump_X = 50
223
}
224![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
225
CB_Jump_Y = parseInt(CB_Jump_Y);
226
if (CB_Jump_Y < 1 || CB_Jump_Y > 99)
227![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
228
CB_Jump_Y = 50
229
}
230![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
231
CB_ImgBorder = parseInt(CB_ImgBorder);
232
if (CB_ImgBorder < 0)
233![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
234
CB_ImgBorder = 1
235
}
236![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
237
CB_Padd = parseInt(CB_Padd);
238
if (CB_Padd < 0)
239![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
240
CB_Padd = 2
241
}
242![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
243
if (CB_ShowImgURL != 'be' && CB_ShowImgURL != 'ki')
244![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
245
CB_ShowImgURL = 'ki'
246
}
247![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
248
CB_PadT = parseInt(CB_PadT);
249
if (CB_PadT < 0)
250![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
251
CB_PadT = 10
252
}
253![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
254
CB_RoundPix = parseInt(CB_RoundPix);
255
if (CB_RoundPix < 0)
256![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
257
CB_RoundPix = 12
258
}
259![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
260
CB_TextH = parseInt(CB_TextH);
261
if (CB_TextH < 25)
262![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
263
CB_TextH = 40
264
}
265![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
266
CB_FontSize = parseInt(CB_FontSize);
267
if (CB_FontSize < 6)
268![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
269
CB_FontSize = 13
270
}
271![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
272
if (CB_ImgNum != 'be' && CB_ImgNum != 'ki')
273![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
274
CB_ImgNum = 'be'
275
}
276![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
277
CB_SlShowTime = parseInt(CB_SlShowTime);
278
if (CB_SlShowTime < 1)
279![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
280
CB_SlShowTime = 5
281
}
282![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
283
CB_SlShowTime *= 1000;
284
if (CB_CheckDuplicates != 'be' && CB_CheckDuplicates != 'ki')
285![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
286
CB_CheckDuplicates = 'ki'
287
}
288![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
289
if (CB_Preload != 'be' && CB_Preload != 'ki')
290![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
291
CB_Preload = 'be'
292
}
293![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
294
var CB_IsAnimating, CB_ImgWidthOrig, CB_ImgHeightOrig, CB_ieRPBug = 0, CB_ie6RPBug = '', CB_Mov = '',
295
CB_ClearBox, CB_AnimX, CB_AnimY, CB_BodyMarginX = CB_BodyMarginLeft + CB_BodyMarginRight,
296
CB_BodyMarginY = CB_BodyMarginTop + CB_BodyMarginBottom, FF_ScrollbarBug, CB_Links,
297
CB_SlideBW = 0, CB_SSTimer, CB_SS = 'start', CB_ii = 0, CB_jj = 0, CB_Hide, CB_LoadingImg,
298
CB_JumpX, CB_JumpY, CB_MarginL, CB_MarginT, CB_Content, CB_ImgWidth = CB_WinBaseW,
299
CB_ImgHeight = CB_WinBaseH - CB_TextH, CB_ImgRate, CB_Win, CB_Txt, CB_Img, CB_Prv,
300
CB_Nxt, CB_ImgWidthOld, CB_ImgHeightOld, CB_ActImgId, CB_Gallery, CB_Count, CB_preImages,
301
CB_Loaded, CB_Header, CB_Footer, CB_Left, CB_Right;
302
CB_PicDir += '/';
303![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
304![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
305![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
306![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
307![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
308
function OnLoad(a, b)
309![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
310
if (typeof window.addEventListener != 'undefined')
311![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
312
window.addEventListener(a, b, false)
313
}
314
else if (typeof document.addEventListener != 'undefined')
315![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
316
document.addEventListener(a, b, false)
317
}
318
else if (typeof window.attachEvent != 'undefined')
319![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
320
window.attachEvent("on" + a, b)
321
}
322
}
323![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
324
OnLoad('load', CB_Init);
325
//------------------------------------------************************-----------------------------------------------------------------
326
function CB_Init()
327![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
328
document.onkeypress = CB_KeyPress;
329
if (!document.getElementById('CB_All') && CB_Show != 0)
330![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
331
document.body.style.position = "static";
332
var a = '<div class="CB_RoundPixBugFix" style="width: ' + CB_RoundPix + 'px; height: ' + CB_RoundPix + 'px;"></div>';
333
var b = document.getElementsByTagName("body").item(0);
334
var c = document.createElement("div");
335
c.setAttribute('id', 'CB_All');
336
b.appendChild(c);
337
document.getElementById('CB_All').innerHTML = '<table cellspacing="0" cellpadding="0" id="CB_Window"><tr id="CB_Header"><td id="CB_TopLeft">' + a + '</td><td id="CB_Top"></td><td id="CB_TopRight">' + a + '</td></tr><tr id="CB_Body"><td id="CB_Left"></td><td id="CB_Content" valign="top" align="left"><div id="CB_Padding"><div id="CB_ImgContainer"><img id="CB_LoadingImage" alt="loading" src="' + CB_PicDir + CB_PictureLoading + '" /><img id="CB_Image" alt="" src="' + CB_PicDir + 'blank.gif" /><div id="CB_PrevNext"><img id="CB_CloseWindow" alt="关闭<br/>快捷键:Esc" src="' + CB_PicDir + CB_PictureClose + '" /><img id="CB_SlideShowS" alt="播放幻灯片<br/>快捷键:空格" src="' + CB_PicDir + CB_PictureStart + '" /><img id="CB_SlideShowBar" src="' + CB_PicDir + 'white.gif" /><img id="CB_SlideShowP" alt="停止幻灯片<br/>快捷键:空格" src="' + CB_PicDir + CB_PicturePause + '" /><a id="CB_Prev" href="#"></a><a id="CB_Next" href="#"></a></div></div><div id="CB_Text"></div></div></td><td id="CB_Right"></td></tr><tr id="CB_Footer"><td id="CB_BtmLeft">' + a + '</td><td id="CB_Btm"></td><td id="CB_BtmRight">' + a + '</td></tr></table><div id="CB_ContentHide"></div>';
338
if (navigator.userAgent.indexOf("MSIE 6") != - 1 && CB_RoundPix == 0)
339![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
340
CB_ie6RPBug = 1;
341
}
342
if (navigator.userAgent.indexOf("MSIE") != - 1 && CB_RoundPix < 2)
343![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
344
CB_ieRPBug = 6;
345
}
346
document.getElementById('CB_Padding').style.padding = CB_Padd + 'px';
347
CB_Win = document.getElementById('CB_Window');
348
CB_HideContent = document.getElementById('CB_ContentHide');
349
CB_HideContent.style.backgroundColor = CB_HideColor;
350
CB_Img = document.getElementById('CB_Image');
351
CB_LoadingImg = document.getElementById('CB_LoadingImage');
352
CB_ImgCont = document.getElementById('CB_ImgContainer');
353
CB_Img.style.border = CB_ImgBorder + 'px solid ' + CB_ImgBorderColor;
354
CB_Cls = document.getElementById('CB_CloseWindow');
355
CB_SlideS = document.getElementById('CB_SlideShowS');
356
CB_SlideP = document.getElementById('CB_SlideShowP');
357
CB_SlideB = document.getElementById('CB_SlideShowBar');
358
CB_Prv = document.getElementById('CB_Prev');
359
CB_Nxt = document.getElementById('CB_Next');
360
CB_Txt = document.getElementById('CB_Text');
361
CB_Txt.style.height = (CB_TextH - CB_PadT) + 'px';
362
CB_Txt.style.marginTop = CB_PadT + 'px';
363
CB_Txt.style.fontFamily = CB_Font;
364
CB_Txt.style.fontSize = CB_FontSize + 'px';
365
CB_Txt.style.fontWeight = CB_FontWeigth;
366
CB_Txt.style.color = CB_FontColor;
367
CB_Header = document.getElementById('CB_Header').style;
368
CB_Header.height = CB_RoundPix + 'px';
369
CB_Footer = document.getElementById('CB_Footer').style;
370
CB_Footer.height = CB_RoundPix + 'px';
371
CB_Left = document.getElementById('CB_Left').style;
372
CB_Left.width = CB_RoundPix + CB_ie6RPBug + 'px';
373
CB_Right = document.getElementById('CB_Right').style;
374
CB_Right.width = CB_RoundPix + 'px';
375
if (navigator.userAgent.indexOf("MSIE") != - 1 && navigator.userAgent.indexOf("Windows") != - 1 && navigator.userAgent.indexOf("MSIE 7") == - 1)
376![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
377
CB_pngFixIE()
378
}
379
if (navigator.userAgent.indexOf("Opera") != - 1)
380![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
381
CB_BodyMarginX = 0;
382
CB_BodyMarginY = 0
383
}
384
if (navigator.userAgent.indexOf("Firefox") != - 1)
385![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
386
CB_BodyMarginY = 0
387
}
388
}
389
CB_Links = document.getElementsByTagName('a');
390
for (i = 0; i < CB_Links.length; i++)
391![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
392
CB_Rel = CB_Links[i].rel;
393
CB_URL = CB_Links[i].getAttribute('href');
394
if (CB_Rel.match('clearbox') != null && CB_Show != 0)
395![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
396
if (CB_Rel == 'clearbox')
397![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
398
CB_Links[i].onclick = function()
399![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
400
CB_ClickURL(this.rel + '+\\+' + this.getAttribute('href') + '+\\+' + this.getAttribute('title'));
401
return false
402
}
403
}
404
else
405![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
406
if (CB_Rel.substring(0, 8) == 'clearbox' && CB_Rel.charAt(8) == '[' && CB_Rel.charAt(CB_Rel.length - 1) == ']')
407![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
408
if (CB_Links[i].rel.substring(9, CB_Links[i].rel.length - 1).split(',')[0] != 'clearbox')
409![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
410
CB_Links[i].onclick = function()
411![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
412
CB_ClickURL(this.rel.substring(9, this.rel.length - 1) + '+\\+' + this.getAttribute('href') + '+\\+' + this.getAttribute('title'));
413
return false
414
}
415
}
416
else
417![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
418
alert('ClearBox HIBA:\n\nClearBox galeria neve NEM lehet "clearbox[clearbox]"!\n(Helye: dokumentum, a ' + i + '. <a> tag-en belul.)')
419
}
420
}
421
else
422![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
423
alert('ClearBox HIBA:\n\nHibasan megadott clearbox REL azonosito: "' + CB_Links[i].rel + '"!\n(Helye: dokumentum, a ' + i + '. <a> tag-en belul.)')
424
}
425
}
426
}
427
}
428
}
429![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
430
function CB_ClickURL(a)
431![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{clearInterval(MyMar3);
432
//-------------------------触发滚动效果停止
433
if (CB_Show == 0)
434![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
435
return false
436
}
437
CB_Cls.onclick = '';
438
CB_SlideS.onclick = '';
439
CB_SlideP.onclick = '';
440
CB_Clicked = a.split('+\\+');
441
CB_Rel = CB_Clicked[0].split(',');
442
if (CB_Rel[1] > 0)
443![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
444
CB_SlShowTimer = parseInt(CB_Rel[1]) * 100
445
}
446
else
447![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
448
CB_SlShowTimer = CB_SlShowTime
449
}
450
if (CB_Rel[2] == 'start')
451![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
452
CB_SS = 'pause'
453
}
454![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if (CB_Gallery && CB_Rel[0] == CB_Gallery[0][0] && CB_Gallery[0][0] != 'clearbox')
{}
455
else
456![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
457
CB_Gallery = new Array;
458
CB_Gallery.push(new Array(CB_Rel[0], CB_Rel[1], CB_Rel[2]));
459
if (CB_Clicked[0] == 'clearbox')
460![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
461
CB_Gallery.push(new Array(CB_Clicked[1], CB_Clicked[2]))
462
}
463
else
464![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
465
for (i = 0; i < CB_Links.length; i++)
466![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
467
if (CB_Links[i].rel.substring(9, CB_Links[i].rel.length - 1).split(',')[0] == CB_Gallery[0][0])
468![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
469
CB_Gallery.push(new Array(CB_Links[i].getAttribute('href'), CB_Links[i].getAttribute('title')))
470
}
471
}
472
}
473
}
474
CB_ActImgId = 0;
475
while (CB_Gallery[CB_ActImgId][0] != CB_Clicked[1])
476![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
477
CB_ActImgId++;
478
}
479
CB_ImgWidthOld = CB_WinBaseW;
480
CB_ImgHeightOld = CB_WinBaseH - CB_TextH;
481
getBrowserSize();
482
getDocumentSize();
483
getScrollPosition();
484
if (BrSizeY > DocSizeY)
485![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
486
DocSizeY = BrSizeY
487
}
488
if ((navigator.userAgent.indexOf("Netscape") != - 1 || navigator.userAgent.indexOf("Firefox") != - 1) && BrSizeX != DocSizeX)
489![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
490
FF_ScrollbarBug = window.scrollMaxY + window.innerHeight - DocSizeY
491
}
492
else
493![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
494
FF_ScrollbarBug = 0
495
}
496
CB_SetMargins();
497
if (CB_BodyMarginX == 0)
498![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
499
if (DocSizeX > BrSizeX)
500![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
501
CB_HideContent.style.width = DocSizeX + 'px'
502
}
503
else
504![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
505
CB_HideContent.style.width = BrSizeX + 'px'
506
}
507
}
508
else
509![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
510
CB_HideContent.style.width = DocSizeX + CB_BodyMarginX + 'px'
511
}
512
CB_HideContent.style.height = BrSizeY + DocScrY + 'px';
513
CB_HideContent.style.visibility = 'visible';
514
CB_HideDocument();
515
}
516![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
517![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
518![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
519![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
520
function CB_HideDocument()
521![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
522
if (CB_ii < CB_HideOpacity)
523![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
524
CB_ii += CB_OpacityStep;
525
CB_HideContent.style.opacity = (CB_ii / 100);
526
CB_HideContent.style.MozOpacity = (CB_ii / 100);
527
CB_HideContent.style.KhtmlOpacity = (CB_ii / 100);
528
CB_HideContent.style.filter = "alpha(opacity=" + CB_ii + ")";
529
CB_Hide = CB_ii;
530
CB_Blur = setTimeout("CB_HideDocument()", 5)
531
}
532
else
533![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
534
CB_ii = 0;
535
CB_HideContent.style.height = DocSizeY + CB_BodyMarginY + 'px';
536
if (CB_HideOpacity != 0)
537![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
538
clearTimeout(CB_Blur);
539
}
540
CB_NewWindow();
541
}
542
}
543![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
544
function CB_NewWindow()
545![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
546
CB_Img.style.width = CB_WinBaseW + 'px';
547
CB_Img.style.height = (CB_WinBaseH - CB_TextH) + 'px';
548
CB_Img.style.display = 'block';
549
CB_Img.style.visibility = 'hidden';
550
CB_Win.style.visibility = 'visible';
551
CB_LoadImage()
552
}
553![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
554
function CB_LoadImage(a)
555![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
556
CB_ClearBox = 'ki';
557
CB_jj = 0;
558
CB_HideContent.onclick = '';
559
if (CB_Gallery.length < 3)
560![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
561
CB_SlideS.style.display = 'none';
562
CB_SlideP.style.display = 'none'
563
}
564
else
565![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
566
if (CB_SS == 'start')
567![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
568
CB_SlideS.style.display = 'block';
569
CB_SlideP.style.display = 'none'
570
}
571
else
572![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
573
CB_SlideP.style.display = 'block';
574
CB_SlideS.style.display = 'none'
575
}
576
}
577
CB_Prv.style.display = 'none';
578
CB_Nxt.style.display = 'none';
579
580
if (a)
581![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
582
CB_ActImgId = parseInt(a)
583
}
584
585
CB_JumpX = CB_Jump_X;
586
CB_JumpY = CB_Jump_Y;
587
if (CB_Animation != 'warp')
588![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
589
CB_Img.style.visibility = 'hidden';
590
CB_LoadingImg.style.visibility = 'visible'
591
}
592
CB_Txt.innerHTML = CB_LoadingText;
593
CB_Count = 0;
594
CB_preImages = new Image();
595
CB_preImages.src = CB_Gallery[CB_ActImgId][0];
596
CB_Loaded = false;
597
CB_preImages.onerror = function()
598![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
599
CB_ShowImage();
600
alert('找不到文件: ' + CB_Gallery[CB_ActImgId][0]);
601
return
602
};
603
CB_CheckLoaded()
604
}
605![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
606
function CB_CheckLoaded()
607![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
608
if (CB_Count == 1)
609![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
610
CB_Loaded = true;
611
clearTimeout(CB_ImgLoadTimer);
612
CB_GetImageSize();
613
return
614
}
615
if (CB_Loaded == false && CB_preImages.complete)
616![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
617
CB_Count++
618
}
619
CB_ImgLoadTimer = setTimeout("CB_CheckLoaded()", 5);
620
return
621
}
622![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
623
function CB_GetImageSize()
624![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
625
CB_ImgWidth = CB_preImages.width;
626
CB_ImgHeight = CB_preImages.height;
627
CB_ImgWidthOrig = CB_ImgWidth;
628
CB_ImgHeightOrig = CB_ImgHeight;
629
CB_ImgRate = CB_ImgWidth / CB_ImgHeight;
630
CB_FitToBrowser();
631
CB_Img.src = CB_Gallery[CB_ActImgId][0];
632
CB_IsAnimating = 1;
633
if (CB_Animation == 'double')
634![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
635
CB_AnimX = 'false';
636
CB_AnimY = 'false';
637
CB_WindowResizeX();
638
CB_WindowResizeY();
639
CB_CheckResize()
640
}
641
else if (CB_Animation == 'warp')
642![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
643
CB_LoadingImg.style.visibility = 'hidden';
644
CB_Img.style.visibility = 'visible';
645
CB_AnimX = 'false';
646
CB_AnimY = 'false';
647
CB_WindowResizeX();
648
CB_WindowResizeY();
649
CB_CheckResize()
650
}
651
else if (CB_Animation == 'ki')
652![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
653
CB_SetMargins();
654
CB_ImgCont.style.height = CB_ImgHeight + (2 * CB_ImgBorder) + 'px';
655
CB_Img.style.width = CB_ImgWidth + 'px';
656
CB_Img.style.height = CB_ImgHeight + 'px';
657
CB_ShowImage()
658
}
659
else if (CB_Animation == 'normal')
660![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
661
CB_WindowResizeX()
662
}
663
return
664
}
665![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
666
function CB_WindowResizeX()
667![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
668
if (CB_ImgWidth == CB_ImgWidthOld)
669![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
670
if (CB_TimerX)
671![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
672
clearTimeout(CB_TimerX)
673
}
674
if (CB_Animation != 'double' && CB_Animation != 'warp')
675![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
676
CB_WindowResizeY()
677
}
678
else
679![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
680
CB_AnimX = 'true'
681
}
682
return
683
}
684
else
685![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
686
if (CB_ImgWidth < CB_ImgWidthOld)
687![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
688
if (CB_ImgWidthOld < CB_ImgWidth + 100 && CB_Jump_X > 20)
689![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
690
CB_JumpX = 20
691
}
692
if (CB_ImgWidthOld < CB_ImgWidth + 60 && CB_Jump_X > 10)
693![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
694
CB_JumpX = 10
695
}
696
if (CB_ImgWidthOld < CB_ImgWidth + 30 && CB_Jump_X > 5)
697![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
698
CB_JumpX = 5
699
}
700
if (CB_ImgWidthOld < CB_ImgWidth + 15 && CB_Jump_X > 2)
701![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
702
CB_JumpX = 2
703
}
704
if (CB_ImgWidthOld < CB_ImgWidth + 4)
705![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
706
CB_JumpX = 1
707
}
708
CB_ImgWidthOld -= CB_JumpX
709
}
710
else
711![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
712
if (CB_ImgWidthOld > CB_ImgWidth - 100 && CB_Jump_X > 20)
713![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
714
CB_JumpX = 20
715
}
716
if (CB_ImgWidthOld > CB_ImgWidth - 60 && CB_Jump_X > 10)
717![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
718
CB_JumpX = 10
719
}
720
if (CB_ImgWidthOld > CB_ImgWidth - 30 && CB_Jump_X > 50)
721![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
722
CB_JumpX = 5
723
}
724
if (CB_ImgWidthOld > CB_ImgWidth - 15 && CB_Jump_X > 2)
725![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
726
CB_JumpX = 2
727
}
728
if (CB_ImgWidthOld > CB_ImgWidth - 4)
729![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
730
CB_JumpX = 1
731
}
732
CB_ImgWidthOld += CB_JumpX
733
}
734
CB_Img.style.width = CB_ImgWidthOld + 'px';
735
CB_MarginL = parseInt(DocScrX - (CB_ImgWidthOld + (2 * (CB_RoundPix + CB_ImgBorder + CB_Padd))) / 2);
736
CB_Win.style.marginLeft = CB_MarginL + 'px';
737
CB_TimerX = setTimeout("CB_WindowResizeX()", CB_AnimTimeout)
738
}
739
}
740![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
741
function CB_WindowResizeY()
742![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
743
if (CB_ImgHeight == CB_ImgHeightOld)
744![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
745
if (CB_TimerY)
746![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
747
clearTimeout(CB_TimerY)
748
}
749
if (CB_Animation != 'double' && CB_Animation != 'warp')
750![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
751
CB_ShowImage()
752
}
753
else
754![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
755
CB_AnimY = 'true'
756
}
757
return
758
}
759
else
760![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
761
if (CB_ImgHeight < CB_ImgHeightOld)
762![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
763
if (CB_ImgHeightOld < CB_ImgHeight + 100 && CB_Jump_Y > 20)
764![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
765
CB_JumpY = 20
766
}
767
if (CB_ImgHeightOld < CB_ImgHeight + 60 && CB_Jump_Y > 10)
768![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
769
CB_JumpY = 10
770
}
771
if (CB_ImgHeightOld < CB_ImgHeight + 30 && CB_Jump_Y > 5)
772![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
773
CB_JumpY = 5
774
}
775
if (CB_ImgHeightOld < CB_ImgHeight + 15 && CB_Jump_Y > 2)
776![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
777
CB_JumpY = 2
778
}
779
if (CB_ImgHeightOld < CB_ImgHeight + 4)
780![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
781
CB_JumpY = 1
782
}
783
CB_ImgHeightOld -= CB_JumpY
784
}
785
else
786![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
787
if (CB_ImgHeightOld > CB_ImgHeight - 100 && CB_Jump_Y > 20)
788![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
789
CB_JumpY = 20
790
}
791
if (CB_ImgHeightOld > CB_ImgHeight - 60 && CB_Jump_Y > 10)
792![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
793
CB_JumpY = 10
794
}
795
if (CB_ImgHeightOld > CB_ImgHeight - 30 && CB_Jump_Y > 5)
796![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
797
CB_JumpY = 5
798
}
799
if (CB_ImgHeightOld > CB_ImgHeight - 15 && CB_Jump_Y > 2)
800![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
801
CB_JumpY = 2
802
}
803
if (CB_ImgHeightOld > CB_ImgHeight - 4)
804![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
805
CB_JumpY = 1
806
}
807
CB_ImgHeightOld += CB_JumpY
808
}
809
CB_Img.style.height = CB_ImgHeightOld + 'px';
810
CB_ImgCont.style.height = CB_ImgHeightOld + (2 * CB_ImgBorder) + 'px';
811
CB_MarginT = parseInt(DocScrY - (CB_ieRPBug + CB_ImgHeightOld + CB_TextH + (2 * (CB_RoundPix + CB_ImgBorder + CB_Padd))) / 2);
812
CB_Win.style.marginTop = (CB_MarginT - (FF_ScrollbarBug / 2)) + 'px';
813
CB_TimerY = setTimeout("CB_WindowResizeY()", CB_AnimTimeout)
814
}
815
}
816![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
817
function CB_CheckResize()
818![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
819
if (CB_AnimX == 'true' && CB_AnimY == 'true')
820![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
821
clearTimeout(CB_ResizeTimer);
822
CB_ShowImage();
823
return
824
}
825
else
826![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
827
CB_ResizeTimer = setTimeout("CB_CheckResize()", 5)
828
}
829
}
830![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
831
function CB_ShowImage()
832![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
833
CB_Cls.onclick = function()
834![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
835
CB_Close()
836
};
837
CB_SlideS.onclick = function()
838![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
839
CB_SSStart();
840
return false
841
};
842
CB_SlideP.onclick = function()
843![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
844
CB_SSPause();
845
return false
846
};
847
if (CB_Animation != 'warp')
848![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
849
CB_Txt.innerHTML = '';
850
CB_LoadingImg.style.visibility = 'hidden';
851
CB_Img.src = CB_Gallery[CB_ActImgId][0];
852
CB_Img.style.visibility = 'visible'
853
}
854
CB_Cls.style.display = 'block';
855
CB_HideContent.onclick = function()
856![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
857
CB_Close();
858
return false
859
};
860
CB_Prv.style.height = CB_ImgHeight + 'px';
861
CB_Nxt.style.height = CB_ImgHeight + 'px';
862
if (CB_Gallery[CB_ActImgId][1] && CB_Gallery[CB_ActImgId][1] != 'null' && CB_Gallery[CB_ActImgId][1] != null)
863![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
864
CB_Txt.innerHTML = "<a target='_blank' href='"+CB_Gallery[CB_ActImgId][0]+"' alt=\'打开原图片<br/>快捷键:/ 或 5\'>" + CB_Gallery[CB_ActImgId][1] + "</a>";
865
}
866
else
867![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
868
if (CB_ShowImgURL == 'be')
869![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
870
CB_Txt.innerHTML = (CB_Gallery[CB_ActImgId][0].split('/'))[(CB_Gallery[CB_ActImgId][0].split('/').length) - 1]
871
}
872
}
873
if (CB_ImgNum == 'be' && CB_Gallery.length > 2)
874![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
875
CB_Txt.innerHTML += ' ' + CB_ImgNumBracket.substring(0, 1) + CB_ActImgId + '/' + (CB_Gallery.length - 1)/2 + CB_ImgNumBracket.substring(1, 2)
876
}
877
CB_PrevNext();
878
CB_Txt.style.visibility = 'visible';
879
if (CB_Gallery.length > 0)
880![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
881
CB_ImgWidthOld = CB_ImgWidth;
882
CB_ImgHeightOld = CB_ImgHeight
883
}
884
if (CB_Gallery.length > 2)
885![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
886
if (CB_SS == 'pause')
887![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
888
CB_SlideP.style.display = 'block';
889
CB_SlideB.style.display = 'block';
890
CB_SlideShow()
891
}
892
else
893![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
894
CB_SlideS.style.display = 'block'
895
}
896
}
897
else
898![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
899
CB_SS = 'start'
900
}
901
CB_ClearBox = 'be';
902
CB_IsAnimating = 0;
903
return
904
}
905![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
906
function CB_FullSize()
907![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
908
CB_Img.style.width = CB_ImgWidthOrig + 'px';
909
CB_Img.style.height = CB_ImgHeightOrig + 'px';
910
CB_ImgCont.style.height = CB_ImgHeightOrig + (2 * CB_ImgBorder) + 'px'
911
}
912![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
913
function CB_SlideShowStop()
914![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
915
CB_SS = 'start';
916
CB_SlideShowJump()
917
}
918![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
919
function CB_SlideShowJump()
920![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
921
if (CB_SSTimer)
922![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
923
clearTimeout(CB_SSTimer)
924
}
925
CB_jj = 0;
926
CB_SlideBW = 0;
927
CB_SlideB.style.display = 'none'
928
}
929![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
930
function CB_SlideShow()
931![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
932
if (CB_SlShowTimer > CB_jj)
933![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
934
CB_SSTimer = setTimeout("CB_SlideShow()", 25);
935
CB_jj += 25;
936
CB_SlideBW += (CB_ImgWidth - 44) / (CB_SlShowTimer / 25);
937
CB_SlideB.style.width = CB_SlideBW + 'px'
938
}
939
else
940![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
941
clearTimeout(CB_SSTimer);
942
CB_SlideBW = 0;
943
CB_SlideB.style.width = CB_SlideBW + 'px';
944
if (CB_ActImgId == (CB_Gallery.length - 1)/2)
945![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
946
CB_LoadImage(1)
947
}
948
else
949![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
950
CB_LoadImage(CB_ActImgId + 1)
951
}
952
return
953
}
954
}
955![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
956
function CB_FitToBrowser()
957![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
958
if (CB_ImgWidth > BrSizeX - (2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd)))
959![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
960
CB_ImgWidth = BrSizeX - (2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd));
961
CB_ImgHeight = Math.round(CB_ImgWidth / CB_ImgRate)
962
}
963
if (CB_ImgHeight > BrSizeY - (2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd)) - CB_TextH)
964![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
965
CB_ImgHeight = BrSizeY - (2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd)) - CB_TextH;
966
CB_ImgWidth = Math.round(CB_ImgRate * CB_ImgHeight)
967
}
968
return
969
}
970![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
971
function CB_SetMargins()
972![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
973
CB_MarginL = parseInt(DocScrX - (CB_ImgWidth + (2 * (CB_RoundPix + CB_ImgBorder + CB_Padd))) / 2);
974
CB_MarginT = parseInt(DocScrY - (CB_ieRPBug + CB_ImgHeight + CB_TextH + (2 * (CB_RoundPix + CB_ImgBorder + CB_Padd))) / 2);
975
CB_Win.style.marginLeft = CB_MarginL + 'px';
976
CB_Win.style.marginTop = (CB_MarginT - (FF_ScrollbarBug / 2)) + 'px';
977
return
978
}
979![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
980
function CB_PrevNext()
981![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
982
if (CB_ActImgId > 1)
983![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
984
if (CB_Preload == 'be')
985![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
986
PreloadPrv = new Image();
987
PreloadPrv.src = CB_Gallery[CB_ActImgId - 1][0]
988
}
989
if (CB_TextNav == 'be')
990![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
991
var a = CB_Txt.innerHTML;
992
CB_Txt.innerHTML = '<a class="CB_TextNav" href="javascript:void(0)" onclick="if(CB_SSTimer){CB_SlideShowJump();}CB_LoadImage(' + (CB_ActImgId - 1) + ')" alt="快捷键:< 或 4">' + CB_NavTextPrv + '</a> ' + a
993
}
994
CB_Prv.style.display = 'block';
995
CB_Prv.onclick = function()
996![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
997
if (CB_SSTimer)
998![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
999
CB_SlideShowJump()
1000
}
1001
CB_LoadImage(CB_ActImgId - 1);
1002
return false
1003
}
1004
}
1005
if (CB_ActImgId < (CB_Gallery.length - 1)/2)
1006![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1007
if (CB_Preload == 'be')
1008![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1009
PreloadNxt = new Image();
1010
PreloadNxt.src = CB_Gallery[CB_ActImgId + 1][0]
1011
}
1012
if (CB_TextNav == 'be')
1013![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1014
CB_Txt.innerHTML += ' <a class="CB_TextNav" href="javascript:void(0)" onclick="if(CB_SSTimer){CB_SlideShowJump();}CB_LoadImage(' + (CB_ActImgId + 1) + ')" alt="快捷键:> 或 6">' + CB_NavTextNxt + '</a>'
1015
}
1016
CB_Nxt.style.display = 'block';
1017
CB_Nxt.onclick = function()
1018![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1019
if (CB_SSTimer)
1020![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1021
CB_SlideShowJump()
1022
}
1023
CB_LoadImage(CB_ActImgId + 1);
1024
return false
1025
}
1026
}
1027
return
1028
}
1029![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
1030
function CB_Close()
1031![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
1032
CB_SlideShowStop();
1033
CB_Txt.innerHTML = "";
1034
CB_Img.src = "";
1035
CB_ImgWidth = CB_WinBaseW;
1036
CB_ImgHeight = CB_WinBaseH - CB_TextH;
1037
CB_ImgCont.style.height = CB_ImgHeight + (2 * CB_ImgBorder) + 'px';
1038
CB_Img.style.display = 'none';
1039
CB_Win.style.visibility = 'hidden';
1040
CB_HideContent.onclick = "";
1041
CB_ShowDocument();
1042
MyMar3=setInterval(Marquee3,speed);
1043
return
1044
}
1045![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
1046
function CB_ShowDocument()
1047![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
1048
if (CB_Hide > 0)
1049![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
1050
CB_HideContent.style.opacity = (CB_Hide / 100);
1051
CB_HideContent.style.MozOpacity = (CB_Hide / 100);
1052
CB_HideContent.style.KhtmlOpacity = (CB_Hide / 100);
1053
CB_HideContent.style.filter = "alpha(opacity=" + CB_Hide + ")";
1054
CB_Hide -= CB_OpacityStep;
1055
CB_Blur = setTimeout("CB_ShowDocument()", 5)
1056
}
1057
else
1058![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
1059
CB_HideContent.style.visibility = 'hidden';
1060
CB_HideContent.style.width = '0px';
1061
CB_HideContent.style.height = '0px';
1062
if (CB_HideOpacity != 0)
1063![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
1064
clearTimeout(CB_Blur)
1065
}
1066
CB_ClearBox = 'ki';
1067
return
1068
}
1069
}
1070![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
1071
function getDocumentSize()
1072![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
1073
this.DocSizeX = 0;
1074
this.DocSizeY = 0;
1075
if (window.innerWidth && window.scrollMaxX)
1076![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1077
DocSizeX = window.innerWidth + window.scrollMaxX;
1078
DocSizeY = window.innerHeight + window.scrollMaxY
1079
}
1080
else if (document.body.scrollWidth > document.body.offsetWidth)
1081![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1082
DocSizeX = document.body.scrollWidth;
1083
DocSizeY = document.body.scrollHeight
1084
}
1085
else
1086![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1087
DocSizeX = document.body.offsetWidth;
1088
DocSizeY = document.body.offsetHeight
1089
}
1090
if (navigator.userAgent.indexOf("MSIE") != - 1 || navigator.userAgent.indexOf("Opera") != - 1)
1091![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1092
DocSizeX = document.body.scrollWidth;
1093
DocSizeY = document.body.scrollHeight
1094
}
1095
if (navigator.userAgent.indexOf("Firefox") != - 1 || navigator.userAgent.indexOf("Netscape") != - 1)
1096![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1097
DocSizeX = BrSizeX + window.scrollMaxX;
1098
DocSizeY = BrSizeY + window.scrollMaxY
1099
}
1100
return
1101
}
1102![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
1103
function getBrowserSize()
1104![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
1105
this.BrSizeX = 0;
1106
this.BrSizeY = 0;
1107
if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
1108![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1109
BrSizeX = document.documentElement.clientWidth;
1110
BrSizeY = document.documentElement.clientHeight
1111
}
1112
else if (typeof(window.innerWidth) == 'number')
1113![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1114
BrSizeX = window.innerWidth;
1115
BrSizeY = window.innerHeight
1116
}
1117
else if (document.body && (document.body.clientWidth || document.body.clientHeight))
1118![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1119
BrSizeX = document.body.clientWidth;
1120
BrSizeY = document.body.clientHeight;
1121
return
1122
}
1123
if (navigator.userAgent.indexOf("Opera") != - 1)
1124![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1125
BrSizeX = document.documentElement.clientWidth;
1126
BrSizeY = document.body.clientHeight
1127
}
1128
if (document.compatMode.match('Back') && navigator.userAgent.indexOf("Firefox") != - 1)
1129![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1130
BrSizeY = document.body.clientHeight
1131
}
1132
return
1133
}
1134![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
1135
function getScrollPosition()
1136![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
1137
this.DocScrX = 0;
1138
this.DocScrY = 0;
1139
if (typeof(window.pageYOffset) == 'number')
1140![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1141
DocScrY = window.pageYOffset;
1142
DocScrX = window.pageXOffset
1143
}
1144
else if (document.body && (document.body.scrollLeft || document.body.scrollTop))
1145![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1146
DocScrY = document.body.scrollTop;
1147
DocScrX = document.body.scrollLeft
1148
}
1149
else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop))
1150![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1151
DocScrY = document.documentElement.scrollTop;
1152
DocScrX = document.documentElement.scrollLeft
1153
}
1154
return
1155
}
1156![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
1157
function CB_pngFixIE()
1158![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
1159
var s, i, j;
1160
var a = new Array();
1161
a.push(document.getElementById('CB_CloseWindow'));
1162
a.push(document.getElementById('CB_SlideShowS'));
1163
a.push(document.getElementById('CB_SlideShowP'));
1164
for (i = 0; i < a.length; i++)
1165![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1166
s = a[i].getAttribute('src');
1167
if (s.toLowerCase().indexOf(".png") != - 1)
1168![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1169
a[i].src = CB_PicDir + 'blank.gif';
1170
a[i].style.filter += "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + s + "', sizingMethod=image);"
1171
}
1172
}
1173
for (i = 0; i < document.styleSheets.length; i++)
1174![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1175
if (document.styleSheets[i].href.match('clearbox.css'))
1176![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1177
var b = document.styleSheets[i].href.lastIndexOf("/");
1178
var c = (b != - 1) ? document.styleSheets[i].href.substring(0, b + 1): "";
1179
for (j = 0; j < document.styleSheets[i].rules.length; j++)
1180![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1181
var d = document.styleSheets[i].rules[j].style;
1182
if (d.backgroundImage.toLowerCase().indexOf(".png") != - 1)
1183![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1184
var e = d.backgroundImage.substring(4, d.backgroundImage.length - 1);
1185
if (e.indexOf("http://") != 0 && e.indexOf("/") != 0)
1186![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
1187
e = c + e;
1188
d.backgroundImage = "none";
1189
d.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + e+"', sizingMethod='crop');"
1190
}
1191
}
1192
}
1193
}
1194
}
1195
}
1196![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
posted on
2009-01-07 18:09
姚姚
阅读(
1500)
评论()
编辑
收藏
举报