// fonctions pour le menu function init_menu(){ if (PHP_wrong_id) document.getElementById("wrong_id").style.visibility='visible' else document.getElementById("wrong_id").style.visibility='hidden'; if (ID_auth){ // true si le client est authentifie dans la session div_id.style.visibility='hidden'; div_logon.style.display='none'; div_logoff.style.display=''; wrong_id.style.visibility='hidden'; } else { // sinon afficher le menu d'identification div_id.style.visibility='visible'; div_logon.style.display=''; div_logoff.style.display='none'; } return true } function MenuON(num) { document.getElementById("menu"+(num)).bgColor= "99CCFF"; return true; } function MenuOFF(num) { BgC=document.getElementById("centre_left").bgColor; document.getElementById("menu"+(num)).bgColor=BgC; return true; } function logon() { //test de l'identite et du mot de passe. Si ok alors : div_id.style.visibility='hidden'; div_logon.style.display='none'; div_logoff.style.display=''; wrong_id.style.visibility='hidden'; return true; } function logoff(){ div_id.style.visibility='visible'; form_id.reset(); div_logon.style.display=''; div_logoff.style.display='none'; wrong_id.style.visibility='hidden'; return true; } function GigaButton(id, text, click) { var box; if (!(box=document.getElementById(id))) return false; else { box.className='bouton'; var BT=document.createElement('input'); BT.type='button'; BT.value=text; BT.className='bouton'; box.appendChild(BT); var fct; if (click!="") fct = new Function(click); this.setFunction=function(f){fct=f;} BT.onmouseover=function(){BTon(box)} BT.onmouseout=function(){BToff(box)} BT.onclick=function(){BT.blur();BToff(box);fct() } this.BT=BT; this.box=box; this.W=function(w){box.style.width=w};this.S=function(s){BT.style.fontSize=s}; return true; } //function BTon(e) {e.style.backgroundColor= /*"FF6600"*/"F50000";return true} //function BToff(e) {e.style.backgroundColor= "transparent";return true} // nouvelles fonction v1.8b pour tester une nv mise en forme function BTon(e) {BT.className='bouton-ON';/*e.style.backgroundColor='000066'*/;return true} function BToff(e) {BT.className='bouton';/*e.style.backgroundColor= 'transparent'*/;return true} } function div_object(name) { var div_element=document.getElementById(name); div_element.style.display='none'; this.Off=function(){div_element.style.display='none';} this.On=function(){div_element.style.display='';} this.Change=function(){div_element.style.display==''?div_element.style.display='none':div_element.style.display='';} } // fonctions pour les boutons function bgON(nom) { //document.getElementById(nom).bgColor= "F50000"; var N=document.getElementById(nom).firstChild; while (N.nodeName!='BUTTON') N=N.nextSibling; N.className='bouton-ON' ; return true; } function bgOFF(nom) { //document.getElementById(nom).bgColor=""; var N=document.getElementById(nom).firstChild; while (N.nodeName!='BUTTON') N=N.nextSibling; N.className='bouton' ; return true; } // transforme une date en string function DateString(time_value,format){ time_value_str=""; time_value_str=time_value.toLocaleString(); if (format){ // retravaille le format en enlevant les heures pos=time_value_str.indexOf(':'); if (pos >= 3){ time_value_str=time_value_str.substring(0,pos-3) }; }; return time_value_str } // transforme des octest en Mo function ToMo(octets,decimale) { return (octets/1024/1024).toFixed(decimale) } function Str_octets(octets,decimale) { s=Array("Octets","Ko", "Mo", "Go"); t=new Array(2); i=0; t[i]=octets; while (t[i]>999) { t[i+1]=t[i]/1024 ; if (i