
var Fenetres={listeFenetre:Array(),aSupprimer:null,fenetreActive:null,zIndex:10001,numFenetre:0,bDrag:false,bRedim:false,premiereFenetre:true}
Fenetres.resteDerriere=false;Fenetres.ScrollXY=function(el,avecfen){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
if(el!=undefined){var el_=el;while(el_.offsetParent){scrOfX+=el_.scrollLeft;scrOfY+=el_.scrollTop;el_=el_.offsetParent;}}
return[scrOfX,scrOfY];}
Fenetres.supprimerDialogueSaisie=function(){var f=Fenetres.aSupprimer;if(f!=null){var _marge=1;if((fhSouris.xCourant<(f.offsetLeft-_marge))||(fhSouris.xCourant>(f.offsetLeft+f.offsetWidth+_marge))||(fhSouris.yCourant<(f.offsetTop-_marge))||(fhSouris.yCourant>(f.offsetTop+f.offsetHeight+_marge))){}}}
Fenetres.supprimerDialogueSaisie_=function(){var f=Fenetres.aSupprimer;if(f!=null){$el.supprimer(f);Fenetres.aSupprimer=null;document.body.enleverEvenement('click',Fenetres.supprimerDialogueSaisie);}}
Fenetres.LH=function(){var l=0,h=0;if(typeof(window.innerWidth)=='number'){l=window.innerWidth;h=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){l=document.documentElement.clientWidth;h=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){l=document.body.clientWidth;h=document.body.clientHeight;}
return[l,h];}
Fenetres.CoordComplet=function(){var clh=Fenetres.LH();var cs=Fenetres.ScrollXY();return[clh[0],clh[1],cs[0],cs[1]];}
function _(existe){return(existe!=undefined);}
var fhCssListPropTexte=['font-family','text-decoration','font-size','font-style','color','font-variant','font-weight','font-stretch'];var fhCssListPropFond=['background-color','background-image','background-repeat','background-position','background-attachment'];var $E=fhClasse.creer({initialise:function(){var elements_=$T(arguments);this.nb=elements_.length;this.elements=[];for(var i=0;i<this.nb;i++){if($(elements_[i]))this.elements.push($(elements_[i]));}
this.nb=this.elements.length;},devoiler:function(){for(var a in this.elements){$el.devoiler(el);}},affecteStyle:function(st){for(var i=0;i<this.nb;i++){$el.affecteStyle(this.elements[i],st);}},cacher:function(){for(var i=0;i<this.nb;i++){$el.cacher(this.elements[i]);}},afficher:function(){for(var i=0;i<this.nb;i++){$el.afficher(this.elements[i]);}},masquer:function(){for(var i=0;i<this.nb;i++){$el.masquer(this.elements[i]);}}})
var $el={afficher:function(el){if($(el))$(el).style.display='';},basculer:function(el){if($(el)){if($(el).style.display=='none'){$(el).style.display='';}else{$(el).style.display='none';}}},sourisDedans:function(el){el=$(el);if(!el)return false;if(((fhSouris.xCourant>=$el.cX(el))&&(fhSouris.xCourant<=$el.cX(el)+$el.largeur(el)))&&((fhSouris.yCourant>=$el.cY(el))&&(fhSouris.yCourant<=$el.cY(el)+$el.hauteur(el)))){return true;}
return false;},cacher:function(el){if($(el))$(el).style.display='none';},masquer:function(el){if($(el))$(el).style.visibility='hidden';},devoiler:function(el){if($(el))$(el).style.visibility='';},ajouter:function(id,classe,css,elparent){var div=document.createElement("div");if(classe!="undefined"){div.className=classe;}
if(id!="undefined"){div.id=id;}
if(css!="undefined"){affecteStyle(div,css);}
if(elparent==undefined){document.body.appendChild(div);}else{$(elparent).appendChild(div);}
return div;},changeGroupeClasse:function(el,classe,els,classe2){if($(el)){$(el).className=classe;}
var n=els.length;for(var i=0;i<n;i++){if($(els[i])){$(els[i]).className=classe2;}}},supprimer:function(el,elparent){if(!$(el))return false;if(elparent==undefined){document.body.removeChild($(el));}else{$(elparent).removeChild($(el));}},RecupStyle:function(el,t){el=$(el);var nbargs=t.length,s='',r=[],p=null;for(var i=0;i<nbargs;i++){s=$el.recupStyle(el,t[i]);if((t[i]=="background-color")&&(s=="transparent"))s="";if((t[i]=="background-image")&&(s=="none"))s="";if(s){s=$el.taillePixel(el,s);}
p=el.parentNode;while(!s&&p){s=$el.recupStyle(p,t[i]);if((t[i]=="background-color")&&(s=="transparent"))s="";if((t[i]=="background-image")&&(s=="none"))s="";if(s)s=$el.taillePixel(p,s);p=p.parentNode;}
if(s)r.push(t[i].maj_tiret()+":"+s);}
return r.join(';')+';';},recupStyle:function(el,s){if(!el.style)return'';s=$el.styleJS(el,s);var v=el.style[s];if(!v&&el.runtimeStyle){var css=eval("el.currentStyle."+s);v=css?css:'';}
if(!v&&document.defaultView&&document.defaultView.getComputedStyle){try{var css=document.defaultView.getComputedStyle(el,null).getPropertyValue(s.maj_tiret());v=css?css:'';}catch(e){v='';}}
if(s=='opacity')return v?parseFloat(v):1.0;if(v=='auto'){return null;}else{return v;}},StyleA:function(el){el=$(el);var tdiv=document.createElement("a");tdiv.style.height="1em";tdiv.style.position="absolute";tdiv.style.backgroundColor="#f00";tdiv.style.innerHTML='test';el.appendChild(tdiv);var s=$el.StyleTexte(tdiv);el.removeChild(tdiv);return s;},styleJS:function(el,c){if(c==undefined)return'';return(c=='float'||c=='cssFloat')?((el.styleFloat===undefined)?'cssFloat':'styleFloat'):c.tiret_maj();},styleTexte:function(el){var s='',r='';el=$(el);for(var i=0;i<fhCssListPropTexte.length;i++){r=$el.recupStyle(el,fhCssListPropTexte[i]);if(r)s+=fhCssListPropTexte[i]+':'+r;}
return s;},StyleTexte:function(el){return $el.RecupStyle($(el),fhCssListPropTexte);},styleFond:function(el){var s='',r='';el=$(el);for(var i=0;i<fhCssListPropFond.length;i++){r=$el.recupStyle(el,fhCssListPropFond[i]);if(r)s+=fhCssListPropFond[i]+':'+r+';';}
return s;},StyleFond:function(el){el=$(el);return $el.RecupStyle(el,fhCssListPropFond);},affecteStyle:function(el,opt){el=$(el);if(typeof object=="string"){el.style.cssText+=';'+opt;}else{for(var c in opt){el.style[$el.styleJS(el,c)]=opt[c];}}},tailleEm:function(el){el=$(el);var tdiv=document.createElement("div");tdiv.style.height="1em";tdiv.style.position="absolute";tdiv.style.backgroundColor="#f00";el.appendChild(tdiv);var emValue=tdiv.offsetHeight;el.removeChild(tdiv);return emValue;},taillePixel:function(el,em){if(!em.length)return em;el=$(el);if(em.substr(em.length-2)=='em'){var value=$el.tailleEm(el)*parseFloat(em);return(Math.round(value*100)/100)+"px";}else{return em;}},cX:function(el){var coord=$el.cXY(el);return coord.x;},cY:function(el){var coord=$el.cXY(el);return coord.y;},cXY:function(el){var y=0;var x=0;var o=$(el);do{y+=o.offsetTop+(o.currentStyle?(parseInt(o.currentStyle.borderTopWidth)).NaN0():0);x+=o.offsetLeft+(o.currentStyle?(parseInt(o.currentStyle.borderLeftWidth)).NaN0():0);o=o.offsetParent;}while(o);return{x:x,y:y};},sX:function(el,event){var souris=$el.sXY(el,event);return souris.x;},sY:function(el,event){var souris=$el.sXY(el,event);return souris.y;},sXY:function(el,event){event=fhEvenement(event);return{x:fhSouris.x(event)-$el.cX(el),y:fhSouris.y(event)-$el.cY(el)};},hauteur:function(el){el=$(el);var h=el.offsetHeight;if(h>0)return h;if(!el.firstChild)return 0;return el.lastChild.offsetTop-el.firstChild.offsetTop+$el.hauteur(el.lastChild);},largeur:function(el){el=$(el);var l=el.offsetWidth;if(l>0)return l;if(!el.firstChild)return 0;return el.lastChild.offsetLeft-el.firstChild.offsetLeft+$el.largeur(el.lastChild);},largeurMax:function(el,largeur){el=$(el);el.style.width=largeur;if(el.firstChild){for(i=0;i<el.childNodes.length;i++){if(el.childNodes[i].tagName){if(el.childNodes[i].offsetWidth>parseInt(largeur)){$el.largeurMax(el.childNodes[i],largeur);}}}}},cadreDessus:function(qui,sur,queposition){qui.style.position='absolute';qui.style.top=fhPx($el.cY(sur));qui.style.left=fhPx($el.cX(sur));if(!queposition){qui.style.height=fhPx(sur.offsetHeight);qui.style.width=fhPx(sur.offsetWidth);}
qui.style.display='block';},repositionneDansFenetre:function(qui,id,opt){var x=fhSouris.xCourant;var y=fhSouris.yCourant;var options={x:-10,y:-5};if(opt)fhObjet.etendre(options,opt);qui.style.left=fhPx(x+options.x);qui.style.top=fhPx(y+options.y);var XY=Fenetres.ScrollXY(id,true);if(id==undefined){var LH=Fenetres.LH();if(XY[0]+LH[0]<x-5+qui.offsetWidth){qui.style.left=fhPx(XY[0]+LH[0]-qui.offsetWidth);}else{qui.style.left=fhPx(x+options.x);}
if(XY[1]+LH[1]<y-5+qui.offsetHeight){qui.style.top=fhPx(XY[1]+LH[1]-qui.offsetHeight);}else{qui.style.top=fhPx(y+options.y);}}else{var id_=$(id);var XY_=Fenetres.ScrollXY(id_,true);qui.style.left=fhPx(cmGetX(id_)-XY[0]);qui.style.top=fhPx(cmGetY(id_)+cmGetHeight(id_)-XY_[1]);}},opacite:function(el,opa){el=$(el);if(!el)return false;el.style.opacity=(opa/100);el.style.MozOpacity=(opa/100);el.style.KhtmlOpacity=(opa/100);el.style.filter="alpha(opacity="+opa+")";el.valopacite=opa;return el;},enAbsolu:function(el){$(el).style.position='absolute';},enRelatif:function(el){$(el).style.position='relative';},centrer:function(el){el=$(el);xy=Fenetres.ScrollXY();lh=Fenetres.LH();$el.enAbsolu(el);el.style.left=fhPx(parseInt(lh[0]/2)+xy[0]-parseInt($el.largeur(el)/2));if(parseInt(lh[1]/2)+xy[1]-parseInt($el.hauteur(el)/2)<0){el.style.top=fhPx(0);}else{el.style.top=fhPx(parseInt(lh[1]/2)+xy[1]-parseInt($el.hauteur(el)/2));}
el.style.index=++Fenetres.zIndex;}}
function changeOpacite(el,opa){el=$(el);if(!el)return false;el.style.opacity=(opa/100);el.style.MozOpacity=(opa/100);el.style.KhtmlOpacity=(opa/100);el.style.filter="alpha(opacity="+opa+")";el.valopacite=opa;return el;}
var fh_analyse=fhClasse.creer({ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12,initialise:function(el){this.el=$(el);this.el.type=this.el.nodeType;this.fils=this.el.childNodes;},analyser:function(){var s="";var anal='';var nbFils=this.fils.length;if((this.el.type==this.ELEMENT_NODE)&&nbFils>0){s="<ul style=\"margin-left:10px\";>";}
s+=this.infosNoeud();for(var i=0;i<nbFils;i++){anal=new fh_analyse(this.fils[i]);if(this.el.type==this.DOCUMENT_NODE){s+=AnalyseEl(this.el);}else{if(this.el.type==this.ELEMENT_NODE){s+="<li style=\"margin-left:10px\";>"+anal.analyser()+"</li>";}else{s+=anal.analyser();}}}
if((this.el.type==this.ELEMENT_NODE)&&nbFils>0){s+="</ul>";}
return s;},infosNoeud:function(){var s='';if(this.el.type==this.ELEMENT_NODE){var id_='';id_=this.nom();if(id_!="")id_="(id->"+id_+")";s+="["+this.tag()+id_+this.attribut()+"]=>[style:"+this.el.styleTexte()+this.el.styleFond()+"]";}
if(this.el.type==this.TEXT_NODE){s+=this.el.nodeValue;}
return s;},nom:function(){return fh_vide(this.el.id);},tag:function(){return fh_vide(this.el.nodeName||this.el.tagName);},attribut:function(){var s="";var a="";if(this.el.attributes){var nbFils=this.el.attributes.length;for(var i=0;i<nbFils;i++){a=fh_vide(this.el.attributes[i].nodeValue);s+=(a!="")?("->"+fh_vide(this.el.attributes[i].nodeName)+a)+",":"";}}
return s;}})
function fh_vide(s){if((s!=null)&&(s!="undefined")&&(s!=""))return s+":";else return"";}
function au(s){if((s!=null)&&(s!="undefined")&&(s!=""))return s+":";else return"";}
function Analyse(id,src){if(document.frames){var oAnalyse=frames[id];}else{var oAnalyse=$(id).contentWindow;}
if(document.all){oAnalyse.document.designMode="on";}else{try{$(id).contentDocument.designMode="on";}catch(e){setTimeout('$("'+id+'").contentDocument.designMode = "on";',50);}}
var data="src="+$('input_'+id).value;data=HechapS(data);var a=new fhAjax(repRacJS+"./fh_lire_url.php",{asynchrone:true,data:HRemplaceInverseS(data),fonction:function(){oAnalyse.document.clear();oAnalyse.document.open();oAnalyse.document.write(a.reponse());oAnalyse.document.close();var a=oAnalyse.document;var s=AnalyseEl(a);$('analyse_'+id).innerHTML=s;}});}
function AnalyseEl(el){var fils_=el.childNodes;var s="<ul style=\"margin-left:10px\";>";var nbFils=fils_.length;for(var i=0;i<nbFils;i++){if(fils_[i].nodeType==1){s+="<li style=\"margin-left:10px\";>["+(""+au(fils_[i].id)+au(fils_[i].name)+au(fils_[i].tagName)+attributel(fils_[i])+au(fils_[i].nodeValue||fils_[i].value)+((fils_[i].tagName&&(fils_[i].tagName!='LINK')&&(fils_[i].tagName!='SCRIPT')&&(fils_[i].tagName!='META')&&(fils_[i].tagName!='TITLE')&&(fils_[i].tagName!='IMG')&&(fils_[i].tagName!='STYLE')&&(fils_[i].tagName!='HEAD')&&(fils_[i].tagName!='HTML'))?$(fils_[i]).styleTexte()+$(fils_[i]).styleFond():'')+"]</li>");}
if(fils_[i].nodeType==3){s+=fils_[i].nodeValue;}
s+=AnalyseEl(fils_[i]);}
s+="</ul>";return s;}
function attributel(el){var s="";var a="";if(el.attributes){var nbFils=el.attributes.length;for(var i=0;i<nbFils;i++){a=au(el.attributes[i].nodeValue);s+=(a!="")?(""+au(el.attributes[i].nodeName)+a):"";}}
return s;}
function fh_poids_images(el){var xhr_object=Array();el.innerHTML='0 Ko';for(var j=0;j<document.images.length;j++){if((document.images[j].src.search(/icones\//)==-1)&&(document.images[j].src.search(/icone\//)==-1)&&(document.images[j].src.search(/include\//)==-1)){fh_poids_image(el,document.images[j]);}};}
function fh_poids_image(el,img){var a=new fhAjax(repRacJS+"./fh_taille_fichier.php?fich="+img.src,{methode:'GET',asynchrone:true,fonction:function(){el.innerHTML=Math.round((isNaN(parseFloat(el.innerHTML))?0:parseFloat(el.innerHTML))+parseFloat(a.reponse()/1000))+" Ko ";}});}
function fh_src_image(el,el2,img){if($(el)){$(el).src=img;}else{if($(el2))$(el2).src=img;}}
function fhListeChoix(nom,liste,texte,defaut,fonction){if(!texte){texte='[Veuillez choisir]';if(defaut){texte=liste[defaut]['texte'];}else{defaut='';}}
if(!defaut)defaut='';if(!fonction)fonction='';var style='';var classe='';var html='<div class="listeChoix"><table unselectable="On" cellspacing=0 cellpadding=0 style="cursor:pointer;" onclick="$el.basculer(\'liste_choix_'+nom+'\')" ><tbody>';html+='<tr><td  unselectable="On" style="padding-left:2em;padding-right:2em;" id="resultat_form_'+nom+'">'+texte+'<input type="hidden" name="'+nom+'" id="'+nom+'" style="display:none;" value="'+defaut+'" /></td></tr><tr><td><div id="liste_choix_'+nom+'" style="height:10em;overflow:auto;display:none;background-color:grey;position:absolute;z-index:'+(Fenetres.zIndex+10000)+';"><table class="tableListeChoix" cellspacing=0 cellpadding=0><tbody>';for(v in liste){if(liste[v]['style'])style=' style="'+liste[v]['style']+'"';if(liste[v]['classe'])classe=' classe="'+liste[v]['classe']+'"';html+='<tr><td'+style+classe+'" style="cursor:default" unselectable="On"  class="caseListeChoix" onmouseout="this.className=&quot;caseListeChoix&quot;" onmouseover="this.className=&quot;caseListeChoixOver&quot;" onclick="$(\'liste_choix_'+nom+'\').style.display=&quot;none&quot;;$(\''+nom+'\').value=\''+v+'\';'+fonction+';fhEvenement.arreter(event);">'+liste[v]['texte']+'</td></tr>';}
html+='</tbody></table></div></td></tr></tbody></table></div>';return html;}
function fhCacheElementsEditeur(){getElementsByClassName('boutonEditeur',document.body,function(el){if(el.style.display!='none')el.style.display='none';});fhMenuDroit.supprimer();}