1var GB_CURRENT=null; 2GB_hide=function(){ 3GB_CURRENT.hide(); 4}; 5GreyBox=new AJS.Class({init:function(_1){ 6this.use_fx=AJS.fx; 7this.type="page"; 8this.overlay_click_close=false; 9this.salt=0; 10this.root_dir=GB_ROOT_DIR; 11this.callback_fns=[]; 12this.reload_on_close=false; 13this.src_loader=this.root_dir+"loader_frame.html"; 14var _2=window.location.hostname.indexOf("www"); 15var _3=this.src_loader.indexOf("www"); 16if(_2!=-1&&_3==-1){ 17this.src_loader=this.src_loader.replace("://","://www."); 18} 19if(_2==-1&&_3!=-1){ 20this.src_loader=this.src_loader.replace("://www.","://"); 21} 22this.show_loading=true; 23AJS.update(this,_1); 24},addCallback:function(fn){ 25if(fn){ 26this.callback_fns.push(fn); 27} 28},show:function(_5){ 29GB_CURRENT=this; 30this.url=_5; 31var _6=[AJS.$bytc("object"),AJS.$bytc("select")]; 32AJS.map(AJS.flattenList(_6),function(_7){ 33_7.style.visibility="hidden"; 34}); 35this.createElements(); 36return false; 37},hide:function(){ 38var _8=this.callback_fns; 39if(_8!=[]){ 40AJS.map(_8,function(fn){ 41fn(); 42}); 43} 44this.onHide(); 45if(this.use_fx){ 46var _a=this.overlay; 47AJS.fx.fadeOut(this.overlay,{onComplete:function(){ 48AJS.removeElement(_a); 49_a=null; 50},duration:300}); 51AJS.removeElement(this.g_window); 52}else{ 53AJS.removeElement(this.g_window,this.overlay); 54} 55this.removeFrame(); 56AJS.REV(window,"scroll",_GB_setOverlayDimension); 57AJS.REV(window,"resize",_GB_update); 58var _b=[AJS.$bytc("object"),AJS.$bytc("select")]; 59AJS.map(AJS.flattenList(_b),function(_c){ 60_c.style.visibility="visible"; 61}); 62GB_CURRENT=null; 63if(this.reload_on_close){ 64window.location.reload(); 65} 66},update:function(){ 67this.setOverlayDimension(); 68this.setFrameSize(); 69this.setWindowPosition(); 70},createElements:function(){ 71this.initOverlay(); 72this.g_window=AJS.DIV({"id":"GB_window"}); 73AJS.hideElement(this.g_window); 74AJS.getBody().insertBefore(this.g_window,this.overlay.nextSibling); 75this.initFrame(); 76this.initHook(); 77this.update(); 78var me=this; 79if(this.use_fx){ 80AJS.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){ 81me.onShow(); 82AJS.showElement(me.g_window); 83me.startLoading(); 84}}); 85}else{ 86AJS.setOpacity(this.overlay,0.7); 87AJS.showElement(this.g_window); 88this.onShow(); 89this.startLoading(); 90} 91AJS.AEV(window,"scroll",_GB_setOverlayDimension); 92AJS.AEV(window,"resize",_GB_update); 93},removeFrame:function(){ 94try{ 95AJS.removeElement(this.iframe); 96} 97catch(e){ 98} 99this.iframe=null; 100},startLoading:function(){ 101this.iframe.src=this.src_loader+"?s="+this.salt++; 102AJS.showElement(this.iframe); 103},setOverlayDimension:function(){ 104var _e=AJS.getWindowSize(); 105if(AJS.isMozilla()||AJS.isOpera()){ 106AJS.setWidth(this.overlay,"100%"); 107}else{ 108AJS.setWidth(this.overlay,_e.w); 109} 110var _f=Math.max(AJS.getScrollTop()+_e.h,AJS.getScrollTop()+this.height); 111if(_f<AJS.getScrollTop()){ 112AJS.setHeight(this.overlay,_f); 113}else{ 114AJS.setHeight(this.overlay,AJS.getScrollTop()+_e.h); 115} 116},initOverlay:function(){ 117this.overlay=AJS.DIV({"id":"GB_overlay"}); 118if(this.overlay_click_close){ 119AJS.AEV(this.overlay,"click",GB_hide); 120} 121AJS.setOpacity(this.overlay,0); 122AJS.getBody().insertBefore(this.overlay,AJS.getBody().firstChild); 123},initFrame:function(){ 124if(!this.iframe){ 125var d={"name":"GB_frame","class":"GB_frame","frameBorder":0}; 126this.iframe=AJS.IFRAME(d); 127this.middle_cnt=AJS.DIV({"class":"content"},this.iframe); 128this.top_cnt=AJS.DIV(); 129this.bottom_cnt=AJS.DIV(); 130AJS.ACN(this.g_window,this.top_cnt,this.middle_cnt,this.bottom_cnt); 131} 132},onHide:function(){ 133},onShow:function(){ 134},setFrameSize:function(){ 135},setWindowPosition:function(){ 136},initHook:function(){ 137}}); 138_GB_update=function(){ 139if(GB_CURRENT){
140GB_CURRENT.update(); 141} 142}; 143_GB_setOverlayDimension=function(){ 144if(GB_CURRENT){ 145GB_CURRENT.setOverlayDimension(); 146} 147}; 148AJS.preloadImages(GB_ROOT_DIR+"indicator.gif"); 149script_loaded=true; 150var GB_SETS={}; 151function decoGreyboxLinks(){ 152var as=AJS.$bytc("a"); 153AJS.map(as,function(a){ 154if(a.getAttribute("href")&&a.getAttribute("rel")){ 155var rel=a.getAttribute("rel"); 156if(rel.indexOf("gb_")==0){ 157var _14=rel.match(/\w+/)[0]; 158var _15=rel.match(/\[(.*)\]/)[1]; 159var _16=0; 160var _17={"caption":a.title||"","url":a.href}; 161if(_14=="gb_pageset"||_14=="gb_imageset"){ 162if(!GB_SETS[_15]){ 163GB_SETS[_15]=[]; 164} 165GB_SETS[_15].push(_17); 166_16=GB_SETS[_15].length; 167} 168if(_14=="gb_pageset"){ 169a.onclick=function(){ 170GB_showFullScreenSet(GB_SETS[_15],_16); 171return false; 172}; 173} 174if(_14=="gb_imageset"){ 175a.onclick=function(){ 176GB_showImageSet(GB_SETS[_15],_16); 177return false; 178}; 179} 180if(_14=="gb_image"){ 181a.onclick=function(){ 182GB_showImage(_17.caption,_17.url); 183return false; 184}; 185} 186if(_14=="gb_page"){ 187a.onclick=function(){ 188var sp=_15.split(/, ?/); 189GB_show(_17.caption,_17.url,parseInt(sp[1]),parseInt(sp[0])); 190return false; 191}; 192} 193if(_14=="gb_page_fs"){ 194a.onclick=function(){ 195GB_showFullScreen(_17.caption,_17.url); 196return false; 197}; 198} 199if(_14=="gb_page_center"){ 200a.onclick=function(){ 201var sp=_15.split(/, ?/); 202GB_showCenter(_17.caption,_17.url,parseInt(sp[1]),parseInt(sp[0])); 203return false; 204}; 205} 206} 207} 208}); 209} 210AJS.AEV(window,"load",decoGreyboxLinks); 211GB_showImage=function(_1a,url,_1c){ 212var _1d={width:300,height:300,type:"image",fullscreen:false,center_win:true,caption:_1a,callback_fn:_1c}; 213var win=new GB_Gallery(_1d); 214return win.show(url); 215}; 216GB_showPage=function(_1f,url,_21){ 217var _22={type:"page",caption:_1f,callback_fn:_21,fullscreen:true,center_win:false}; 218var win=new GB_Gallery(_22); 219return win.show(url); 220}; 221GB_Gallery=GreyBox.extend({init:function(_24){ 222this.parent({}); 223this.img_close=this.root_dir+"g_close.gif"; 224AJS.update(this,_24); 225this.addCallback(this.callback_fn); 226},initHook:function(){ 227AJS.addClass(this.g_window,"GB_Gallery"); 228var _25=AJS.DIV({"class":"inner"}); 229this.header=AJS.DIV({"class":"GB_header"},_25); 230AJS.setOpacity(this.header,0); 231AJS.getBody().insertBefore(this.header,this.overlay.nextSibling); 232var _26=AJS.TD({"id":"GB_caption","class":"caption","width":"40%"},this.caption); 233var _27=AJS.TD({"id":"GB_middle","class":"middle","width":"20%"}); 234var _28=AJS.IMG({"src":this.img_close}); 235AJS.AEV(_28,"click",GB_hide); 236var _29=AJS.TD({"class":"close","width":"40%"},_28); 237var _2a=AJS.TBODY(AJS.TR(_26,_27,_29)); 238var _2b=AJS.TABLE({"cellspacing":"0","cellpadding":0,"border":0},_2a); 239AJS.ACN(_25,_2b); 240if(this.fullscreen){ 241AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this)); 242}else{ 243AJS.AEV(window,"scroll",AJS.$b(this._setHeaderPos,this)); 244} 245},setFrameSize:function(){ 246var _2c=this.overlay.offsetWidth; 247var _2d=AJS.getWindowSize(); 248if(this.fullscreen){ 249this.width=_2c-40; 250this.height=_2d.h-80; 251}
252AJS.setWidth(this.iframe,this.width); 253AJS.setHeight(this.iframe,this.height); 254AJS.setWidth(this.header,_2c); 255},_setHeaderPos:function(){ 256AJS.setTop(this.header,AJS.getScrollTop()+10); 257},setWindowPosition:function(){ 258var _2e=this.overlay.offsetWidth; 259var _2f=AJS.getWindowSize(); 260AJS.setLeft(this.g_window,((_2e-50-this.width)/2)); 261var _30=AJS.getScrollTop()+55; 262if(!this.center_win){ 263AJS.setTop(this.g_window,_30); 264}else{ 265var fl=((_2f.h-this.height)/2)+20+AJS.getScrollTop(); 266if(fl<0){ 267fl=0; 268} 269if(_30>fl){ 270fl=_30; 271} 272AJS.setTop(this.g_window,fl); 273} 274this._setHeaderPos(); 275},onHide:function(){ 276AJS.removeElement(this.header); 277AJS.removeClass(this.g_window,"GB_Gallery"); 278},onShow:function(){ 279if(this.use_fx){ 280AJS.fx.fadeIn(this.header,{to:1}); 281}else{ 282AJS.setOpacity(this.header,1); 283} 284}}); 285AJS.preloadImages(GB_ROOT_DIR+"g_close.gif"); 286GB_showFullScreenSet=function(set,_33,_34){ 287var _35={type:"page",fullscreen:true,center_win:false}; 288var _36=new GB_Sets(_35,set); 289_36.addCallback(_34); 290_36.showSet(_33-1); 291return false; 292}; 293GB_showImageSet=function(set,_38,_39){ 294var _3a={type:"image",fullscreen:false,center_win:true,width:300,height:300}; 295var _3b=new GB_Sets(_3a,set); 296_3b.addCallback(_39); 297_3b.showSet(_38-1); 298return false; 299}; 300GB_Sets=GB_Gallery.extend({init:function(_3c,set){ 301this.parent(_3c); 302if(!this.img_next){ 303this.img_next=this.root_dir+"next.gif"; 304} 305if(!this.img_prev){ 306this.img_prev=this.root_dir+"prev.gif"; 307} 308this.current_set=set; 309},showSet:function(_3e){ 310this.current_index=_3e; 311var _3f=this.current_set[this.current_index]; 312this.show(_3f.url); 313this._setCaption(_3f.caption); 314this.btn_prev=AJS.IMG({"class":"left",src:this.img_prev}); 315this.btn_next=AJS.IMG({"class":"right",src:this.img_next}); 316AJS.AEV(this.btn_prev,"click",AJS.$b(this.switchPrev,this)); 317AJS.AEV(this.btn_next,"click",AJS.$b(this.switchNext,this)); 318GB_STATUS=AJS.SPAN({"class":"GB_navStatus"}); 319AJS.ACN(AJS.$("GB_middle"),this.btn_prev,GB_STATUS,this.btn_next); 320this.updateStatus(); 321},updateStatus:function(){ 322AJS.setHTML(GB_STATUS,(this.current_index+1)+" / "+this.current_set.length); 323if(this.current_index==0){ 324AJS.addClass(this.btn_prev,"disabled"); 325}else{ 326AJS.removeClass(this.btn_prev,"disabled"); 327} 328if(this.current_index==this.current_set.length-1){ 329AJS.addClass(this.btn_next,"disabled"); 330}else{ 331AJS.removeClass(this.btn_next,"disabled"); 332} 333},_setCaption:function(_40){ 334AJS.setHTML(AJS.$("GB_caption"),_40); 335},updateFrame:function(){ 336var _41=this.current_set[this.current_index]; 337this._setCaption(_41.caption); 338this.url=_41.url; 339this.startLoading(); 340},switchPrev:function(){ 341if(this.current_index!=0){ 342this.current_index--; 343this.updateFrame(); 344this.updateStatus(); 345} 346},switchNext:function(){ 347if(this.current_index!=this.current_set.length-1){ 348this.current_index++; 349this.updateFrame(); 350this.updateStatus(); 351} 352}}); 353AJS.AEV(window,"load",function(){ 354AJS.preloadImages(GB_ROOT_DIR+"next.gif",GB_ROOT_DIR+"prev.gif"); 355}); 356GB_show=function(_42,url,_44,_45,_46){ 357var _47={caption:_42,height:_44||500,width:_45||500,fullscreen:false,callback_fn:_46}; 358var win=new GB_Window(_47); 359return win.show(url); 360}; 361GB_showCenter=function(_49,url,_4b,_4c,_4d){ 362var _4e={caption:_49,center_win:true,height:_4b||500,width:_4c||500,fullscreen:false,callback_fn:_4d}; 363var win=new GB_Window(_4e); 364return win.show(url); 365}; 366GB_showFullScreen=function(_50,url,_52){ 367var _53={caption:_50,fullscreen:true,callback_fn:_52}; 368var win=new GB_Window(_53); 369return win.show(url); 370}; 371GB_Window=GreyBox.extend({init:function(_55){ 372this.parent({}); 373this.img_header=this.root_dir+"header_bg.gif"; 374this.img_close=this.root_dir+"w_close.gif"; 375this.show_close_img=true; 376AJS.update(this,_55); 377this.addCallback(this.callback_fn); 378},initHook:function(){ 379AJS.addClass(this.g_window,"GB_Window"); 380this.header=AJS.TABLE({"class":"header"}); 381this.header.style.backgroundImage="url("+this.img_header+")"; 382var _56=AJS.TD({"class":"caption"},this.caption); 383var _57=AJS.TD({"class":"close"}); 384if(this.show_close_img){ 385var _58=AJS.IMG({"src":this.img_close}); 386var _59=AJS.SPAN("Close"); 387var btn=AJS.DIV(_58,_59); 388AJS.AEV([_58,_59],"mouseover",function(){ 389AJS.addClass(_59,"on"); 390}); 391AJS.AEV([_58,_59],"mouseout",function(){ 392AJS.removeClass(_59,"on"); 393}); 394AJS.AEV([_58,_59],"mousedown",function(){ 395AJS.addClass(_59,"click"); 396}); 397AJS.AEV([_58,_59],"mouseup",function(){ 398AJS.removeClass(_59,"click"); 399}); 400AJS.AEV([_58,_59],"click",GB_hide); 401AJS.ACN(_57,btn); 402} 403tbody_header=AJS.TBODY(); 404AJS.ACN(tbody_header,AJS.TR(_56,_57)); 405AJS.ACN(this.header,tbody_header); 406AJS.ACN(this.top_cnt,this.header); 407if(this.fullscreen){ 408AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this)); 409} 410},setFrameSize:function(){ 411if(this.fullscreen){ 412var _5b=AJS.getWindowSize(); 413overlay_h=_5b.h; 414this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10); 415this.height=Math.round(overlay_h-(overlay_h/100)*10); 416}
417AJS.setWidth(this.header,this.width+6); 418AJS.setWidth(this.iframe,this.width); 419AJS.setHeight(this.iframe,this.height); 420},setWindowPosition:function(){ 421var _5c=AJS.getWindowSize(); 422AJS.setLeft(this.g_window,((_5c.w-this.width)/2)-13); 423if(!this.center_win){ 424AJS.setTop(this.g_window,AJS.getScrollTop()); 425}else{ 426var fl=((_5c.h-this.height)/2)-20+AJS.getScrollTop(); 427if(fl<0){ 428fl=0; 429} 430AJS.setTop(this.g_window,fl); 431} 432}}); 433AJS.preloadImages(GB_ROOT_DIR+"w_close.gif",GB_ROOT_DIR+"header_bg.gif"); 434 435 436script_loaded=true;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.