/* ******************************************************************************* */ /* */ /* Gestionnaire de Librairies JavaScript de la base courante */ /* */ /* ******************************************************************************* */ /* *** Chargement de bibliotheque JavaScript ************************************* */ function JSLoader(pLien){ var vLien = pLien; if(vLien != null) { vUrl="\<"+"script language='javascript' src='"+vLien+"'"+"\>"+"\"; document.write(vUrl); } } /* *** Chargement des librairies globales de l'application ********************** */ vPath = "internet"; vDBSource = "ressources.nsf"; vDB = "ohes.nsf"; var vPathSource = "/"+vPath+"/"+vDBSource+"/"; var vPathDB = "/internet/ohes.nsf/"; JSLoader(vPathSource + "Script.js"); /* *** développement de l'interface IHM Web ************************************* */ var GestionPage; function _GestionPage(){ this.getCodePage=function (pCodePage){ if(pCodePage!=null && pCodePage!="")return pCodePage; vDocumentPath=null; vDocumentPath=new String(document.location); vIndexFin=vDocumentPath.indexOf("?"); if(vIndexFin<0)vIndexFin=vDocumentPath.length; vString=vDocumentPath.substring(0,vIndexFin); //alert(vString); vIndexDeb=vString.lastIndexOf("/"); vDocumentPath=vDocumentPath.substring(vIndexDeb+1,vIndexFin); //alert(vDocumentPath); return vDocumentPath; } this.get=function(pId){ var vToReturn=document.getElementById(pId); /* Attention, la fonction getElementById n'est disponible que sur IE5+ et NS6+*/ //alert(pId); if (vToReturn==null){ if(pId.indexOf("form")==0){ alert("Le formulaire dont l'id est \n'" +pId + "'\n" +"n'a pas été trouvé"); return null; } //alert("L'élément dont l'id est \n'" +pId + "'\n" +"n'a pas été trouvé"); return null; } return vToReturn; } this.existe=function(pId){ return vToReturn=document.getElementById(pId); } } GestionPage=new _GestionPage(); /* *** gestion comportement en fonction de la page appelante avant le body ***** */ /* sert en général : * aux inclusions de librairies spécifiques * aux declarations de variable globales * à la generation de code HTML utilitaire ou de haut de page */ /* *** déclaration de la variable globale contenant le code de la page ********* */ var gPageCode; function __initPageAvantBody(pCodePage){ gPageCode=GestionPage.getCodePage(pCodePage); document.gPageCode=gPageCode; switch(gPageCode){ case "erreur" : break; case "w_calque" : JSLoader(vPathDB + "hm_loader.js"); document.setDivCache = setDivCache; break; case "wData" : break; case "wPDescDoc" : self.print(); self.close(); break; default : JSLoader(vPathDB + "hm_loader.js"); document.setDivCache = setDivCache; break; } } /* *** gestion comportement en fonction de la page appelante avant l'affichage sert aux initialisations de champs de fomulaires et aux affectations de gestionnaire d'évènement *************************** */ /* if(typeof(__initPageAvantAffichage)=="function" && typeof(document.gestlibold__initPageAvantAffichage)!="function" ){ document.gestlibold__initPageAvantAffichage=__initPageAvantAffichage; } */ function gestlibold__initPageAvantAffichage(){ /* if(typeof(document.gestlibold__initPageAvantAffichage)=="function"){ todo=document.gestlibold__initPageAvantAffichage; document.gestlibold__initPageAvantAffichage=function(){}; todo(); } */ switch(gPageCode){ case "erreur" : break; case "w_calque" : break; case "wData" : break; default : switch(vHits) { case 0 : vMessage = "
"; break; case 1 : vMessage = "