function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i"+titre+""); w.document.write(""); w.document.write(""); w.document.close(); } // permet de ne déclencher l action que sur la touche Enter function cartoKeypress(KeyPressEvenement, url) { if(KeyPressEvenement.keyCode==13) { carto(url); return false; } return true; } function carto(url) { x=window.open(url,"carto","toolbar=no,location=no,status=no,directories=no,menubar=yes,scrollbars=no,resizable=no,copyhistory=no,width=550,height=500,left=50,top=50"); x.focus(); } function deroule(x, h, l) { if (typeof(x)=='string') { x = MM_findObj(x); } x.style.zIndex=4; x.style.height=h; x.style.visibility='visible'; if (l) { x.style.width=l; } } function enroule(x,h, l) { if (typeof(x)=='string') { x = MM_findObj(x); } x.style.zIndex=1; x.style.height=h; if (l) { x.style.width=l; } } function roArrdt(a) { MM_findObj('vdlcarte').src='/static/vdl/images/a'+a+'.gif' } function reArrdt() { MM_findObj('vdlcarte').src='/static/vdl/images/carte.gif' } //fonction de controle en fonction des types de champs var lastFocus = null; function controle(formulaire,champ,format,mini,maxi) { var ok = 0; var RE=""; // N : numérique if ( format == "N" ) { RE = /^\d+$/;} // CP : code postal français (5 chiffres) if ( format == "CPT" ) { RE = /^\d{5}$/;} //TEL : telephone et telecopie if ( format == "TEL" ) { RE = /^\d{10}$/;} // EMAIL : email if ( format == "EMAIL" ) { RE = /^[A-Za-z0-9\.\-_]+[@][A-Za-z0-9\-\.]+[\.][A-Za-z][A-Za-z][A-Za-z]?$/;} var controle = eval('document.' + formulaire + '.' + champ); message = ''; if (controle.value.length > 0) { if (!RE.test(controle.value)) { message = message+'Votre saisie est incorrecte.\n'; ok = 1; }} if ( mini != 0 ) { if (controle.value.length < mini ) { message = message+'Vous devez saisir au moins ' + mini + ' caracteres.\n'; ok = 1;} if ( maxi != 0 ) { if (controle.value.length > maxi ) { message = message+'Vous ne devez pas saisir plus de ' + maxi + ' caracteres.\n'; ok = 1;}} if ( ok == 1 ) { alert(message); lastFocus = controle; }}} function getFocus() { if (lastFocus) { lastFocus.focus(); lastFocus.select(); lastFocus = null; } } // permet de ne déclencher l action que sur la touche Enter function AjoutFavorisKeypress(KeyPressEvenement, theURL, theTITLE) { if(KeyPressEvenement.keyCode==13) { window.external.AddFavorite(theURL, theTITLE); } } function AjoutFavoris(theURL, theTITLE) { window.external.AddFavorite(theURL, theTITLE); } //Fonction spécifique Plan Interactif Ville function ouvrir_mappy(liste_trouvee) { map_way = liste_trouvee.options[liste_trouvee.selectedIndex].value; iframe_rafraichir('plan_mappy', map_way); } function iframe_rafraichir(iframe_id, lien, rafraichir) { if (rafraichir != '') { parent.document.getElementById(iframe_id).src = lien; } } htmlareapopup = false; function roll_over(x) { x.src=x.src.replace('off','over') } function roll_off(x) { x.src=x.src.replace('over','off') } // Pour menu var to; var currentMenu; currentMenu=""; function montre(id) { clearTimeout(to); if (id=='') { tempo=500; } else { tempo=100; } to = setTimeout("immediateMontre(\""+id+"\")",tempo); } function findPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft obj = obj.offsetParent; } } else if (obj.x) curleft += obj.x; return curleft; } function immediateMontre(id) { if (id!=currentMenu) { var d = document.getElementById(id); if (currentMenu!="") { document.getElementById(currentMenu).style.display='none'; } if (d) { d.style.display='block'; divmenu = document.getElementById('menu'); x = findPosX(divmenu)+divmenu.offsetWidth - (d.offsetLeft+d.offsetWidth); if (x<=0) { var m = document.getElementById(id+'_title'); left = findPosX(m) + m.offsetWidth - d.offsetWidth +1; d.style.left=left+'px'; } } currentMenu=id; } } // permet de ne déclencher l action que sur la touche Enter function locationKeypress(KeyPressEvenement, urlToOpen) { if(KeyPressEvenement.keyCode==13) { location.href = urlToOpen; return false; } return true; } function closeKeypress(KeyPressEvenement) { if(KeyPressEvenement.keyCode==13) { window.close(); } } function printKeypress(KeyPressEvenement) { if(KeyPressEvenement.keyCode==13) { window.print(); } } //************************************************************ // Folder content var isSelected = false; function toggleSelect(toggleSelectButton, selectAllText, deselectAllText) { formElements = toggleSelectButton.form.elements; if (isSelected) { for (i = 0; i < formElements.length; i++) { formElements[i].checked = false; } isSelected = false; toggleSelectButton.value = selectAllText; } else { for (i = 0; i < formElements.length; i++) { formElements[i].checked = true; } isSelected = true; toggleSelectButton.value = deselectAllText; } }