/** * Fonction de vérification du formulaire de téléintervention. */ function validTeleintervention() { var name = $.trim($("#name").val()); var email = $.trim($("#email").val()); //var condition = $("#condition").attr("checked"); if (name == "" || email == "") { alert("Votre nom et votre adresse email sont obligatoires."); return false; } return true; } /** * Fonction de vérification et de validation du formulaire Espace Client. */ function validEspaceClient() { var repertoire = $.trim($("#repertoire").val()); if (repertoire == "") { alert("Veuillez saisir votre répertoire."); return false; } else { popup({url:"/users/" + repertoire + "/",width:500,height:500,options:""}); } return false; } function onPageLoad() { $("#espace-clients").hide(); $("#teleintervention").submit(validTeleintervention); $("#espace-clients").submit(validEspaceClient); $("#pied").corner("tl bl 6px"); $("#menu").corner("tl bl 6px #a0b2c9"); $(".espace-clients-button").click( function () { switchForm("espace-clients"); return false; } ); $(".teleintervention-button").click( function () { switchForm("teleintervention"); return false; } ); $("#menu > li").mouseover( function () { $(this).addClass("hover"); } ) .mouseout( function () { $(this).removeClass("hover"); } ); $(".sousmenu > li").mouseover( function () { $(this).addClass("hover"); } ) .mouseout( function () { $(this).removeClass("hover"); } ); $(".sousmenu2 > li").mouseover( function () { $(this).addClass("hover"); } ) .mouseout( function () { $(this).removeClass("hover"); } ); } $(document).ready(onPageLoad);