var indicator_img_path="/images/indicator.gif";var indicator_img_html='<img name="ibox_indicator" src="'+indicator_img_path+'" alt="Loading..." style="width:128px;height:128px;"/>';var opacity_level=8;var ibAttr="rel";var imgPreloader=new Image();function init_ibox(){var E="ibox";createIbox(document.getElementsByTagName("body")[0]);var C=document.getElementsByTagName("a");var D;for(var B=0;B<C.length-1;B++){D=C[B];if(D.getAttribute(ibAttr)){var A=D.getAttribute(ibAttr);if((A.indexOf("ibox")!=-1)||A.toLowerCase()=="ibox"){D.onclick=function(){var G=this.getAttribute(ibAttr);var I=parseQuery(G.substr(5,999));var F=this.href;if(this.target!=""){F=this.target}var H=this.title;if(showIbox(F,H,I)){showBG();window.onscroll=maintPos;window.onresize=maintPos}return false}}}}}showBG=function(){var E=getElem("ibox_w");E.style.opacity=0;E.style.filter="alpha(opacity=0)";setBGOpacity=setOpacity;for(var C=0;C<=opacity_level;C++){setTimeout("setIboxOpacity('ibox_w',"+C+")",70*C)}E.style.display="";var B=new getPageSize();var D=new getScrollPos();var A=navigator.userAgent;if(A.indexOf("MSIE ")!=-1){E.style.width=B.width+"px"}E.style.height=B.height+D.scrollY+"px"};hideBG=function(){var A=getElem("ibox_w");A.style.display="none"};var loadCancelled=false;showIndicator=function(){var A=getElem("ibox_progress");A.style.display="";posToCenter(A);A.onclick=function(){hideIbox();hideIndicator();loadCancelled=true}};hideIndicator=function(){var A=getElem("ibox_progress");A.style.display="none";A.onclick=null};createIbox=function(C){var A='<div id="ibox_w" style="display:none;"></div>';A+='<div id="ibox_progress" style="display:none;">';A+=indicator_img_html;A+="</div>";A+='<div id="ibox_wrapper" style="display:none">';A+='<div id="ibox_content"></div>';A+='<div id="ibox_footer_wrapper"><div id="ibox_close" >';A+='<a id="ibox_close_a" style="float:right;" href="javascript:void(null);" >fermer</a></div>';A+='<div id="ibox_footer">&nbsp;</div></div></div></div>';var B=document.getElementsByTagName("body")[0];var D=document.createElement("div");D.setAttribute("id","ibox");D.style.display="";D.innerHTML=A;C.appendChild(D)};var ibox_w_height=0;showIbox=function(B,K,E){var A=getElem("ibox_wrapper");var D=0;var H=getElem("ibox_footer");if(K!=""){H.innerHTML=K}else{H.innerHTML="&nbsp;"}var F=/\.jpg|\.jpeg|\.png|\.gif|\.html|\.htm|\.php|\.cfm|\.asp|\.aspx|\.jsp|\.jst|\.rb|\.rhtml|\.txt/g;var M=B.match(F);if(M==".jpg"||M==".jpeg"||M==".png"||M==".gif"){D=1}else{if(B.indexOf("#")!=-1){D=2}else{if(M==".htm"||M==".html"||M==".php"||M==".asp"||M==".aspx"||M==".jsp"||M==".jst"||M==".rb"||M==".txt"||M==".rhtml"||M==".cfm"){D=3}else{if(E.type){D=parseInt(E.type)}else{hideIbox();return false}}}}D=parseInt(D);switch(D){case 1:showIndicator();imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader=resizeImageToScreen(imgPreloader);hideIndicator();var N='<img name="ibox_img" src="'+B+'" style="width:'+imgPreloader.width+"px;height:"+imgPreloader.height+'px;border:0;cursor:hand;margin:0;padding:0;position:absolute;"/>';if(loadCancelled==false){A.style.height=imgPreloader.height+"px";A.style.width=imgPreloader.width+"px";A.style.display="";A.style.visibility="hidden";posToCenter(A);A.style.visibility="visible";setIBoxContent(N)}};loadCancelled=false;imgPreloader.src=B;break;case 2:var I="";if(E.height){A.style.height=E.height+"px"}else{A.style.height="280px"}if(E.width){A.style.width=E.width+"px"}else{A.style.width="450px"}A.style.display="";A.style.visibility="hidden";posToCenter(A);A.style.visibility="visible";getElem("ibox_content").style.overflow="auto";var C=B.substr(B.indexOf("#")+1,1000);var L=getElem(C);if(L){I=L.innerHTML}setIBoxContent(I);break;case 3:showIndicator();http.open("get",B,true);http.onreadystatechange=function(){if(http.readyState==4){hideIndicator();if(E.height){A.style.height=E.height+"px"}else{A.style.height="280px"}if(E.width){A.style.width=E.width+"px"}else{A.style.width="450px"}A.style.display="";A.style.visibility="hidden";posToCenter(A);A.style.visibility="visible";getElem("ibox_content").style.overflow="auto";var N=http.responseText;setIBoxContent(N)}};http.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");http.send(null);break;default:}A.style.opacity=0;A.style.filter="alpha(opacity=0)";var J=10;setIboxOpacity=setOpacity;for(var G=0;G<=J;G++){setTimeout("setIboxOpacity('ibox_wrapper',"+G+")",30*G)}if(D==2||D==3){A.onclick=null;getElem("ibox_close_a").onclick=function(){hideIbox()}}else{A.onclick=hideIbox;getElem("ibox_close_a").onclick=null}return true};setOpacity=function(B,A){var C=getElem(B);C.style.opacity=A/10;C.style.filter="alpha(opacity="+A*10+")"};resizeImageToScreen=function(C){var B=new getPageSize();var A=B.width-100;var D=B.height-100;if(C.width>A){C.height=C.height*(A/C.width);C.width=A;if(C.height>D){C.width=C.width*(D/C.height);C.height=D}}else{if(C.height>D){C.width=C.width*(D/C.height);C.height=D;if(C.width>A){C.height=C.height*(A/C.width);C.width=A}}}return C};maintPos=function(){var E=getElem("ibox_wrapper");var D=getElem("ibox_w");var B=new getPageSize();var C=new getScrollPos();var A=navigator.userAgent;if(A.indexOf("MSIE ")!=-1){D.style.width=B.width+"px"}if(A.indexOf("Opera/9")!=-1){D.style.height=document.body.scrollHeight+"px"}else{D.style.height=B.height+C.scrollY+"px"}posToCenter(E)};hideIbox=function(){hideBG();var A=getElem("ibox_wrapper");A.style.display="none";clearIboxContent();window.onscroll=null};posToCenter=function(D){var F=new getScrollPos();var B=new getPageSize();var C=new getElementSize(D);var A=Math.round(B.width/2)-(C.width/2)+F.scrollX;var E=Math.round(B.height/2)-(C.height/2)+F.scrollY;D.style.left=A+"px";D.style.top=E+"px"};getScrollPos=function(){var A=document.documentElement;this.scrollX=self.pageXOffset||(A&&A.scrollLeft)||document.body.scrollLeft;this.scrollY=self.pageYOffset||(A&&A.scrollTop)||document.body.scrollTop};getPageSize=function(){var A=document.documentElement;this.width=self.innerWidth||(A&&A.clientWidth)||document.body.clientWidth;this.height=self.innerHeight||(A&&A.clientHeight)||document.body.clientHeight};getElementSize=function(A){this.width=A.offsetWidth||A.style.pixelWidth;this.height=A.offsetHeight||A.style.pixelHeight};setIBoxContent=function(B){clearIboxContent();var A=getElem("ibox_content");A.style.overflow="auto";A.innerHTML=B};clearIboxContent=function(){var A=getElem("ibox_content");A.innerHTML=""};getElem=function(A){return document.getElementById(A)};parseQuery=function(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};createRequestObject=function(){var xmlhttp;
/*@cc_on

	@if (@_jscript_version>= 5)

			try {xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

			} catch (e) {

					try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}

					catch (E) {xmlhttp = false;}

			}

	@else

		xmlhttp = false;

	@end @*/
if(!xmlhttp&&typeof XMLHttpRequest!="undefined"){try{xmlhttp=new XMLHttpRequest()}catch(e){xmlhttp=false}}return xmlhttp};var http=createRequestObject();function addEvent(D,C,A){if(D.addEventListener){D.addEventListener(C,A,false);return true}else{if(D.attachEvent){var B=D.attachEvent("on"+C,A);return B}else{return false}}}addEvent(window,"load",init_ibox);