jQuery(document).ready(TB_init);function TB_init(){jQuery("a.thickbox").click(function(){var A=this.title||this.name||null;var B=this.rel||false;TB_show(A,this.href,B);this.blur();return false;});jQuery("input.thickbox").click(function(){TB_showButton();return false;});jQuery("input.printbox").click(function(){TB_showButton();return false;});}function TB_showButton(){try{if(document.getElementById("TB_HideSelect")==null){jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");}jQuery(window).scroll(TB_position);TB_overlaySize();jQuery("body").append("<div id='TB_load'><img src='/caster/images/loadingAnimation.gif' /></div>");TB_load_position();jQuery(window).resize(function(){TB_parseQuery();TB_position();});}catch(A){alert("Errore nella funzione [thickbox.js].TB_showButton\nException\nError name: "+A.name+". Error message: "+A.message);}}function TB_show(I,B,G){try{if(document.getElementById("TB_HideSelect")==null){jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");}if(I==null){I="";}jQuery(window).scroll(TB_position);TB_overlaySize();if(B.indexOf("?")!==-1){var C=B.substr(0,B.indexOf("?"));}else{var C=B;}var E=/\.jpg|\.jpeg|\.png|\.gif|\.bmp/g;var J=C.toLowerCase().match(E);if(J==".jpg"||J==".jpeg"||J==".png"||J==".gif"||J==".bmp"){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(G){TB_TempArray=jQuery("a[@rel="+G+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML==""));TB_Counter++){var F=TB_TempArray[TB_Counter].href.toLowerCase().match(E);if(!(TB_TempArray[TB_Counter].href==B)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length);}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var N=TB_getPageSize();var L=N[0]-150;var Q=N[1]-150;var M=imgPreloader.width;var K=imgPreloader.height;if(M>L){K=K*(L/M);M=L;if(K>Q){M=M*(Q/K);K=Q;}}else{if(K>Q){M=M*(Q/K);K=Q;if(M>L){K=K*(L/M);M=L;}}}TB_WIDTH=M+30;TB_HEIGHT=K+60;jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+B+"' width='"+M+"' height='"+K+"' alt='"+I+"'/></a>"+"<div id='TB_caption'>"+I+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'></div>");jQuery("#TB_closeWindowButton").click(TB_remove);if(!(TB_PrevHTML=="")){function P(){if(jQuery(document).unbind("click",P)){jQuery(document).unbind("click",P);}jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");TB_show(TB_PrevCaption,TB_PrevURL,G);return false;}jQuery("#TB_prev").click(P);}if(!(TB_NextHTML=="")){function O(){jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");TB_show(TB_NextCaption,TB_NextURL,G);return false;}jQuery("#TB_next").click(O);}document.onkeydown=function(R){if(R==null){keycode=event.keyCode;}else{keycode=R.which;}if(keycode==27){TB_remove();}else{if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";O();}}else{if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";P();}}}}};TB_position();jQuery("#TB_load").remove();jQuery("#TB_ImageOff").click(TB_remove);jQuery("#TB_window").css({display:"block"});};imgPreloader.src=B;}else{var A=B.replace(/^[^\?]+\??/,"");var D=TB_parseQuery(A);TB_WIDTH=(D["width"]*1)+30;TB_HEIGHT=(D["height"]*1)+40;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(B.indexOf("TB_iframe")!=-1){urlNoQuery=B.split("TB_");jQuery("#TB_window").append("<iframe scrolling='no' frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' onload='TB_showIframe()'> </iframe>");}else{jQuery("#TB_window").append("<div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");}jQuery("#TB_closeWindowButton").click(TB_remove);if(B.indexOf("TB_inline")!=-1){jQuery("#TB_ajaxContent").html(jQuery("#"+D["inlineId"]).html());TB_position();jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});}else{if(B.indexOf("TB_iframe")!=-1){TB_position();if(frames["TB_iframeContent"]==undefined){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});jQuery(document).keyup(function(L){var K=L.keyCode;if(K==27){TB_remove();}});}}else{jQuery("#TB_ajaxContent").load(B,function(){TB_position();jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});});}}}jQuery(window).resize(TB_position);document.onkeyup=function(K){if(K==null){keycode=event.keyCode;}else{keycode=K.which;}if(keycode==27){TB_remove();}};}catch(H){alert("Errore nella funzione [thickbox.js].TB_show\nException\nError name: "+H.name+". Error message: "+H.message);}}function TB_show2(H,B,F){try{if(document.getElementById("TB_HideSelect")==null){jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");jQuery("#TB_overlay").click(TB_remove);}if(H==null){H="";}jQuery(window).scroll(TB_position);TB_overlaySize();if(B.indexOf("?")!==-1){var C=B.substr(0,B.indexOf("?"));}else{var C=B;}var E=/\.jpg|\.jpeg|\.png|\.gif|\.bmp/g;var I=C.toLowerCase().match(E);var A=B.replace(/^[^\?]+\??/,"");var D=TB_parseQuery(A);TB_WIDTH=(D["width"]*1)+30;TB_HEIGHT=(D["height"]*1)+40;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(B.indexOf("TB_iframe")!=-1){urlNoQuery=B.split("TB_");jQuery("#TB_window").append("<iframe scrolling='no' frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' onload='TB_showIframe()'> </iframe>");jQuery("body").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+H+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Chiudi'><span class='testo' style='color:#000000;'>chiudi</span></a></div></div>");}else{jQuery("#TB_window").append("<div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");}jQuery("#TB_closeWindowButton").click(TB_remove);if(B.indexOf("TB_inline")!=-1){jQuery("#TB_ajaxContent").html(jQuery("#"+D["inlineId"]).html());TB_position();jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});}else{if(B.indexOf("TB_iframe")!=-1){TB_position();if(frames["TB_iframeContent"]==undefined){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});jQuery(document).keyup(function(K){var J=K.keyCode;if(J==27){TB_remove();}});}}else{jQuery("#TB_ajaxContent").load(B,function(){TB_position();jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});});}}jQuery(window).resize(TB_position);document.onkeyup=function(J){if(J==null){keycode=event.keyCode;}else{keycode=J.which;}if(keycode==27){TB_remove();}};}catch(G){alert("Errore nella funzione [thickbox.js].TB_show2\nException\nError name: "+G.name+". Error message: "+G.message);}}function TB_showIframe(){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});jQuery("#TB_title").css({display:"block"});}function TB_remove(){jQuery("#TB_imageOff").unbind("click");jQuery("#TB_overlay").unbind("click");jQuery("#TB_closeWindowButton").unbind("click");jQuery("#TB_window").fadeOut("fast",function(){jQuery("#TB_window,#TB_overlay,#TB_HideSelect,#TB_title").remove();});jQuery("#TB_load").remove();return false;}function TB_position(){TB_overlaySize();var B=TB_getPageSize();
var A=TB_getPageScrollTop();jQuery("#TB_window").css({width:TB_WIDTH+"px",left:(A[0]+(B[0]-TB_WIDTH)/2)+"px",top:(A[1]+(B[1]-TB_HEIGHT)/2)+"px"});jQuery("#TB_title").css({width:TB_WIDTH+"px",left:(3+A[0]+(B[0]-TB_WIDTH)/2)+"px",top:(3+A[1]+(B[1]-TB_HEIGHT)/2)+"px"});}function TB_overlaySize(){if(window.innerHeight&&window.scrollMaxY||window.innerWidth&&window.scrollMaxX){yScroll=window.innerHeight+window.scrollMaxY;xScroll=window.innerWidth+window.scrollMaxX;var A=document.documentElement;var C=(A&&A.clientWidth)||document.body.clientWidth||window.innerWidth||self.innerWidth;var B=(A&&A.clientHeight)||document.body.clientHeight||window.innerHeight||self.innerHeight;xScroll-=(window.innerWidth-C);yScroll-=(window.innerHeight-B);}else{if(document.body.scrollHeight>document.body.offsetHeight||document.body.scrollWidth>document.body.offsetWidth){yScroll=document.body.scrollHeight;xScroll=document.body.scrollWidth;}else{yScroll=document.body.offsetHeight;xScroll=document.body.offsetWidth;}}jQuery("#TB_overlay").css({"height":yScroll+"px","width":xScroll+"px"});jQuery("#TB_HideSelect").css({"height":yScroll+"px","width":xScroll+"px"});}function TB_load_position(){var B=TB_getPageSize();var A=TB_getPageScrollTop();jQuery("#TB_load").css({left:(A[0]+(B[0]-100)/2)+"px",top:(A[1]+((B[1]-100)/2))+"px"}).css({display:"block"});}function TB_parseQuery(D){var E=new Object();if(!D){return E;}var A=D.split(/[;&]/);for(var C=0;C<A.length;C++){var G=A[C].split("=");if(!G||G.length!=2){continue;}var B=unescape(G[0]);var F=unescape(G[1]);F=F.replace(/\+/g," ");E[B]=F;}return E;}function TB_getPageScrollTop(){var A;var B;if(self.pageYOffset||self.pageXOffset){A=self.pageYOffset;B=self.pageXOffset;}else{if(document.documentElement&&document.documentElement.scrollTop||document.documentElement.scrollLeft){A=document.documentElement.scrollTop;B=document.documentElement.scrollLeft;}else{if(document.body){A=document.body.scrollTop;B=document.body.scrollLeft;}}}arrayPageScroll=new Array(B,A);return arrayPageScroll;}function TB_getPageSize(){var C=document.documentElement;var A=window.innerWidth||self.innerWidth||(C&&C.clientWidth)||document.body.clientWidth;var B=window.innerHeight||self.innerHeight||(C&&C.clientHeight)||document.body.clientHeight;arrayPageSize=new Array(A,B);return arrayPageSize;}jQuery.jheartbeat={options:{url:"heartbeat_default.asp",delay:10000},beatfunction:function(){},timeoutobj:{id:-1},set:function(A,B){if(this.timeoutobj.id>-1){clearTimeout(this.timeoutobj);}if(A){jQuery.extend(this.options,A);}if(B){this.beatfunction=B;}jQuery("body").append('<div id="HeartBeatDIV" style="display: none;"></div>');this.timeoutobj.id=setTimeout("jQuery.jheartbeat.beat();",this.options.delay);},beat:function(){jQuery("#HeartBeatDIV").load(this.options.url);this.timeoutobj.id=setTimeout("jQuery.jheartbeat.beat();",this.options.delay);this.beatfunction();}};function expireSession(){TB_show("","../common/free/sessionExpired.jsp?keepThis=true&TB_iframe=true&height=120&width=240",false);}var loginPageKeepAliveTime=60000;function keepalive(){jQuery.jheartbeat.set({url:casContext+"/keepalive.jsp",delay:loginPageKeepAliveTime},function(){});}function doubleClick(){TB_show2("","../common/free/doubleClick.jsp?keepThis=true&TB_iframe=true&height=110&width=240",false);}
