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

for(i=0;i<CB_Scripts.length;i++)
{42

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

52

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


{60
document.write('Not Licensed')61
}62

63
else64


{65
document.write('Licensed URL: ' + CB_Mov + '; License Date: ' + CB_Pos)66
}67

68
document.write('" />');69

70
function CB_KeyPress(a)71


{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

{82
if (c == "5" || c == "/")83

{84
window.open(CB_Gallery[CB_ActImgId][0]);85
return false86
}87
if (CB_ActImgId > 1 && (c == "%" || c == "," || b == 52))88

{89
if (CB_SSTimer)90

{91
CB_SlideShowJump()92
}93
CB_LoadImage(CB_ActImgId - 1);94
return false95
}96
if (CB_ActImgId < (CB_Gallery.length - 1)/2 && (c == "'" || c == "." || b == 54))97

{98
if (CB_SSTimer)99

{100
CB_SlideShowJump()101
}102
CB_LoadImage(CB_ActImgId + 1);103
return false104
}105
if ((c == " " || b == 32) && CB_IsAnimating == 0)106

{107
if (CB_SS == 'start')108

{109
CB_SSStart();110
return false111
}112
else113

{114
CB_SSPause();115
return false116
}117
}118
if (c == "" || b == 27)119

{120
CB_Close();121
return false122
}123
if (b == 13)124

{125
return false126
}127
}128
else129

{130
if (CB_IsAnimating == 1 && (c == " " || b == 32 || b == 13))131

{132
return false133
}134
}135
}136

137
function CB_SSStart()138


{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

147
function CB_SSPause()148


{149
CB_SlideP.style.display = 'none';150
CB_SlideS.style.display = 'block';151
CB_SlideShowStop()152
}153

154
CB_AnimTimeout = parseInt(CB_AnimTimeout);155
if (CB_AnimTimeout < 5)156


{157
CB_AnimTimeout = 5158
}159

160
CB_BodyMarginLeft = parseInt(CB_BodyMarginLeft);161
if (CB_BodyMarginLeft < 0)162


{163
CB_BodyMarginLeft = 0164
}165

166
CB_BodyMarginRight = parseInt(CB_BodyMarginRight);167
if (CB_BodyMarginRight < 0)168


{169
CB_BodyMarginRight = 0170
}171

172
CB_BodyMarginTop = parseInt(CB_BodyMarginTop);173
if (CB_BodyMarginTop < 0)174


{175
CB_BodyMarginTop = 0176
}177

178
CB_BodyMarginBottom = parseInt(CB_BodyMarginBottom);179
if (CB_BodyMarginBottom < 0)180


{181
CB_BodyMarginBottom = 0182
}183

184
CB_HideOpacity = parseInt(CB_HideOpacity);185
if (CB_HideOpacity < 0 || CB_HideOpacity > 100)186


{187
CB_HideOpacity = 70188
}189

190
CB_OpacityStep = parseInt(CB_OpacityStep);191
if (CB_OpacityStep < 1 || CB_OpacityStep > CB_HideOpacity)192


{193
CB_OpacityStep = 10194
}195

196
CB_WinBaseW = parseInt(CB_WinBaseW);197
if (CB_WinBaseW < 25 || CB_WinBaseW > 1000)198


{199
CB_WinBaseW = 120200
}201

202
CB_WinBaseH = parseInt(CB_WinBaseH);203
if (CB_WinBaseH < 50 || CB_WinBaseH > 1000)204


{205
CB_WinBaseH = 110206
}207

208
CB_WinPadd = parseInt(CB_WinPadd);209
if (CB_WinPadd < 0)210


{211
CB_WinPadd = 5212
}213

214
if (CB_Animation != 'ki' && CB_Animation != 'normal' && CB_Animation != 'double' && CB_Animation != 'warp')215


{216
CB_Animation = 'double'217
}218

219
CB_Jump_X = parseInt(CB_Jump_X);220
if (CB_Jump_X < 1 || CB_Jump_X > 99)221


{222
CB_Jump_X = 50223
}224

225
CB_Jump_Y = parseInt(CB_Jump_Y);226
if (CB_Jump_Y < 1 || CB_Jump_Y > 99)227


{228
CB_Jump_Y = 50229
}230

231
CB_ImgBorder = parseInt(CB_ImgBorder);232
if (CB_ImgBorder < 0)233


{234
CB_ImgBorder = 1235
}236

237
CB_Padd = parseInt(CB_Padd);238
if (CB_Padd < 0)239


{240
CB_Padd = 2241
}242

243
if (CB_ShowImgURL != 'be' && CB_ShowImgURL != 'ki')244


{245
CB_ShowImgURL = 'ki'246
}247

248
CB_PadT = parseInt(CB_PadT);249
if (CB_PadT < 0)250


{251
CB_PadT = 10252
}253

254
CB_RoundPix = parseInt(CB_RoundPix);255
if (CB_RoundPix < 0)256


{257
CB_RoundPix = 12258
}259

260
CB_TextH = parseInt(CB_TextH);261
if (CB_TextH < 25)262


{263
CB_TextH = 40264
}265

266
CB_FontSize = parseInt(CB_FontSize);267
if (CB_FontSize < 6)268


{269
CB_FontSize = 13270
}271

272
if (CB_ImgNum != 'be' && CB_ImgNum != 'ki')273


{274
CB_ImgNum = 'be'275
}276

277
CB_SlShowTime = parseInt(CB_SlShowTime);278
if (CB_SlShowTime < 1)279


{280
CB_SlShowTime = 5281
}282

283
CB_SlShowTime *= 1000;284
if (CB_CheckDuplicates != 'be' && CB_CheckDuplicates != 'ki')285


{286
CB_CheckDuplicates = 'ki'287
}288

289
if (CB_Preload != 'be' && CB_Preload != 'ki')290


{291
CB_Preload = 'be'292
}293

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

304

305

306

307

308
function OnLoad(a, b)309


{310
if (typeof window.addEventListener != 'undefined')311

{312
window.addEventListener(a, b, false)313
}314
else if (typeof document.addEventListener != 'undefined')315

{316
document.addEventListener(a, b, false)317
}318
else if (typeof window.attachEvent != 'undefined')319

{320
window.attachEvent("on" + a, b)321
}322
}323

324
OnLoad('load', CB_Init);325
//------------------------------------------************************-----------------------------------------------------------------326
function CB_Init()327


{328
document.onkeypress = CB_KeyPress;329
if (!document.getElementById('CB_All') && CB_Show != 0)330


{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

{340
CB_ie6RPBug = 1;341
}342
if (navigator.userAgent.indexOf("MSIE") != - 1 && CB_RoundPix < 2)343

{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


{377
CB_pngFixIE()378
}379
if (navigator.userAgent.indexOf("Opera") != - 1)380

{381
CB_BodyMarginX = 0;382
CB_BodyMarginY = 0383
}384
if (navigator.userAgent.indexOf("Firefox") != - 1)385

{386
CB_BodyMarginY = 0387
}388
}389
CB_Links = document.getElementsByTagName('a');390
for (i = 0; i < CB_Links.length; i++)391


{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

{396
if (CB_Rel == 'clearbox')397

{398
CB_Links[i].onclick = function()399

{400
CB_ClickURL(this.rel + '+\\+' + this.getAttribute('href') + '+\\+' + this.getAttribute('title'));401
return false402
}403
}404
else405

{406
if (CB_Rel.substring(0, 8) == 'clearbox' && CB_Rel.charAt(8) == '[' && CB_Rel.charAt(CB_Rel.length - 1) == ']')407

{408
if (CB_Links[i].rel.substring(9, CB_Links[i].rel.length - 1).split(',')[0] != 'clearbox')409

{410
CB_Links[i].onclick = function()411

{412
CB_ClickURL(this.rel.substring(9, this.rel.length - 1) + '+\\+' + this.getAttribute('href') + '+\\+' + this.getAttribute('title'));413
return false414
}415
}416
else417

{418
alert('ClearBox HIBA:\n\nClearBox galeria neve NEM lehet "clearbox[clearbox]"!\n(Helye: dokumentum, a ' + i + '. <a> tag-en belul.)')419
}420
}421
else422

{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

430
function CB_ClickURL(a)431


{clearInterval(MyMar3);432
//-------------------------触发滚动效果停止433
if (CB_Show == 0)434

{435
return false436
}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

{444
CB_SlShowTimer = parseInt(CB_Rel[1]) * 100445
}446
else447

{448
CB_SlShowTimer = CB_SlShowTime449
}450
if (CB_Rel[2] == 'start')451

{452
CB_SS = 'pause'453
}454

if (CB_Gallery && CB_Rel[0] == CB_Gallery[0][0] && CB_Gallery[0][0] != 'clearbox')
{}455
else456

{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

{461
CB_Gallery.push(new Array(CB_Clicked[1], CB_Clicked[2]))462
}463
else464

{465
for (i = 0; i < CB_Links.length; i++)466

{467
if (CB_Links[i].rel.substring(9, CB_Links[i].rel.length - 1).split(',')[0] == CB_Gallery[0][0])468

{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

{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

{486
DocSizeY = BrSizeY487
}488
if ((navigator.userAgent.indexOf("Netscape") != - 1 || navigator.userAgent.indexOf("Firefox") != - 1) && BrSizeX != DocSizeX)489

{490
FF_ScrollbarBug = window.scrollMaxY + window.innerHeight - DocSizeY491
}492
else493

{494
FF_ScrollbarBug = 0495
}496
CB_SetMargins();497
if (CB_BodyMarginX == 0)498

{499
if (DocSizeX > BrSizeX)500

{501
CB_HideContent.style.width = DocSizeX + 'px'502
}503
else504

{505
CB_HideContent.style.width = BrSizeX + 'px'506
}507
}508
else509

{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

517

518

519

520
function CB_HideDocument()521


{522
if (CB_ii < CB_HideOpacity)523

{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
else533

{534
CB_ii = 0;535
CB_HideContent.style.height = DocSizeY + CB_BodyMarginY + 'px';536
if (CB_HideOpacity != 0)537

{538
clearTimeout(CB_Blur);539
}540
CB_NewWindow();541
}542
}543

544
function CB_NewWindow()545


{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

554
function CB_LoadImage(a)555


{556
CB_ClearBox = 'ki';557
CB_jj = 0;558
CB_HideContent.onclick = '';559
if (CB_Gallery.length < 3)560

{561
CB_SlideS.style.display = 'none';562
CB_SlideP.style.display = 'none'563
}564
else565

{566
if (CB_SS == 'start')567

{568
CB_SlideS.style.display = 'block';569
CB_SlideP.style.display = 'none'570
}571
else572

{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

{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

{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

{599
CB_ShowImage();600
alert('找不到文件: ' + CB_Gallery[CB_ActImgId][0]);601
return 602
};603
CB_CheckLoaded()604
}605

606
function CB_CheckLoaded()607


{608
if (CB_Count == 1)609


{610
CB_Loaded = true;611
clearTimeout(CB_ImgLoadTimer);612
CB_GetImageSize();613
return 614
}615
if (CB_Loaded == false && CB_preImages.complete)616


{617
CB_Count++618
}619
CB_ImgLoadTimer = setTimeout("CB_CheckLoaded()", 5);620
return 621
}622

623
function CB_GetImageSize()624


{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


{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


{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


{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


{661
CB_WindowResizeX()662
}663
return 664
}665

666
function CB_WindowResizeX()667


{668
if (CB_ImgWidth == CB_ImgWidthOld)669


{670
if (CB_TimerX)671


{672
clearTimeout(CB_TimerX)673
}674
if (CB_Animation != 'double' && CB_Animation != 'warp')675


{676
CB_WindowResizeY()677
}678
else679


{680
CB_AnimX = 'true'681
}682
return 683
}684
else685


{686
if (CB_ImgWidth < CB_ImgWidthOld)687


{688
if (CB_ImgWidthOld < CB_ImgWidth + 100 && CB_Jump_X > 20)689


{690
CB_JumpX = 20691
}692
if (CB_ImgWidthOld < CB_ImgWidth + 60 && CB_Jump_X > 10)693


{694
CB_JumpX = 10695
}696
if (CB_ImgWidthOld < CB_ImgWidth + 30 && CB_Jump_X > 5)697


{698
CB_JumpX = 5699
}700
if (CB_ImgWidthOld < CB_ImgWidth + 15 && CB_Jump_X > 2)701


{702
CB_JumpX = 2703
}704
if (CB_ImgWidthOld < CB_ImgWidth + 4)705


{706
CB_JumpX = 1707
}708
CB_ImgWidthOld -= CB_JumpX709
}710
else711


{712
if (CB_ImgWidthOld > CB_ImgWidth - 100 && CB_Jump_X > 20)713


{714
CB_JumpX = 20715
}716
if (CB_ImgWidthOld > CB_ImgWidth - 60 && CB_Jump_X > 10)717


{718
CB_JumpX = 10719
}720
if (CB_ImgWidthOld > CB_ImgWidth - 30 && CB_Jump_X > 50)721


{722
CB_JumpX = 5723
}724
if (CB_ImgWidthOld > CB_ImgWidth - 15 && CB_Jump_X > 2)725


{726
CB_JumpX = 2727
}728
if (CB_ImgWidthOld > CB_ImgWidth - 4)729


{730
CB_JumpX = 1731
}732
CB_ImgWidthOld += CB_JumpX733
}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

741
function CB_WindowResizeY()742


{743
if (CB_ImgHeight == CB_ImgHeightOld)744


{745
if (CB_TimerY)746


{747
clearTimeout(CB_TimerY)748
}749
if (CB_Animation != 'double' && CB_Animation != 'warp')750


{751
CB_ShowImage()752
}753
else754


{755
CB_AnimY = 'true'756
}757
return 758
}759
else760


{761
if (CB_ImgHeight < CB_ImgHeightOld)762


{763
if (CB_ImgHeightOld < CB_ImgHeight + 100 && CB_Jump_Y > 20)764


{765
CB_JumpY = 20766
}767
if (CB_ImgHeightOld < CB_ImgHeight + 60 && CB_Jump_Y > 10)768


{769
CB_JumpY = 10770
}771
if (CB_ImgHeightOld < CB_ImgHeight + 30 && CB_Jump_Y > 5)772


{773
CB_JumpY = 5774
}775
if (CB_ImgHeightOld < CB_ImgHeight + 15 && CB_Jump_Y > 2)776


{777
CB_JumpY = 2778
}779
if (CB_ImgHeightOld < CB_ImgHeight + 4)780


{781
CB_JumpY = 1782
}783
CB_ImgHeightOld -= CB_JumpY784
}785
else786


{787
if (CB_ImgHeightOld > CB_ImgHeight - 100 && CB_Jump_Y > 20)788


{789
CB_JumpY = 20790
}791
if (CB_ImgHeightOld > CB_ImgHeight - 60 && CB_Jump_Y > 10)792


{793
CB_JumpY = 10794
}795
if (CB_ImgHeightOld > CB_ImgHeight - 30 && CB_Jump_Y > 5)796


{797
CB_JumpY = 5798
}799
if (CB_ImgHeightOld > CB_ImgHeight - 15 && CB_Jump_Y > 2)800


{801
CB_JumpY = 2802
}803
if (CB_ImgHeightOld > CB_ImgHeight - 4)804


{805
CB_JumpY = 1806
}807
CB_ImgHeightOld += CB_JumpY808
}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

817
function CB_CheckResize()818


{819
if (CB_AnimX == 'true' && CB_AnimY == 'true')820


{821
clearTimeout(CB_ResizeTimer);822
CB_ShowImage();823
return 824
}825
else826


{827
CB_ResizeTimer = setTimeout("CB_CheckResize()", 5)828
}829
}830

831
function CB_ShowImage()832


{833
CB_Cls.onclick = function()834


{835
CB_Close()836
};837
CB_SlideS.onclick = function()838


{839
CB_SSStart();840
return false841
};842
CB_SlideP.onclick = function()843


{844
CB_SSPause();845
return false846
};847
if (CB_Animation != 'warp')848


{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


{857
CB_Close();858
return false859
};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


{864
CB_Txt.innerHTML = "<a target='_blank' href='"+CB_Gallery[CB_ActImgId][0]+"' alt=\'打开原图片<br/>快捷键:/ 或 5\'>" + CB_Gallery[CB_ActImgId][1] + "</a>";865
}866
else867


{868
if (CB_ShowImgURL == 'be')869


{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


{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


{881
CB_ImgWidthOld = CB_ImgWidth;882
CB_ImgHeightOld = CB_ImgHeight883
}884
if (CB_Gallery.length > 2)885


{886
if (CB_SS == 'pause')887


{888
CB_SlideP.style.display = 'block';889
CB_SlideB.style.display = 'block';890
CB_SlideShow()891
}892
else893


{894
CB_SlideS.style.display = 'block'895
}896
}897
else898


{899
CB_SS = 'start'900
}901
CB_ClearBox = 'be';902
CB_IsAnimating = 0;903
return 904
}905

906
function CB_FullSize()907


{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

913
function CB_SlideShowStop()914


{915
CB_SS = 'start';916
CB_SlideShowJump()917
}918

919
function CB_SlideShowJump()920


{921
if (CB_SSTimer)922


{923
clearTimeout(CB_SSTimer)924
}925
CB_jj = 0;926
CB_SlideBW = 0;927
CB_SlideB.style.display = 'none'928
}929

930
function CB_SlideShow()931


{932
if (CB_SlShowTimer > CB_jj)933


{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
else940


{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


{946
CB_LoadImage(1)947
}948
else949


{950
CB_LoadImage(CB_ActImgId + 1)951
}952
return 953
}954
}955

956
function CB_FitToBrowser()957


{958
if (CB_ImgWidth > BrSizeX - (2 * (CB_RoundPix + CB_ImgBorder + CB_Padd + CB_WinPadd)))959


{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


{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

971
function CB_SetMargins()972


{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

980
function CB_PrevNext()981


{982
if (CB_ActImgId > 1)983


{984
if (CB_Preload == 'be')985


{986
PreloadPrv = new Image();987
PreloadPrv.src = CB_Gallery[CB_ActImgId - 1][0]988
}989
if (CB_TextNav == 'be')990


{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> ' + a993
}994
CB_Prv.style.display = 'block';995
CB_Prv.onclick = function()996


{997
if (CB_SSTimer)998


{999
CB_SlideShowJump()1000
}1001
CB_LoadImage(CB_ActImgId - 1);1002
return false1003
}1004
}1005
if (CB_ActImgId < (CB_Gallery.length - 1)/2)1006


{1007
if (CB_Preload == 'be')1008


{1009
PreloadNxt = new Image();1010
PreloadNxt.src = CB_Gallery[CB_ActImgId + 1][0]1011
}1012
if (CB_TextNav == 'be')1013


{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


{1019
if (CB_SSTimer)1020


{1021
CB_SlideShowJump()1022
}1023
CB_LoadImage(CB_ActImgId + 1);1024
return false1025
}1026
}1027
return 1028
}1029

1030
function CB_Close()1031


{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

1046
function CB_ShowDocument()1047


{1048
if (CB_Hide > 0)1049

{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
else1058

{1059
CB_HideContent.style.visibility = 'hidden';1060
CB_HideContent.style.width = '0px';1061
CB_HideContent.style.height = '0px';1062
if (CB_HideOpacity != 0)1063

{1064
clearTimeout(CB_Blur)1065
}1066
CB_ClearBox = 'ki';1067
return 1068
}1069
}1070

1071
function getDocumentSize()1072


{1073
this.DocSizeX = 0;1074
this.DocSizeY = 0;1075
if (window.innerWidth && window.scrollMaxX)1076


{1077
DocSizeX = window.innerWidth + window.scrollMaxX;1078
DocSizeY = window.innerHeight + window.scrollMaxY1079
}1080
else if (document.body.scrollWidth > document.body.offsetWidth)1081


{1082
DocSizeX = document.body.scrollWidth;1083
DocSizeY = document.body.scrollHeight1084
}1085
else1086


{1087
DocSizeX = document.body.offsetWidth;1088
DocSizeY = document.body.offsetHeight1089
}1090
if (navigator.userAgent.indexOf("MSIE") != - 1 || navigator.userAgent.indexOf("Opera") != - 1)1091


{1092
DocSizeX = document.body.scrollWidth;1093
DocSizeY = document.body.scrollHeight1094
}1095
if (navigator.userAgent.indexOf("Firefox") != - 1 || navigator.userAgent.indexOf("Netscape") != - 1)1096


{1097
DocSizeX = BrSizeX + window.scrollMaxX;1098
DocSizeY = BrSizeY + window.scrollMaxY1099
}1100
return 1101
}1102

1103
function getBrowserSize()1104


{1105
this.BrSizeX = 0;1106
this.BrSizeY = 0;1107
if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))1108


{1109
BrSizeX = document.documentElement.clientWidth;1110
BrSizeY = document.documentElement.clientHeight1111
}1112
else if (typeof(window.innerWidth) == 'number')1113


{1114
BrSizeX = window.innerWidth;1115
BrSizeY = window.innerHeight1116
}1117
else if (document.body && (document.body.clientWidth || document.body.clientHeight))1118


{1119
BrSizeX = document.body.clientWidth;1120
BrSizeY = document.body.clientHeight;1121
return 1122
}1123
if (navigator.userAgent.indexOf("Opera") != - 1)1124


{1125
BrSizeX = document.documentElement.clientWidth;1126
BrSizeY = document.body.clientHeight1127
}1128
if (document.compatMode.match('Back') && navigator.userAgent.indexOf("Firefox") != - 1)1129


{1130
BrSizeY = document.body.clientHeight1131
}1132
return 1133
}1134

1135
function getScrollPosition()1136


{1137
this.DocScrX = 0;1138
this.DocScrY = 0;1139
if (typeof(window.pageYOffset) == 'number')1140


{1141
DocScrY = window.pageYOffset;1142
DocScrX = window.pageXOffset1143
}1144
else if (document.body && (document.body.scrollLeft || document.body.scrollTop))1145


{1146
DocScrY = document.body.scrollTop;1147
DocScrX = document.body.scrollLeft1148
}1149
else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop))1150


{1151
DocScrY = document.documentElement.scrollTop;1152
DocScrX = document.documentElement.scrollLeft1153
}1154
return 1155
}1156

1157
function CB_pngFixIE()1158


{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


{1166
s = a[i].getAttribute('src');1167
if (s.toLowerCase().indexOf(".png") != - 1)1168


{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


{1175
if (document.styleSheets[i].href.match('clearbox.css'))1176


{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


{1181
var d = document.styleSheets[i].rules[j].style;1182
if (d.backgroundImage.toLowerCase().indexOf(".png") != - 1)1183


{1184
var e = d.backgroundImage.substring(4, d.backgroundImage.length - 1);1185
if (e.indexOf("http://") != 0 && e.indexOf("/") != 0)1186


{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

浙公网安备 33010602011771号