// Version : 03/07/2011 //======================== // Validation //------------ function validation(){ var x=1; // Identification //---------------- if (c0c1==0){ if (document.frm.lgt.value == "" && x==1){ x=0; document.frm.lgt.focus(); alert(txjs[0]); return false; } if (document.frm.pwt.value == "" && x==1){ x=0; document.frm.pwt.focus(); alert(txjs[1]); return false; } } // mon - mononyme //---------------- if(idd==""){ if(document.frm.mon.value=="" && x==1){ x=0; document.frm.mon.focus(); alert(txjs[3]); return false; } if(document.frm.mon.value.length>20 && x==1){ x=0; document.frm.mon.focus(); alert(txjs[4]); return false; } } // typ - catégorie d'évaluation //------------------------------ var y = 1; for(i=0;i<3;i++){ if(document.frm.typ[i].checked==true) y = 0; } if(y==1 && x==1){ x=0; alert(txjs[5]); return false; } // v_k - type de transaction //--------------------------- var y = 1; for(i=0;i<2;i++){ if(document.frm.v_k[i].checked==true) y = 0; } if(y==1 && x==1){ x=0; alert(txjs[6]); return false; } // txt - commentaire //------------------- if(document.frm.txt.value=="" && x==1){ x=0; document.frm.txt.focus(); alert(txjs[7]); return false; } if(document.frm.txt.value.length>1000 && x==1){ x=0; document.frm.txt.focus(); alert(txjs[8]); return false; } // Formulaire OK //--------------- if(x==1){ if(c0c1==0){ if(document.frm.lgts.checked==true && document.frm.lgt.value!="") SetCookie("c0",t2c(document.frm.lgt.value),exp); else SetCookie("c0","",exp); if(document.frm.pwts.checked==true && document.frm.pwt.value!="") SetCookie("c1",t2c(document.frm.pwt.value),exp); else SetCookie("c1","",exp); } document.frm.ok.value = txjs[2]; document.frm.ok.disabled = true; document.frm.submit(); } } // Fin de chargement //------------------- function onl(){ // Login //------- var lgt = GetCookie("c0"); if(lgt!=null && lgt!=""){ SetCookie("c0",lgt,exp); if (c0c1==0){ document.frm.lgt.value = c2t(lgt); document.frm.lgts.checked = true; } } // Mot de passe //-------------- var pwt = GetCookie("c1"); if(pwt!=null && pwt!=""){ SetCookie("c1",pwt,exp); if (c0c1==0){ document.frm.pwt.value = c2t(pwt); document.frm.pwts.checked = true; } } sca(); } // Scan du formulaire //-------------------- function sca(){ document.frm.txts.value = document.frm.txt.value.length+" / 1000"; setTimeout("sca()",500); }