var DPbgdiv=null;var DPbgiframe=null;var DPboxdiv=null;var DPtitlediv=null;var DPcontentdiv=null;var DPwidth=0;var DPtitle='';var DPreq=null;var DPxjs=null;function DPinit(){DPboxdiv=document.createElement('DIV');DPboxdiv.id='div_dpbox';document.body.appendChild(DPboxdiv);DPboxdiv.style.display='none';DPboxdiv.innerHTML='<div><div id="div_dptitle" style="float: left;"></div><img src="/images/btclose-off.gif" onmouseover="imgOn(this);" onmouseout="imgOff(this);" style="float: right;" class="pointer" onclick="DPclose();" alt="Cliquez pour fermer" /></div><br class="clear" /><div id="div_dpcontent"></div></div>';var MSIE=navigator.userAgent.indexOf('MSIE');if((MSIE>=0)&&(navigator.userAgent.indexOf('opera')==-1)&&document.all){var IEver=navigator.userAgent.substr(MSIE+5,1);if(parseInt(IEver)<7){DPbgiframe=document.createElement('IFRAME');DPbgiframe.id='div_dpbg';DPbgiframe.backgroundColor='transparent';DPbgiframe.src='#';DPbgiframe.onclick=function(){DPclose();};DPbgiframe.style.top='0px';DPbgiframe.style.left='0px';document.body.appendChild(DPbgiframe);}}
DPbgdiv=document.createElement('DIV');DPbgdiv.id='div_dpbg';document.body.appendChild(DPbgdiv);DPbgdiv.onclick=function(){DPclose();};DPbgdiv.style.top='0px';DPbgdiv.style.left='0px';DPtitlediv=document.getElementById('div_dptitle');DPcontentdiv=document.getElementById('div_dpcontent');}
function DPopen(url,title,width,pdata,xjs){if(!(DPcontentdiv&&DPboxdiv&&DPtitlediv)){DPinit();}
DPshow('Chargement en cours... <i>'+title+'</i>',450,"<center><br /><br /><b><img src=\"/images/loading.gif\" align=\"absmiddle\" /> Chargement en cours... </b><br /><br /><input type=\"button\" class=\"button\" onClick=\"DPclose();\" value=\"Annuler\" /></center><br /><br />");if(DPreq&&DPreq.readyState<4)DPreq.abort();DPreq=new sack(url);DPreq.onCompletion=DPgetResult;DPreq.runAJAX(pdata);DPxjs=(xjs!=null);DPwidth=width;DPtitle=title;}
function DPshow(t,w,c,xjs){if(!(DPcontentdiv&&DPboxdiv&&DPtitlediv)){DPinit();}
var i=0;hideFlash();DPcontentdiv.innerHTML=c;DPtitlediv.innerHTML=t;DPboxdiv.style.width=w+'px';i=document.body.scrollWidth-parseInt(DPboxdiv.style.width);DPboxdiv.style.left=(i>0?(i/2):0)+'px';var st=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)
st=0;var st=Math.max(document.body.scrollTop,document.documentElement.scrollTop);DPboxdiv.style.top=25+st+'px';if(DPbgiframe)DPbgiframe.style.display='block';DPbgdiv.style.display='';DPboxdiv.style.display='';DPbgdiv.style.height=(document.body.clientHeight>document.body.scrollHeight?document.body.clientHeight:document.body.scrollHeight)+'px';DPbgdiv.style.width=document.body.scrollWidth+'px';if(DPbgiframe){DPbgiframe.style.height=DPbgdiv.style.height;DPbgiframe.style.width=DPbgdiv.style.width;}
if(xjs){DPexecJS(c);}}
function DPgetResult(s){if(!DPreq)return;if(typeof(s.response)=='undefined'){var msg="<a href=\"javascript:DPclose();\">Un probleme est survenu, la requete n'as pu etre terminee correctement. ["+s.responseStatus[0]+" / "+s.responseStatus[1]+"]</a>";}else{var msg=DPreq.response;}
DPreq=null;DPshow(DPtitle,DPwidth,msg,DPxjs);}
function DPclose(){if(DPbgdiv&&DPbgdiv.style)DPbgdiv.style.display='none';if(DPboxdiv&&DPboxdiv.style)DPboxdiv.style.display='none';if(DPbgiframe)DPbgiframe.style.display='none';if(DPreq&&DPreq.readyState<4)DPreq.abort();showFlash();}
function DPexecJS(t){var script_open="<script type=\"text/javascript\">";var script_close="</script>";var si=0;while(true){var ss=t.indexOf(script_open,si);if(ss==-1){return;}
var se=t.indexOf(script_close,ss);if(se==-1){return;}
si=se+script_close.length;var sc=t.substring(ss+script_open.length,se);if(window.execScript)
window.execScript(sc);else
window.eval(sc);}}
function DPform(f,url,t,w,xjs){DPopen(url,t,w,Form.serialize(f),xjs);}
function showFlash(){var flashObjects=document.getElementsByTagName("object");for(i=0;i<flashObjects.length;i++){flashObjects[i].style.visibility="visible";}
var flashEmbeds=document.getElementsByTagName("embed");for(i=0;i<flashEmbeds.length;i++){flashEmbeds[i].style.visibility="visible";}}
function hideFlash(){var flashObjects=document.getElementsByTagName("object");for(i=0;i<flashObjects.length;i++){flashObjects[i].style.visibility="hidden";}
var flashEmbeds=document.getElementsByTagName("embed");for(i=0;i<flashEmbeds.length;i++){flashEmbeds[i].style.visibility="hidden";}}