var LightboxWindow;Event.observe(window,"load",function(){initLightboxes()});function initLightboxes(){LightboxWindow=new Window({title:"Sample",destroyOnClose:false,recenterAuto:true,modal:true,zIndex:200,resizable:false,draggable:false,closable:true,minimizable:false,maximizable:false,onClose:function(){displayCloseButtons(true)}})}function initLightbox(a){a=$(a).addClassName("processed");a.onclick=function(){return false};a.observe("click",function(){var d=a.readAttribute("dimensions").split("x"),b=a.readAttribute("requestoptions");if(!b||b.length==0)b=null;var e=b!=null?eval("("+b+")"):null;LightboxWindow.setSize(d[0],d[1]);var c=a.url?a.url:a.href;if((index=c.indexOf("#"))>-1){id=c.substring(index+1,a.href.length);LightboxWindow.setContent(id,false,false);LightboxWindow.showCenter(true)}else LightboxWindow.setAjaxContent(c,e,true,true)})}function displayCloseButtons(a){$$(".dialog_close").each(function(b){b.style.display=a?"block":"none"})}function showLightbox(b){var d=$(b).readAttribute("dimensions").split("x"),a=$(b).readAttribute("requestoptions");if(!a||a.length==0)a=null;var e=a!=null?eval("("+a+")"):null;LightboxWindow.setSize(d[0],d[1]);var c=$(b).link?$(b).link:$(b).href;if((index=c.indexOf("#"))>-1){id=c.substring(index+1,c.length);LightboxWindow.setContent(id,false,false);LightboxWindow.showCenter(true)}else LightboxWindow.setAjaxContent(c,e,true,true);displayCloseButtons(false);return false}
