//////////////////////////////////////////////////////////////////////////// // // © PMP CONCEPT 2007 :: FONCTIONS COMMUNES // //////////////////////////////////////////////////////////////////////////// // fonction partagée de gestion des champs de saisie function inputEtat(obj, valide) { if(obj) { if(valide==false) { obj.className = "erreursaisi"; } var imagePath = valide ? "/images/formulaire/fond_ok.png" : "/images/formulaire/retour_liste.png"; if(obj.nextSibling && obj.nextSibling.nodeName.toUpperCase()=="IMG") obj.nextSibling.src = imagePath; else { var imgElement = document.createElement("img"); imgElement.setAttribute("class","statut_formelement"); imgElement.setAttribute("width","12"); imgElement.setAttribute("height","12"); imgElement.className = "statut_formelement"; imgElement.setAttribute("style","margin-left:5px;"); imgElement.src = imagePath; obj.parentNode.insertBefore(imgElement, obj ? obj.nextSibling : null); } } } function confirmVerif(obj, objref) { obj = typeof(obj)=="string" ? document.getElementById(obj) : obj; objref = typeof(objref)=="string" ? document.getElementById(objref) : objref; if(obj && objref && obj.value==objref.value) return true; return false; }