var xMap = 0.0; var yMap = 0.0; var widthMap = 0.0; var heightMap = 0.0; var scaleMap = 0.0; var iWidth=1; var iHeight=1; var layerActif = "stations "; function isWorking() { working=true; if(parent.processmap.document.jspform != null) if(parent.processmap.document.jspform.working != null) if(parent.processmap.document.jspform.working.value == 'false') working=false; return working; } function setSplashVisible(isVisible) { if(isNav4) document.layers.lyrNS4.setSplashVisible(isVisible); else setSplashVisible(isVisible); } function debugJS() { var titi = ''; while(titi != 'end'){ titi=prompt('menu.htm',titi) if(titi != 'end') alert(eval(titi)); } } function clickFunction (fn) { if(isNav4) { document.layers.lyrNS4.clickMode(fn); } else clickMode(fn); } function mapPrint(){ if(isNav4) { document.layers.lyrNS4.mapPrint(); } } function moveclip () { if(isNav4) { document.layers.lyrNS4.moveclip(); } } function DisplayMap(url) { //alert(url); if(isNav4) { document.layers.lyrNS4.document.layers.theMap.document.images['theImageMap'].src = url; moveclip(); parent.overview.cadrer(parent.processmap.getX1(),parent.processmap.getY2(),parent.processmap.getMapWidth(),parent.processmap.getMapHeight()); } else { // Gérer ici la récupération des infos pour être synchro avec la carte document.images['theImageMap'].src = url; if(isMac) document.images['theFond'].src = url; moveLayer("theMap",hspc,vspc); clipLayer("theMap",0,0,iWidth,iHeight); parent.overview.cadrer(parent.processmap.getX1(),parent.processmap.getY2(),parent.processmap.getMapWidth(),parent.processmap.getMapHeight()); } xMap = Number(parent.processmap.getX1()); yMap = Number(parent.processmap.getY1()); widthMap = Number(parent.processmap.getMapWidth()); heightMap = Number(parent.processmap.getMapHeight()); scaleMap = widthMap/iWidth*3780.7; // formule en utilisant le nombre de pixels (3780.7) par metre de papier quand on imprime la carte (exemple: 431 pixels occupent 11.4 cm sur le papier) } function getMapXFromImgX(x) { return (xMap + x*widthMap/iWidth); } function getMapYFromImgY(y) { return (yMap+(iHeight-y)*heightMap/iHeight); } function getMapScale() { return scaleMap; } function setLayerActif(layerName) { layerActif = layerName; document.images.Image13.alt = "Sélection de " + layerName; document.images.Image14.alt = "Sélection de " + layerName + " dans le rectangle"; } function getLayerActif() { return layerActif; } function afficheCritere(crit) { urlCrit='crit'+crit+'.jsp'+sessionid; window.open(urlCrit,'critere','scrollbars=yes,width=510,innerWidth=510,outerHeight=510,height=510,screenX=200,screenY=100,resizable = yes'); } function afficheFenetre(adresse){ window.open(adresse,'fenetre','scrollbars=yes,width=700,innerWidth=700,outerHeight=600,height=600,screenX=100,screenY=100,resizable=yes'); } function afficheFenetreaccueil(adresse){ window.open(adresse,'_top','scrollbars=yes,width=800,innerWidth=700,outerHeight=600,height=600,screenX=100,screenY=100,resizable=yes, toolbar=yes'); } function affichetitre(adresse){ window.open(adresse,'fenetre','scrollbars=yes,width=750,innerWidth=700,outerHeight=200,height=200,screenX=100,screenY=100,resizable=yes'); } function afficheIdentify(adresse){ window.open(adresse,'identify','scrollbars=yes,width=700,innerWidth=700,outerHeight=600,height=600,screenX=100,screenY=100,resizable=yes'); } /* function afficheConfirmation() { window.confirm("Etes-vous sûr ?"); return false; } */ function afficheConfirmation() { reponse = window.confirm("Ceci va effacer définitivement TOUS les critères que vous avez saisis. Etes-vous sûr de bien vouloir les effacer ?"); if(reponse) parent.processmap.doAction('resetcriteres'); }