var IE6=false,IE7=false,IE8=false,FIREFOX35=false,FIREFOX3=false,FIREFOX2=false,FIREFOX=false,NETSCAPE7=false,NETSCAPE=false,OPERA9=false,OPERA=false,SAFARI=false;AUTRE=false;var strChUserAgent=navigator.userAgent,intSplitStart=strChUserAgent.indexOf("(",0),intSplitEnd=strChUserAgent.indexOf(")",0),strChStart=strChUserAgent.substring(0,intSplitStart),strChMid=strChUserAgent.substring(intSplitStart,intSplitEnd),strChEnd=strChUserAgent.substring(strChEnd);
if(strChMid.indexOf("MSIE 7")!=-1)IE7=true;else if(strChMid.indexOf("MSIE 8")!=-1)IE8=true;else if(strChMid.indexOf("MSIE 6")!=-1)IE6=true;else if(strChEnd.indexOf("Firefox/3")!=-1)FIREFOX3=true;else if(strChEnd.indexOf("Firefox/2")!=-1)FIREFOX2=true;else if(strChEnd.indexOf("Safari/")!=-1)SAFARI=true;else AUTRE=true;if(strChEnd.indexOf("Firefox/3.5")!=-1)FIREFOX35=true;if(typeof errorColor=="undefined")errorColor={1:"#80920C",0:"#880000"};
includeTraduct={close:{FR:"Fermer",EN:"close"},select:{FR:"S\u00e9l\u00e9ctionnez",EN:"Select"},the_email:{FR:"Votre email",EN:"Your email"},reinit_password:{FR:"R\u00e9initialiser le mot de passe",EN:"Reset Password"},loading:{FR:"Chargement",EN:"Loading"},send_msg:{FR:"Envoyer le message",EN:"Send message"}};if(typeof language_js=="undefined")language_js="FR";String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};function isdefined(a){return typeof a!="undefined"}
function ClearDummyOption(){dojo.query(".dummyOption").forEach(function(a,b,d){dojo.destroy(a)})}function testCookies(a,b){accepteCookies=navigator.cookieEnabled?true:false;if(typeof navigator.cookieEnabled=="undefined"&&!cookieEnabled){document.cookie="petitTest";accepteCookies=document.cookie.indexOf("petitTest")!=-1?true:false}accepteCookies||document.write("<div class="+b+">"+a+"</div>")}
function responseJson2HTML(a,b){var d=undefined;if(a!=null){var c=a[0];if(a[1]!=null)d=a[1]}c=a;a=dojo.fromJson(b);a.url!=null&&jumpMenuGo(a.url);if(a.focus!=null){dojo.byId(a.focus).parentNode.parentNode.parentNode.scrollIntoView();dojo.byId(a.focus).focus();MarkAsErr(dojo.byId(a.focus))}if(a.responseDiv!=null){c=a.responseDiv;if(a.msg!=null)dojo.byId(c).innerHTML=a.msg;a.urlMsg!=null&&submitFonction(null,c,a.urlMsg)}if(a.responseHTMLDiv!=null){ResponseNodeId=dojo.byId(a.responseHTMLDiv);ResponseNodeId.innerHTML=
a.renduHtml}if(a.msg!=null&&c!=null){showInvisibleDiv(c);b=dojo.animateProperty({node:c,delay:0,duration:1,properties:{backgroundColor:{end:""},color:{end:"black"}}});b.play();backcolorend=a.result?errorColor[1]:errorColor[0];c=dojo.animateProperty({node:c,delay:0,duration:500,properties:{color:"white",backgroundColor:{start:"white",end:backcolorend}}});c.play();a.result&&isdefined(d)&&d(a)}else c!=null&&a.urlMsg==null&&maskInvisibleDiv(c);a.javascriptCode!=null&&eval(a.javascriptCode)}
function jumpMenuGo(a){if((SAFARI||FIREFOX2||FIREFOX3)&&!FIREFOX35)window.location.reload();document.location=a}function refreshPage(){document.location=document.location;if((SAFARI||FIREFOX2||FIREFOX3)&&!FIREFOX35)document.location.reload()}function popup(a,b,d){window.open(a,b,"scrollbars=yes")}
function showWaitBox(){mouseWaitingOn();if(IE6==false){waitBox=document.createElement("div");waitBox.id="waitBox";waitBox.innerHTML=includeTraduct.loading[language_js]+" ";image=document.createElement("img");image.src="/images/ajax-loader.gif";image.width=15;image.height=15;waitBox.appendChild(image);document.body.appendChild(waitBox)}}function hideWaitBox(){if(IE6==false){waitBox=dojo.byId("waitBox");document.body.removeChild(waitBox)}mouseWaitingOff()}
function submitFonction(a,b,d,c,f,e,g,h){if(b!=null){dojoxBaseUrl=dojo.baseUrl;dojoxBaseUrl=dojoxBaseUrl.substring(1,dojoxBaseUrl.length-1)+"x/"}setTimeout("showWaitBox()",150);return dojo.xhrPost({url:d,preventCache:true,failOk:true,form:a,content:e,load:function(j){if(j!=null){if(b!=null)if(dojo.byId(b)!=null){dojo.byId(b).innerHTML=j;var k=dojo.animateProperty({node:b,delay:0,duration:500,properties:{opacity:{start:0,end:1},"-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}});
k.play()}c!=null&&c(f,j);if(g!=null){if(g.parentNode.onclickSave!=null&&h!=true)g.parentNode.onclick=g.parentNode.onclickSave;g.parentNode!=null&&g.parentNode.removeChild(g)}setTimeout("hideWaitBox()",150)}},error:function(j){console.debug("Error: ",j);if(b!=null)if(dojo.byId(b)!=null)dojo.byId(b).innerHTML="Error : "+j.message;setTimeout("hideWaitBox()",150)}})}
function submitFormsendfile(a,b,d,c,f,e){dojo.io.iframe.send({url:d,contentType:"multipart/form-data",handleAs:"html",form:dojo.byId(a),handle:function(g,h){dojo.byId(b).innerHTML=g.body.innerHTML;c!=null&&c(f,g)},error:function(g){console.error("Error: ",g)}})}function showDiv(a){if(a!=null&&dojo.byId(a)!=null){dojo.removeClass(a,"cache");dojo.addClass(a,"montre")}}function maskDiv(a){if(a!=null&&dojo.byId(a)!=null){dojo.removeClass(a,"montre");dojo.addClass(a,"cache")}}
function maskInvisibleDiv(a){if(a!=null&&dojo.byId(a)!=null){dojo.removeClass(a,"montre");dojo.addClass(a,"cacheInv")}}function showInvisibleDiv(a){if(a!=null&&dojo.byId(a)!=null){dojo.removeClass(a,"cacheInv");dojo.addClass(a,"montre")}}
function chargerCSS(a){var b=document.createElement("link");b.setAttribute("rel","stylesheet");b.setAttribute("href",a);b.setAttribute("type","text/css");b.setAttribute("media","screen");b.setAttribute("id","testcsss");document.getElementsByTagName("head")[0].appendChild(b)}function chargerJS(a){var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("src",a);document.getElementsByTagName("head")[0].appendChild(b)}
function copy2Field(a,b){destinationNode=dojo.byId(b);if(destinationNode.value=="")destinationNode.value=a.value}function clearInput(a){a.value="";a.onkeyup()}
function populateSelect(a,b,d,c,f){select=dojo.byId(a);deleteNode(select);a=window.document.createElement("option");a.value="";d=window.document.createTextNode(d);a.appendChild(d);select.appendChild(a);for(key in b)if(b[key].search(new RegExp(c,"i"))!=-1){a=window.document.createElement("option");a.value=key;if(f==key)a.selected=true;d=window.document.createTextNode(b[key]);a.appendChild(d);select.appendChild(a)}}
function populateSelectWhithCat(a,b,d,c,f,e){select=dojo.byId(a);filterValue=c==null?"":c.value=="Saisie rapide"?"":c.value;deleteNode(select);c=window.document.createElement("option");c.value="";d=window.document.createTextNode(d);c.appendChild(d);select.appendChild(c);for(cat in b)if(f==null||f==""||cat==f)for(key in b[cat])if(noaccent(b[cat][key].LABEL).search(new RegExp(noaccent(filterValue),"i"))!=-1){c=window.document.createElement("option");c.value=key;if(key==e){c.selected=true;SAFARI&&c.focus()}d=
window.document.createTextNode(b[cat][key].LABEL);c.title=b[cat][key].LABEL;c.appendChild(d);if(key==e)keyselected=key;select.appendChild(c)}dojo.byId(a).selectedIndex=dojo.byId(a).selectedIndex}
function populateSelectWhithCatAndLocaliz(a,b,d,c,f,e,g){select=dojo.byId(a);filterValue=c==null?"":c.value=="Saisie rapide"?"":c.value;deleteNode(select);c=window.document.createElement("option");c.value="";d=window.document.createTextNode(d);c.appendChild(d);select.appendChild(c);for(localis in b)if(e==localis)for(cat in b[localis])if(f==null||f==""||cat==f)for(key in b[localis][cat])if(noaccent(b[localis][cat][key].LABEL).search(new RegExp(noaccent(filterValue),"i"))!=-1){c=window.document.createElement("option");
c.value=key;if(key==g){c.selected=true;SAFARI&&c.focus()}d=window.document.createTextNode(b[localis][cat][key].LABEL);c.title=b[localis][cat][key].LABEL;c.appendChild(d);if(key==g)keyselected=key;select.appendChild(c)}dojo.byId(a).selectedIndex=dojo.byId(a).selectedIndex}function reloadRegionsSelect(a,b){liste=dojo.fromJson(b);populateSelectWhithCat(a,liste,"- "+includeTraduct.select[language_js]+" -",null,null)}
function desactivateInputInId(a){dojo.query("#"+a+" input").forEach(function(b,d,c){b.disabled=!b.disabled})}function onEnterClick(a,b,d){var c=null;if(d==undefined)d=true;console.debug(d);if(d){if(a.which)c=a.which;else if(a.keyCode)c=a.keyCode;if(13==c){b!=null&&dojo.byId(b).onclick();return false}}}var alreadyInAfficheFormulaire=false;
function afficheFormulaire(a,b,d,c,f){if(alreadyInAfficheFormulaire==false){alreadyInAfficheFormulaire=true;dojo.require("dijit.Dialog");var e;if(c!=null){styleCss="width: "+c+"px;";inputWidth="width: "+(c-25)+"px;"}e=new dijit.Dialog({title:a,"class":"subForm4MssErreur",style:styleCss+"font-size:12px;"});a='<form id="formMsg'+e.id+'" class="formMsg">';a+='<div class="AficheErreur" id="mssErreurSendMsg'+e.id+'"></div>';a+='<input name="contentResponseId" type="hidden" value="'+d+'"/>';if(f!=null)a+=
'<input name="hiddenMsg" type="hidden" value="'+f+'"/>';a+='<input name="dialogId" type="hidden" value="'+e.id+'"/>';a+='Sujet :<br/><input name="sujetMsg" type="text" value="'+b+'" style="'+inputWidth+'" /><br/>';a+='Message :<br/><textarea class="ValRequ" title="le message" id="contentMsg'+e.id+'" name="contentMsg" style="'+inputWidth+'height:100px;"></textarea><br/>';a+='<br/><div class="lienjavaCenter"><a  id="sendMsgBtt'+e.id+'" onClick="dialoghide=validation(\'formMsg'+e.id+"','/compte/index/send-msg',null,null,null,event);\" >"+
includeTraduct.send_msg[language_js]+"</a></div><br/>";a+="</form>";e.attr("content",a);e.onFocus=function(){dojo.byId("contentMsg"+e.id).focus()};e.show();alreadyInAfficheFormulaire=false}}
function afficheFormulaireContact(a,b,d,c,f){if(alreadyInAfficheFormulaire==false){mouseWaitingOn();alreadyInAfficheFormulaire=true;dojo.require("dijit.Dialog");var e;if(c!=null){styleCss="width: "+c+"px;";inputWidth="width: "+(c-25)+"px;"}e=new dijit.Dialog({title:a,"class":"subForm4MssErreur",style:styleCss+"font-size:12px;"});a='<form id="formMsg'+e.id+'" class="formMsg">';a+='<div class="AficheErreur" id="mssErreurSendMsg'+e.id+'"></div>';a+='<input name="dialogId" type="hidden" value="'+e.id+
'"/>';a+='Votre e-mail* :<br/><input id="emailMsg'+e.id+'" title="votre email" class="ValRequ checkEmail" name="email" type="text" style="'+inputWidth+'" /><br/>';a+='<input name="type" value="'+f+'" type="hidden" />';if(f==1)a+='Soci\u00e9t\u00e9 :<br/><input name="societe" type="text" style="'+inputWidth+'" /><br/>';if(f==2)a+='Centre de Recherche / Etablissement :<br/><input name="labs" type="text" style="'+inputWidth+'" /><br/>';a+='Sujet* :<br/><input name="sujetMsg" title="un sujet" class="ValRequ" type="text" value="'+
b+'" style="'+inputWidth+'" /><br/>';a+='Message* :<br/><textarea class="ValRequ" title="le message" name="contentMsg" style="'+inputWidth+'height:100px;"></textarea><br/>';a+='<br/><div class="lienjavaCenter"><a  id="sendMsgBtt'+e.id+'" onClick="dialoghide=validation(\'formMsg'+e.id+"','/index/index/send-msg',null,null,null,event);\" >"+includeTraduct.send_msg[language_js]+"</a></div><br/>";a+='<div id="responseformContact'+e.id+'"></div>';a+="</form>";e.attr("content",a);e.onFocus=function(){dojo.byId("emailMsg"+
e.id).focus()};mouseWaitingOff();e.show();alreadyInAfficheFormulaire=false}}
function afficheFormulaireBug(a,b,d,c,f,e,g){if(alreadyInAfficheFormulaire==false){mouseWaitingOn();alreadyInAfficheFormulaire=true;dojo.require("dijit.Dialog");var h;if(e!=null){styleCss="width: "+e+"px;";inputWidth="width: "+(e-25)+"px;"}h=new dijit.Dialog({title:a,"class":"subForm4MssErreur",style:styleCss+"font-size:12px;"});a='<form id="formMsg'+h.id+'" class="formMsg">';a+='<div class="AficheErreur" id="mssErreurSendMsg'+h.id+'"></div>';a+='<input name="dialogId" type="hidden" value="'+h.id+
'"/>';a+='URL* :<br/><input name="URL" title="l\'URL" class="ValRequ" type="text" value="'+d+'" style="'+inputWidth+'" /><br/>';a+='Votre e-mail* :<br/><input id="emailMsg'+h.id+'" title="votre email" class="ValRequ checkEmail" name="email" type="text" value="'+c+'" style="'+inputWidth+'" /><br/>';a+='<input name="type" value="'+g+'" type="hidden" />';a+='Sujet* :<br/><input name="sujetMsg" title="un sujet" class="ValRequ" type="text" value="'+b+'" style="'+inputWidth+'" /><br/>';a+='Type de bug : <select name="typeBug" title="le type de bug" class="ValRequ"><option value="0" label="- '+
includeTraduct.select[language_js]+' -">- '+includeTraduct.select[language_js]+' -</option><option value="Bug technique/lien cass\u00e9">Bug technique/lien cass\u00e9</option><option value="Ergonomie">Ergonomie</option><option value="Esth\u00e9tique">Esth\u00e9tique</option><option value="Pertinence des r\u00e9sultats">Pertinence des r\u00e9sultats</option><option value="Autre">Autre</option></select><br/>';a+='Message* :<br/><textarea class="ValRequ" title="le message" name="contentMsg" id="contentMsg'+
h.id+'" style="'+inputWidth+'height:100px;"></textarea><br/>';a+='S\u00e9v\u00e9rit\u00e9 du bug : <select name="severite" title="la s\u00e9v\u00e9rit\u00e9 du bug" class="ValRequ"><option value="0" label="- '+includeTraduct.select[language_js]+' -">- '+includeTraduct.select[language_js]+' -</option><option value="Bloquant">Bloquant</option><option value="Majeur">Majeur</option><option value="Mineur">Mineur</option></select><br/>';a+='<br/><div class="lienjavaCenter"><a  id="sendMsgBtt'+h.id+'" onClick="dialoghide=validation(\'formMsg'+
h.id+"','/index/index/send-msg-bug',null,null,null,event);\" >"+includeTraduct.send_msg[language_js]+"</a></div><br/>";a+='<div id="responseformBug'+h.id+'"></div>';a+="</form>";h.attr("content",a);h.onFocus=function(){dojo.byId("contentMsg"+h.id).focus()};mouseWaitingOff();h.show();alreadyInAfficheFormulaire=false}}
function afficheFormulaireLostPassword(a,b,d){if(alreadyInAfficheFormulaire==false){mouseWaitingOn();alreadyInAfficheFormulaire=true;dojo.require("dijit.Dialog");var c;if(d!=null){styleCss="width: "+d+"px;";inputWidth="width: "+(d-25)+"px;"}c=new dijit.Dialog({title:a,"class":"subForm4MssErreur",style:styleCss+"font-size:12px;"});a='<form id="formMsg'+c.id+'">';a+='<div class="AficheErreur" id="mssErreurSendMsg'+c.id+'"></div>';a+='<input name="dialogId" type="hidden" value="'+c.id+'"/>';a+=includeTraduct.the_email[language_js]+
'* :<br/><input id="emailMsg'+c.id+'" title="'+includeTraduct.the_email[language_js]+'" class="ValRequ checkEmail" name="email" onkeypress="return onEnterClick(event,\'sendMsgBtt'+c.id+'\');" type="text" style="'+inputWidth+'" value="'+dojo.byId("username").value+'" /><br/>';a+='<br/><div class="lienjavaCenter"><a  id="sendMsgBtt'+c.id+'" onClick="validation(\'formMsg'+c.id+"','/index/auth/lostpassword?response=responseLostPassword"+c.id+"',null,null,null,event);\" >"+includeTraduct.reinit_password[language_js]+
"</a></div><br/>";a+='<div id="responseLostPassword'+c.id+'"></div>';a+="</form>";c.attr("content",a);c.onFocus=function(){dojo.byId("emailMsg"+c.id).focus()};mouseWaitingOff();c.show();alreadyInAfficheFormulaire=false}}
function popin(a,b,d){if(alreadyInAfficheFormulaire==false){mouseWaitingOn();alreadyInAfficheFormulaire=true;dojo.require("dijit.Dialog");var c;c=new dijit.Dialog({title:a,content:d,autofocus:true,refocus:false,duration:500,"class":"subForm4MssErreur",style:"font-size:12px;",onShow:function(){this.containerNode.innerHTML="";div=document.createElement("div");div.innerHTML=d;if(b!=null)div.style.width=b+"px";this.containerNode.appendChild(div)},onCancel:function(){dojo.query("#"+c.id+" textarea,#"+
c.id+" input,#"+c.id+" select,#"+c.id+" radio").forEach(function(f,e,g){f.blur()})},onHide:function(){setTimeout(function(){c.destroyRecursive()},dijit.defaultDuration*2)}});c.show();mouseWaitingOff();alreadyInAfficheFormulaire=false;return c}}function popinUrl(a,b,d,c){submitFonction(null,null,b,showPopin,{titre:a,xSize:d,jsCode:c})}function updateDialog(a){dialogNode=dijit.byId(a);dialogNode._size();dialogNode._position()}
function txt2Hml(a){a=a.replace(/(\r\n|[\r\n])/g,"<br/>");a=a.replace(/(\r|[\r])/g,"<br/>");return a=a.replace(/(\n|[\n])/g,"<br/>")}function showPopin(a,b){dialog=popin(a.titre,a.xSize,b);dojo.query("#"+dialog.id+" form").forEach(function(d,c,f){c=document.createElement("input");c.type="hidden";c.name="idDialog";c.value=dialog.id;d.appendChild(c)});a.jsCode!=null&&eval(a.jsCode)}
function closeDialogAfter(a){a.idDialog!=undefined&&dijit.byId(a.idDialog).hide();list=a.listFieldsChange;for(i in list)if(dojo.byId(i)!=null){theNode=dojo.byId(i);list[i]!=""?dojo.removeClass(theNode.parentNode,"cache"):dojo.animateProperty({node:theNode.parentNode,delay:2,duration:250,properties:{backgroundColor:{start:"white",end:"#6D6D6D"}},onEnd:function(b){dojo.addClass(b,"cache");b.style.backgroundColor="white"}}).play();theNode.innerHTML=txt2Hml(list[i]);dojo.animateProperty({node:theNode,
delay:2,duration:250,properties:{backgroundColor:{start:"white",end:"#6D6D6D"}},onEnd:function(b){dojo.animateProperty({node:b,delay:2,duration:250,properties:{backgroundColor:{start:"#6D6D6D",end:"white"}}}).play()}}).play()}list=a.listFieldsHrefChange;for(i in list)if(dojo.byId(i)!=null){theNode=dojo.byId(i);theNode.href=list[i]}if(a.bar_percent!=undefined){barwidth=736*(a.bar_percent/100)+5;dojo.animateProperty({node:"progressBarPlein",delay:2,duration:500,properties:{width:{end:barwidth}}}).play();
dojo.byId("bar_percent_label").innerHTML=a.bar_percent+"%";a.emptyDivId!=undefined&&dojo.addClass(a.emptyDivId,"empty");a.fulledDivId!=undefined&&dojo.removeClass(a.fulledDivId,"empty")}}function mouseWriteTxt(a){offsetCss=81;offsetwidth=50;if(!a)a=window.event;waitMouseDiv=dojo.byId("theWaitMouseDiv");waitMouseDiv.style.left=a.screenX+document.documentElement.scrollLeft-offsetwidth+"px";waitMouseDiv.style.top=a.screenY+document.documentElement.scrollTop-offsetCss+"px"}
function mouseWaitingOn(){if(IE6==false)setTimeout('dojo.addClass(document.body,"waiting");',100);else{dojo.byId("theWaitMouseDiv").style.display="block";document.onmousemove=mouseWriteTxt}}function mouseWaitingOff(){if(IE6==false)setTimeout('dojo.removeClass(document.body,"waiting");',150);else{document.onmousemove=null;dojo.byId("theWaitMouseDiv").style.display="none"}}var inithelp=false;
function initialiseHelp(a){if(inithelp==false){mouseWaitingOn();inithelp=true;dojo.query(".bttHelp_R, .bttHelp_L").forEach(function(b,d,c){d=document.createElement("div");d.setAttribute("id","subDiv"+b.id);b.appendChild(d)});setTimeout("initHelpTooltips()",200);setTimeout("dijit.byId('subDiv"+a.id+"DropDownButton').openDropDown();",300)}}
function showHelp(a,b,d){a="subDiv"+a;dojo.require("dijit.form.DropDownButton");dojo.require("dijit.Dialog");styleCss="";if(d!=null){styleCss="width: "+d+"px;";inputWidth="width: "+(d-25)+"px;"}b=new dijit.TooltipDialog({style:styleCss+"font-size:12px;",content:HTMLentitiesdecode(b)+'<br/><div class="clearfloat_B"></div>',autofocus:true});b.startup();var c=new dijit.form.DropDownButton({label:"",id:a+"DropDownButton",dropDown:b});dojo.style(c.domNode,"visibility","hidden");IE6==true&&dojo.style(c.domNode,
"display","none");dojo.connect(dojo.byId(a).parentNode,"onclick",f);dojo.byId(a).parentNode.appendChild(c.domNode);function f(e){c.openDropDown()}mouseWaitingOff()}
function transfert2list(a,b,d){selecteur=dojo.byId(a);listeEtab=dojo.byId(b);listeEtab.selectedIndex=-1;d!=null&&select_by_value(selecteur,d);SelectIndex=selecteur.selectedIndex;if(SelectIndex!=-1){nbrEtabChoisi=listeEtab.length;pasChoisi=true;for(i=0;i<nbrEtabChoisi&&pasChoisi;){if(selecteur.options[SelectIndex].value==listeEtab.options[i].value){pasChoisi=false;etabSup=listeEtab.options[i];listeEtab.options[i].selected="SELECTED"}i++}if(pasChoisi&&selecteur.options[SelectIndex].value!=""){etabSup=
document.createElement("option");etabSup.value=selecteur.options[SelectIndex].value;etabSup.selected="SELECTED";etabSup.innerHTML=selecteur.options[SelectIndex].innerHTML;listeEtab.appendChild(etabSup);etabSup.focus()}}}
function remove2List(a,b){listeEtab=dojo.byId(a);if(b!=null)listeEtab2=dojo.byId(b);SelectIndex=listeEtab.selectedIndex;if(SelectIndex!=-1){nbrEtabChoisi=listeEtab.length;for(i=0;i<nbrEtabChoisi;){if(listeEtab.options[i].selected){b!=""&&b!=null&&listeEtab2.removeChild(listeEtab2.options[i]);listeEtab.removeChild(listeEtab.options[i]);nbrEtabChoisi--;i--}i++}}}function select_by_value(a,b){for(var d=0;d<a.length;d++)if(a.options[d].value==b)a.selectedIndex=d}
function checkboxes2list(a,b,d){listeEtab=dojo.byId(d);listeEtab.selectedIndex=-1;dojo.forEach(dojo.query(".checkbox_domaine_recherche:checked"),function(c){c.checked=false;SelectIndex=c.id.substring(b.length,c.id.length);if(SelectIndex!=""){nbrEtabChoisi=listeEtab.length;pasChoisi=true;for(i=0;i<nbrEtabChoisi&&pasChoisi;){if(SelectIndex==listeEtab.options[i].value){pasChoisi=false;etabSup=listeEtab.options[i];listeEtab.options[i].selected="SELECTED"}i++}if(pasChoisi&&SelectIndex!=""){etabSup=document.createElement("option");
etabSup.value=SelectIndex;etabSup.selected="SELECTED";etabSup.innerHTML=c.value;listeEtab.appendChild(etabSup)}etabSup.focus();dojo.animateProperty({node:etabSup,delay:0,duration:500,properties:{backgroundColor:{start:"#1E90FF",end:"white"},color:{start:"#1E90FF",end:"black"}}}).play()}})}
function filterCheckBoxesTree(a,b,d,c){var f=[],e=[];filterValue=a==null?"":a.value=="Saisie rapide"?"":a.value;if(filterValue!=""){filterValue=noaccent(filterValue);for(cat in d)for(key in d[cat]){inputNode=dojo.byId(c+key);str2find=noaccent(d[cat][key].LABEL);if(str2find.search(new RegExp(filterValue,"i"))!=-1){f[cat]=true;dojo.removeClass(inputNode.parentNode.parentNode,"cache");dojo.removeClass(inputNode.parentNode,"cache")}else{dojo.addClass(inputNode.parentNode.parentNode,"cache");dojo.addClass(inputNode.parentNode,
"cache");inputNode.checked=false;e[cat]=true}}for(cat in e){catNode=dojo.byId(c+cat);if(catNode!=null){catNode=catNode.parentNode.parentNode;dojo.removeClass(catNode,"jstree-open");dojo.addClass(catNode,"explorertree-closed");dojo.addClass(catNode,"cache")}}for(cat in f){catNode=dojo.byId(c+cat);if(catNode!=null){catNode=catNode.parentNode.parentNode;dojo.removeClass(catNode,"explorertree-closed");dojo.addClass(catNode,"jstree-open");dojo.removeClass(catNode,"cache")}}}else{dojo.forEach(dojo.query("#"+
b+" > ul > li"),function(g){dojo.removeClass(g,"jstree-open");dojo.addClass(g,"explorertree-closed")});dojo.forEach(dojo.query("#"+b+" .devlop"),function(g){dojo.removeClass(g,"cache")});dojo.forEach(dojo.query("#"+b+" li"),function(g){dojo.removeClass(g,"cache")});dojo.forEach(dojo.query("#"+b+" label"),function(g){dojo.removeClass(g,"cache")})}}
function noaccent(a){temp=a.replace(/[\u00e0\u00e2\u00e4]/gi,"a");temp=temp.replace(/[\u00e9\u00e8\u00ea\u00eb]/gi,"e");temp=temp.replace(/[\u00ee\u00ef]/gi,"i");temp=temp.replace(/[\u00f4\u00f6]/gi,"o");return temp=temp.replace(/[\u00f9\u00fb\u00fc]/gi,"u")}var selectlist_connections=[];
function showchecklist(a){var b=dojo.query("#"+a.id+" > .checklistdropdown")[0],d;if(selectlist_connections.length==0){selectlist_connections.push(dojo.connect(a,"onmouseleave",f));selectlist_connections.push(dojo.connect(a,"onmouseenter",c));showDiv(b)}function c(g){dojo.disconnect(d)}function f(g){d=dojo.connect(window.document.body,"onclick",e)}function e(g){dojo.forEach(selectlist_connections,dojo.disconnect);selectlist_connections=[];maskDiv(b.id);dojo.disconnect(d)}}
function HTMLentitiesdecode(a){a=a.replace(/&amp;/g,"&");a=a.replace(/&quot;/g,'"');a=a.replace(/&lt;/g,"<");a=a.replace(/&gt;/g,">");a=a.replace(/&cent;/g,"\u00a2");a=a.replace(/&pound;/g,"\u00a3");a=a.replace(/&euro;/g,"\u20ac");a=a.replace(/&yen;/g,"\u00a5");a=a.replace(/&deg;/g,"\u00b0");a=a.replace(/&OElig;/g,"\u00bc");a=a.replace(/&oelig;/g,"\u00bd");a=a.replace(/&Yuml;/g,"\u00be");a=a.replace(/&iexcl;/g,"\u00a1");a=a.replace(/&laquo;/g,"\u00ab");a=a.replace(/&raquo;/g,"\u00bb");a=a.replace(/&iquest;/g,
"\u00bf");a=a.replace(/&Agrave;/g,"\u00c0");a=a.replace(/&Aacute;/g,"\u00c1");a=a.replace(/&Acirc;/g,"\u00c2");a=a.replace(/&Atilde;/g,"\u00c3");a=a.replace(/&Auml;/g,"\u00c4");a=a.replace(/&Aring;/g,"\u00c5");a=a.replace(/&AElig;/g,"\u00c6");a=a.replace(/&Ccedil;/g,"\u00c7");a=a.replace(/&Egrave;/g,"\u00c8");a=a.replace(/&Eacute;/g,"\u00c9");a=a.replace(/&Ecirc;/g,"\u00ca");a=a.replace(/&Euml;/g,"\u00cb");a=a.replace(/&Igrave;/g,"\u00cc");a=a.replace(/&Iacute;/g,"\u00cd");a=a.replace(/&Icirc;/g,
"\u00ce");a=a.replace(/&Iuml;/g,"\u00cf");a=a.replace(/&ETH;/g,"\u00d0");a=a.replace(/&Ntilde;/g,"\u00d1");a=a.replace(/&Ograve;/g,"\u00d2");a=a.replace(/&Oacute;/g,"\u00d3");a=a.replace(/&Ocirc;/g,"\u00d4");a=a.replace(/&Otilde;/g,"\u00d5");a=a.replace(/&Ouml;/g,"\u00d6");a=a.replace(/&Oslash;/g,"\u00d8");a=a.replace(/&Ugrave;/g,"\u00d9");a=a.replace(/&Uacute;/g,"\u00da");a=a.replace(/&Ucirc;/g,"\u00db");a=a.replace(/&Uuml;/g,"\u00dc");a=a.replace(/&Yacute;/g,"\u00dd");a=a.replace(/&THORN;/g,"\u00de");
a=a.replace(/&szlig;/g,"\u00df");a=a.replace(/&agrave;/g,"\u00e0");a=a.replace(/&aacute;/g,"\u00e1");a=a.replace(/&acirc;/g,"\u00e2");a=a.replace(/&atilde;/g,"\u00e3");a=a.replace(/&auml;/g,"\u00e4");a=a.replace(/&aring;/g,"\u00e5");a=a.replace(/&aelig;/g,"\u00e6");a=a.replace(/&ccedil;/g,"\u00e7");a=a.replace(/&egrave;/g,"\u00e8");a=a.replace(/&eacute;/g,"\u00e9");a=a.replace(/&ecirc;/g,"\u00ea");a=a.replace(/&euml;/g,"\u00eb");a=a.replace(/&igrave;/g,"\u00ec");a=a.replace(/&iacute;/g,"\u00ed");
a=a.replace(/&icirc;/g,"\u00ee");a=a.replace(/&iuml;/g,"\u00ef");a=a.replace(/&eth;/g,"\u00f0");a=a.replace(/&ntilde;/g,"\u00f1");a=a.replace(/&ograve;/g,"\u00f2");a=a.replace(/&oacute;/g,"\u00f3");a=a.replace(/&ocirc;/g,"\u00f4");a=a.replace(/&otilde;/g,"\u00f5");a=a.replace(/&ouml;/g,"\u00f6");a=a.replace(/&oslash;/g,"\u00f8");a=a.replace(/&ugrave;/g,"\u00f9");a=a.replace(/&uacute;/g,"\u00fa");a=a.replace(/&ucirc;/g,"\u00fb");a=a.replace(/&uuml;/g,"\u00fc");a=a.replace(/&yacute;/g,"\u00fd");a=a.replace(/&thorn;/g,
"\u00fe");return a=a.replace(/&yuml;/g,"\u00ff")}function hidePanel(a){maskDiv("btthideCritere");mouseWaitingOn();dojo.require("dojo.fx");a=dojo.fx.wipeOut({node:a,duration:300});a.play();mouseWaitingOff();showDiv("bttshowCritere")}function showPanel(a){maskDiv("bttshowCritere");mouseWaitingOn();dojo.require("dojo.fx");a=dojo.fx.wipeIn({node:a,duration:300});a.play();mouseWaitingOff();showDiv("btthideCritere")}
function togglePanel(a,b,d,c,f,e){if(f==undefined)f="toggle_reduce";if(e==undefined)e="toggle_expand";theNode=dojo.byId(a);BttNode=dojo.byId("btt_"+a);if(theNode.panelvisible==undefined)theNode.panelvisible=b;theNode.panelvisible=!theNode.panelvisible;mouseWaitingOn();dojo.require("dojo.fx");if(theNode.panelvisible){a=dojo.fx.wipeOut({node:a,duration:300});BttNode.innerHTML=d;dojo.removeClass(BttNode,f);dojo.addClass(BttNode,e)}else{a=dojo.fx.wipeIn({node:a,duration:300});BttNode.innerHTML=c;dojo.removeClass(BttNode,
e);dojo.addClass(BttNode,f)}a.play();mouseWaitingOff()}function trim(a){return a.replace(/^\s+/g,"").replace(/\s+$/g,"")}function ltrim(a){return a.replace(/^\s+/g,"")}function rtrim(a){return a.replace(/\s+$/g,"")}function deleteNode(a){for(;a.hasChildNodes();)a.removeChild(a.lastChild)}function str_right(a,b){if(b<=0)return"";else if(b>String(a).length)return a;else{var d=String(a).length;return String(a).substring(d,d-b)}}
var zoom=4,autocenter=false,SHADOW_Z_INDEX=10,MARKER_Z_INDEX=11,DIAMETER=200,map,layerTilesAtHome,layer,infocontrols,listMarker=[];
function initPos(a,b){dataArray=dojo.fromJson(b);for(idData in dataArray){data=null;data=dataArray[idData];if(dataArray!=null){if(dataArray.zoom!=undefined)zoom=dataArray.zoom;if(dataArray.autocenter!=undefined)autocenter=dataArray.autocenter}if(data[0]!=undefined){lng=data[0].lng;lat=data[0].lat;name=data.nomorga;ville=data.ville;HTML=data.HTML;countryName=data.countryName;listMarker.push({lng:parseFloat(lng),lat:parseFloat(lat),name:name,ville:ville,countryName:countryName,HTML:HTML});mapdrawFeatures();
if(a!=null){if(a.zoom!=undefined)zoom=a.zoom;if(a.autocenter!=undefined)autocenter=a.autocenter}if(autocenter==true)mapcenterMap();else{francecentrelon=1.9;francecentrelat=47;lonLat=(new OpenLayers.LonLat(francecentrelon,francecentrelat)).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter(lonLat,zoom)}}else data.ville!=undefined&&console.debug(data.ville+" not found.")}}
function mapinit(a){controlList=[];controlList.push(new OpenLayers.Control.PanZoom({zoomWorldIcon:true}));a==true&&controlList.push(new OpenLayers.Control.Navigation({zoomWheelEnabled:false}));map=new OpenLayers.Map("map",{controls:controlList,maxResolution:156543.0399,numZoomLevels:19,units:"m",projection:new OpenLayers.Projection("EPSG:4326"),displayProjection:new OpenLayers.Projection("EPSG:4326")});layerTilesAtHome=new OpenLayers.Layer.OSM.Osmarender("Carte");layerTilesAtHome.buffer=0;if(IE6||
IE7||IE8){layerTilesAtHome.url[0]="/index/index/openstreetmap-tiles/mirror/a/z/${z}/x/${x}/y/${y}";layerTilesAtHome.url[1]="/index/index/openstreetmap-tiles/mirror/b/z/${z}/x/${x}/y/${y}";layerTilesAtHome.url[2]="/index/index/openstreetmap-tiles/mirror/c/z/${z}/x/${x}/y/${y}"}a=IE6?new OpenLayers.StyleMap(OpenLayers.Util.applyDefaults({fillColor:"#E88A1B",fillOpacity:1,strokeColor:"gray",graphicName:"triangle",rotation:180,pointRadius:5},OpenLayers.Feature.Vector.style["default"])):new OpenLayers.StyleMap({externalGraphic:"/scripts/osm/img/marker.png",
backgroundGraphic:"/scripts/osm/img/marker_shadow.png",backgroundXOffset:0,backgroundYOffset:-7,graphicZIndex:MARKER_Z_INDEX,backgroundGraphicZIndex:SHADOW_Z_INDEX,pointRadius:10});layer=new OpenLayers.Layer.Vector("Centre de recherche",{styleMap:a,isBaseLayer:false,rendererOptions:{yOrdering:true}});map.addLayers([layerTilesAtHome,layer]);map.addControl(new OpenLayers.Control.LayerSwitcher);selectControl=new OpenLayers.Control.SelectFeature([layer],{clickout:false,toggle:true,multiple:false,hover:false,
toggleKey:"ctrlKey",multipleKey:"shiftKey"});map.addControl(selectControl);selectControl.activate();layer.events.on({featureselected:function(b){if(b.feature.isOpen!=true){mapshowInfo(b.feature);selectControl.unselect(b.feature);b.feature.isOpen=true}}})}
function mapcenterMap(){lonMoy=latMoy=0;for(idMarker in listMarker){marker=listMarker[idMarker];latMoy+=marker.lat;lonMoy+=marker.lng}lonMoy/=listMarker.length;latMoy/=listMarker.length;lonLatMoy=(new OpenLayers.LonLat(lonMoy,latMoy)).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter(lonLatMoy,zoom)}
function mapdrawFeatures(){layer.removeFeatures(layer.features);var a=[];for(idMarker in listMarker){for(idMarkerAns in listMarker)if(listMarker[idMarker].lng==listMarker[idMarkerAns].lng&&listMarker[idMarker].lat==listMarker[idMarkerAns].lat&&idMarkerAns!=idMarker){listMarker[idMarkerAns].lng+=0.1;listMarker[idMarkerAns].lat+=0.1}marker=listMarker[idMarker];newfeature=new OpenLayers.Feature.Vector((new OpenLayers.Geometry.Point(marker.lng,marker.lat)).transform(new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject()));newfeature.text2affich=marker.name+"<br/>"+marker.ville;if(marker.ville!="")newfeature.text2affich+="&nbsp;";newfeature.text2affich+=marker.countryName;if(marker.HTML!=null)newfeature.text2affich+="<br/>"+marker.HTML;a.push(newfeature)}layer.addFeatures(a)}
function mapshowInfo(a){lonLat=new OpenLayers.LonLat(a.geometry.x,a.geometry.y);framepopup=new OpenLayers.Popup.FramedCloud("framecloud"+a.id,lonLat,null,a.text2affich,null,true,mapclosingPopup);framepopup.markerClicked=a;map.addPopup(framepopup)}function clientMailExpernova(a){location.href="mailto:"+a+String.fromCharCode(64)+"expernova.com"}function mapclosingPopup(a){this.markerClicked.isOpen=false;this.hide()}
function estVisible(a){var b={xMin:0,xMax:0,yMin:0,yMax:0},d={xMin:0,xMax:0,yMin:0,yMax:0};a=a;var c=a.offsetParent,f={hauteur:false,largeur:false},e={hauteur:false,largeur:false};b.xMin=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft;b.xMax=window.pageXOffset+window.innerWidth||document.documentElement.scrollLeft+document.documentElement.clientWidth||document.body.scrollLeft+document.body.clientWidth;b.yMin=window.pageYOffset||document.documentElement.scrollTop||
document.body.scrollTop;b.yMax=window.pageYOffset+window.innerHeight||document.documentElement.scrollTop+document.documentElement.clientHeight||document.body.scrollTop+document.body.clientHeight;d.xMin=a.offsetLeft;for(d.yMin=a.offsetTop;c;){d.xMin+=c.offsetLeft;d.yMin+=c.offsetTop;c=c.offsetParent}d.xMax=d.xMin+a.offsetWidth;d.yMax=d.yMin+a.offsetHeight;if(b.xMin<=d.xMin&&b.xMax>=d.xMax)f.largeur=true;else if(!(b.xMax<d.xMin||b.xMin>d.xMax))e.largeur=true;if(b.yMin<=d.yMin&&b.yMax>=d.yMax)f.hauteur=
true;else if(!(b.yMax<d.yMin||b.yMin>d.yMax))e.hauteur=true;return f.largeur&&f.hauteur?true:f.largeur&&e.hauteur?false:f.hauteur&&e.largeur?true:false}function EncodeQueryData(a){var b=[];for(var d in a)b.push(encodeURIComponent(d)+"="+encodeURIComponent(a[d]));return b.join("&")}function clickbox(a){allchecks=a.parentNode.parentNode;dojo.query("input",allchecks).forEach(function(b,d,c){b.checked=a.checked})};
