geocoder = new GClientGeocoder(); var georisposta=0; var dcodificare=[]; var icodificare=[]; var gcodificare=[]; var kcodificare=[]; var markerAperto=[]; var ncodifica=0; var rispostapint; var strutturefisse=false; var scorrihotel=false; var categoriascorri=null; var contoalloggi=''; var descralloggi='' var mappapronta=false; var MaxLat=null; var MinLat=null; var MaxLng=null; var MinLng=null; var avanti=false; var dietro=false; //icona di testo var NTxtIcon=0; var TxtIcon=[]; var apri_primo_marker=false; var no_fitt_map=false; //var ChiudoFumetto=true; // IMMAGINE DI ATTESA AJAX var ImmagineAttesa= new Image();// preload image var IA_pathToImage = "/img/load.gif"; ImmagineAttesa.src = IA_pathToImage; var MYAREA=null; var MYHTML=null; var MassimaAmpiezza=450; function ImpostazioneImmagineAttesa(){ try { MYAREA=document.getElementById('Contenitore_mappa'); var riferimento_mappa=document.getElementById('Gmap'); var newArea = document.createElement('div'); newArea.style.cssFloat='left'; newArea.style.styleFloat='left'; newArea.style.width='0px'; newArea.style.height='0px'; $(newArea).css('float','left'); var contenutoAREA = ""; newArea.innerHTML=contenutoAREA; if (MYAREA!=null) { MYAREA.insertBefore(newArea,riferimento_mappa); } }catch( e ) {MYAREA=null} try { MYHTML=document.getElementById('menu_a_2livelli'); var newdiv = document.createElement('li'); var contenutoLI = ""; newdiv.innerHTML=contenutoLI; MYHTML.appendChild(newdiv); }catch( e ) {MYHTML=null} } ImpostazioneImmagineAttesa(); //* //*/ function NewTxtIcon(testo){ //var fileimmagine="/inc/createicon.php?scrivi="+testo; var fileimmagine="http://www.nozio.com/admin_nozio/createicon.php?scrivi="+testo; var tempImage = new Image(); tempImage.src = fileimmagine; var metaW=Math.round(tempImage.width/2); var metaH=Math.round(tempImage.height/2); var tinyTMP = new GIcon(); tinyTMP.image = fileimmagine; //tinyTMP.iconSize = new GSize(tempImage.width,tempImage.height); //tinyTMP.iconSize = new GSize(30,17); tempImage=null; tinyTMP.iconAnchor = new GPoint(metaW,metaH); tinyTMP.infoWindowAnchor = new GPoint(metaW, 1); TxtIcon[NTxtIcon]=tinyTMP; var markerTMP = { icon:TxtIcon[NTxtIcon] }; NTxtIcon++; return markerTMP; } //icona hotel nozio var tinyZP = new GIcon(); tinyZP.image = "/img/GMAPHotelSuit.png"; tinyZP.iconSize = new GSize(36, 32); tinyZP.iconAnchor = new GPoint(18, 16); tinyZP.infoWindowAnchor = new GPoint(36, 1); // Set up our GMarkerOptions object literal var markerZP = { icon:tinyZP }; //icona aeroporti var tinyAE = new GIcon(); tinyAE.image = "/img/GMAPplane.png"; tinyAE.iconSize = new GSize(34, 32); tinyAE.iconAnchor = new GPoint(17, 16); tinyAE.infoWindowAnchor = new GPoint(32, 1); // Set up our GMarkerOptions object literal var markerAE = { icon:tinyAE }; //icona auto var tinyAU = new GIcon(); tinyAU.image = "/img/GMAPcar.png"; tinyAU.iconSize = new GSize(32, 32); tinyAU.iconAnchor = new GPoint(16, 16); tinyAU.infoWindowAnchor = new GPoint(32, 1); // Set up our GMarkerOptions object literal var markerAU = { icon:tinyAU }; //icona hotel var tinyHT = new GIcon(); tinyHT.image = "/img/GMAPHotelFree.png"; tinyHT.iconSize = new GSize(25, 25); tinyHT.iconAnchor = new GPoint(12, 12); tinyHT.infoWindowAnchor = new GPoint(25, 1); // Set up our GMarkerOptions object literal var markerHT = { icon:tinyHT }; //icona sottocategorie geografiche var tinyCT = new GIcon(); tinyCT.image = "/img/GMAPplace.png"; tinyCT.iconSize = new GSize(20, 20); tinyCT.iconAnchor = new GPoint(11, 11); tinyCT.infoWindowAnchor = new GPoint(11, 1); // Set up our GMarkerOptions object literal var markerCT = { icon:tinyCT }; function CreateXmlHttpReq(handler) { var xmlhttp = null; try { xmlhttp = new XMLHttpRequest(); } catch(e) { try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } } xmlhttp.onreadystatechange = handler; return xmlhttp; } function AggiornataVisita(){ } function AggiornaVisite(idsk) { var r = Math.random(); myRequestVSK = CreateXmlHttpReq(AggiornataVisita); myRequestVSK.open("GET","/inc/setVisiteMap.php?id_sk="+escape(idsk)+"&rand="+escape(r),true); myRequestVSK.send(null); } var possoricaricare=true; function createMarkerGUIDA(point, description ,Options,idsk) { var marker = new GMarker(point,Options); GEvent.addListener(marker, "click", function() { possoricaricare=false; if (!markerAperto[idsk]) { marker.openInfoWindowHtml(description,{maxWidth: MassimaAmpiezza}); AggiornaVisite(idsk); } markerAperto[idsk]=true; }); if (strutturefisse && !scorrihotel) { GEvent.addListener(marker, "mouseover", function() { possoricaricare=false; if (!markerAperto[idsk]) { marker.openInfoWindowHtml(description,{maxWidth: MassimaAmpiezza}); AggiornaVisite(idsk); } markerAperto[idsk]=true; }); //GEvent.addListener(marker, "mouseout", function() { // possoricaricare=false; // if (ChiudoFumetto) // marker.closeInfoWindow(); // ChiudoFumetto=true; // }); } //infowindowclose GEvent.addListener(marker, "infowindowclose", function() { possoricaricare=true; markerAperto[idsk]=false; if (devoricaricare && !scorrihotel) RicaricoMAPPA(); //FittaMappa(); }); return marker; } function createMarkerGUIDAClick(point, description ,Options,UrlClick) { var marker = new GMarker(point,Options); GEvent.addListener(marker, "click", function() { location.replace(UrlClick); //marker.openInfoWindowHtml(description); }); return marker; } function SendDatoCOD(idsk,lat,lng) { var r = Math.random(); myRequestRKS = CreateXmlHttpReq(RispostaRKS); myRequestRKS.open("GET","/inc/caricaLat.php?idsk="+escape(idsk)+"&lat="+escape(lat)+"&lng="+escape(lng)+"&rand="+escape(r),true); myRequestRKS.send(null); } function RispostaRKS(){ if (myRequestRKS.readyState == 4 && myRequestRKS.status == 200) { var coorinate=RispostaRKS.responseText; //alert (coorinate); exit(); } } function addAddressToMap(response) { if (!response || response.Status.code != 200) { var descrizione=dcodificare[ncodifica-1]; // alert('no codificato\n'+descrizione); ncodifica--; if (ncodifica>0) { var geocodifica=gcodificare[ncodifica-1]; geocoder.getLocations(geocodifica, addAddressToMap); } } else { place = response.Placemark[0]; rispostapint = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]); ncodifica--; var descrizione=dcodificare[ncodifica]; var icona=icodificare[ncodifica]; var idk=kcodificare[ncodifica]; var hotelsuGUida=createMarkerGUIDA(rispostapint,descrizione,icona,idk); //alert(descrizione); mapGUIDA.addOverlay(hotelsuGUida); var lat=place.Point.coordinates[1]; var lng=place.Point.coordinates[0]; //alert(idk+'?'+lat+'?'+lng);return; SendDatoCOD(idk,lat,lng); if (ncodifica>0) { var geocodifica=gcodificare[ncodifica-1]; geocoder.getLocations(geocodifica, addAddressToMap); } } } function MettiAeroporti() { if (myRequestA.readyState == 4 && myRequestA.status == 200 && memoAer && !nuovarichiesta) { var coorinate=myRequestA.responseText; var ageo=coorinate.split(""); for (var p=1;p"); var point = new GLatLng(punto[3],punto[4]); DatiDimensioni(punto[3],punto[4]); //var link='
'+punto[1]+''; rispostapint = point; //var descrizione=link+'

'+punto[5]+' '+punto[6]+'

'; var descrizione='
'; var UrlClick=punto[9]; var Dirnavigazione=punto[10]; var DScheda=punto[11]; var IDScheda=punto[12]; descrizione=descrizione+' '+DScheda; icona=markerAE; var codifica=punto[7]; if (codifica=='1') { var geocodifica=punto[8]; //geocoder.getLocations(geocodifica, addAddressToMap); dcodificare[ncodifica]=descrizione; icodificare[ncodifica]=icona; gcodificare[ncodifica]=geocodifica; kcodificare[ncodifica]=IDScheda; ncodifica++; }else { var hotelsuGUida=null; hotelsuGUida=createMarkerGUIDA(rispostapint,descrizione,icona,IDScheda); mapGUIDA.addOverlay(hotelsuGUida); } } if (ncodifica>0) { var geocodifica=gcodificare[ncodifica-1]; geocoder.getLocations(geocodifica, addAddressToMap); } //CheckAttesi--; } if (myRequestA.readyState == 4 && myRequestA.status == 200 ) CaricoAer=false; StopAnimazioneAttesa(); } function MettiCarRental() { if (myRequestR.readyState == 4 && myRequestR.status == 200 && memoCar && !nuovarichiesta) { var coorinate=myRequestR.responseText; var ageo=coorinate.split(""); for (var p=1;p"); var point = new GLatLng(punto[3],punto[4]); DatiDimensioni(punto[3],punto[4]); //var link='
'+punto[1]+''; rispostapint = point; //var descrizione=link+'

'+punto[5]+' '+punto[6]+'

'; var descrizione='
'; var UrlClick=punto[9]; var Dirnavigazione=punto[10]; var DScheda=punto[11]; var IDScheda=punto[12]; descrizione=descrizione+' '+DScheda; icona=markerAU; var codifica=punto[7]; if (codifica=='1') { var geocodifica=punto[8]; //geocoder.getLocations(geocodifica, addAddressToMap); dcodificare[ncodifica]=descrizione; icodificare[ncodifica]=icona; gcodificare[ncodifica]=geocodifica; kcodificare[ncodifica]=IDScheda; ncodifica++; }else { var hotelsuGUida=null; hotelsuGUida=createMarkerGUIDA(rispostapint,descrizione,icona,IDScheda); mapGUIDA.addOverlay(hotelsuGUida); } } if (ncodifica>0) { var geocodifica=gcodificare[ncodifica-1]; geocoder.getLocations(geocodifica, addAddressToMap); } //CheckAttesi--; } if (myRequestR.readyState == 4 && myRequestR.status == 200 ) CaricoCar=false; StopAnimazioneAttesa(); } function DatiDimensioni(tmpLat,tmpLng){ lat=parseFloat(tmpLat); lng=parseFloat(tmpLng); if (MaxLat==null) { MaxLat=lat; MinLat=lat; MaxLng=lng; MinLng=lng; return } if (latMaxLat) MaxLat=lat; if (lngMaxLng) MaxLng=lng; } function MettiAlloggi() { if (myRequestH.readyState == 4 && myRequestH.status == 200 && memoHot && !nuovarichiesta) { //alert('presente'); var coorinate=myRequestH.responseText; var Hmostrare=[]; var nmostrare=0; var ageo=coorinate.split(""); if (ageo.length>0) { contoalloggi=descralloggi+' '+ageo[0]; if (ageo[0]=='0') contoalloggi=(ageo.length-1)+' '+descralloggi; } for (var p=1;p"); var point = new GLatLng(punto[3],punto[4]); DatiDimensioni(punto[3],punto[4]); //var link='
'+punto[1]+''; rispostapint = point; //var descrizione=link+'

'+punto[5]+' '+punto[6]+'

'; var descrizione='
'; var UrlClick=punto[9]; var Dirnavigazione=punto[10]; if (Dirnavigazione=="1" || Dirnavigazione=="2" ) avanti=true; if (Dirnavigazione=="-1" || Dirnavigazione=="2" ) dietro=true; var DScheda=punto[11]; var IDScheda=punto[12]; descrizione=descrizione+' '+DScheda; var zp=punto[2]; var icona=markerHT; if (zp=='1') icona=markerZP; var tipoicona=punto[13]; if (tipoicona==2) icona=markerAE; if (tipoicona==3) icona=markerAU; var codifica=punto[7]; if (codifica=='1') { var geocodifica=punto[8]; //geocoder.getLocations(geocodifica, addAddressToMap); dcodificare[ncodifica]=descrizione; icodificare[ncodifica]=icona; gcodificare[ncodifica]=geocodifica; kcodificare[ncodifica]=IDScheda; ncodifica++; }else { var hotelsuGUida=null; hotelsuGUida=createMarkerGUIDA(rispostapint,descrizione,icona,IDScheda); //Hmostrare[nmostrare]=hotel; //nmostrare++; mapGUIDA.addOverlay(hotelsuGUida); if (apri_primo_marker) { hotelsuGUida.openInfoWindowHtml(descrizione,{maxWidth: MassimaAmpiezza}); apri_primo_marker=false; } } } //if (nmostrare>0) // for (var ni=nmostrare-1;ni>=0;ni--) // mapGUIDA.addOverlay(Hmostrare[ni]); if (ncodifica>0) { var geocodifica=gcodificare[ncodifica-1]; geocoder.getLocations(geocodifica, addAddressToMap); } //CheckAttesi--; } if (myRequestH.readyState == 4 && myRequestH.status == 200 ) CaricoHot=false; StopAnimazioneAttesa(); } function MettiGeo() { if (myRequestC.readyState == 4 && myRequestC.status == 200 && memoLoc && !nuovarichiesta) { var coorinate=myRequestC.responseText; var ageo=coorinate.split(""); for (var p=1;p"); var point = new GLatLng(punto[3],punto[4]); DatiDimensioni(punto[3],punto[4]); var link='
'+punto[1]+''; rispostapint = point; var descrizione=link+'

'+punto[5]+' '+punto[6]+'

'; //var descrizione='
'; var UrlClick=punto[9]; var Dirnavigazione=punto[10]; var DScheda=punto[11]; var IDScheda=punto[12]; descrizione=descrizione+' '+DScheda; //alert(DScheda); //alert(descrizione); icona=markerCT; var codifica=punto[7]; if (codifica=='1') { var geocodifica=punto[8]; //geocoder.getLocations(geocodifica, addAddressToMap); dcodificare[ncodifica]=descrizione; icodificare[ncodifica]=icona; gcodificare[ncodifica]=geocodifica; kcodificare[ncodifica]=IDScheda; ncodifica++; }else { var hotelsuGUida=null; //if (zp=='2') // hotel=createMarkerGUIDAClick(rispostapint, descrizione ,icona,UrlClick); // else hotelsuGUida=createMarkerGUIDA(rispostapint,descrizione,icona,IDScheda); mapGUIDA.addOverlay(hotelsuGUida); } } if (ncodifica>0) { var geocodifica=gcodificare[ncodifica-1]; geocoder.getLocations(geocodifica, addAddressToMap); } //CheckAttesi--; } if (myRequestC.readyState == 4 && myRequestC.status == 200 ) CaricoLoc=false; StopAnimazioneAttesa(); } var myRequestC = null; var myRequestH = null; var myRequestA = null; var myRequestR = null; var myPRIMORequestC = 0; var myPRIMORequestH = 0; var myPRIMORequestA = 0; var myPRIMORequestR = 0; var myRequestRKS = null; function getCoordinate(categorie,id_lingua,npg) { var r = Math.random(); //CheckAttesi++; CaricoHot=true; StartAnimazioneAttesa(); //strutturefisse=true; //if (myPRIMORequestH!=0) //{ //r=myPRIMORequestH; //} myPRIMORequestH=r; myRequestH = CreateXmlHttpReq(MettiAlloggi); myRequestH.open("GET","/inc/schede_su_mappa.php?categorie="+escape(categorie)+"&npg="+escape(npg)+"&latMin="+escape(MAPlatMin)+"&latMax="+escape(MAPlatMax)+"&lngMin="+escape(MAPlngMin)+"&lngMax="+escape(MAPlngMax)+"&autogeocode=0&rating=1&myzp=1&id_lingua="+escape(id_lingua)+"&rand="+escape(r),true); myRequestH.send(null); } function getCoordinateA(categorie,id_lingua,npg) { var r = Math.random(); //CheckAttesi++; CaricoAer=true; StartAnimazioneAttesa(); if (myPRIMORequestA!=0) { r=myPRIMORequestA; } myPRIMORequestA=r; myRequestA = CreateXmlHttpReq(MettiAeroporti); myRequestA.open("GET","/inc/schede_su_mappa.php?categorie="+escape(categorie)+"&npg="+escape(npg)+"&latMin="+escape(MAPlatMin)+"&latMax="+escape(MAPlatMax)+"&lngMin="+escape(MAPlngMin)+"&lngMax="+escape(MAPlngMax)+"&autogeocode=1&rating=1&id_lingua="+escape(id_lingua)+"&rand="+escape(r),true); myRequestA.send(null); } function getCoordinateC(categorie,id_lingua,npg) { var r = Math.random(); //CheckAttesi++; CaricoCar=true; StartAnimazioneAttesa(); if (myPRIMORequestR!=0) { r=myPRIMORequestR; } myPRIMORequestR=r; myRequestR = CreateXmlHttpReq(MettiCarRental); myRequestR.open("GET","/inc/schede_su_mappa.php?categorie="+escape(categorie)+"&npg="+escape(npg)+"&latMin="+escape(MAPlatMin)+"&latMax="+escape(MAPlatMax)+"&lngMin="+escape(MAPlngMin)+"&lngMax="+escape(MAPlngMax)+"&autogeocode=1&rating=1&id_lingua="+escape(id_lingua)+"&rand="+escape(r),true); myRequestR.send(null); } function getSUB(categorie,id_lingua,npg) { var r = Math.random(); //CheckAttesi++; CaricoLoc=true; StartAnimazioneAttesa(); if (myPRIMORequestC!=0) { r=myPRIMORequestC; } myPRIMORequestC=r; myRequestC = CreateXmlHttpReq(MettiGeo); myRequestC.open("GET","/inc/schede_su_mappa.php?navicacarta="+escape(categorie)+"&id_lingua="+escape(id_lingua)+"&latMin="+escape(MAPlatMin)+"&latMax="+escape(MAPlatMax)+"&lngMin="+escape(MAPlngMin)+"&lngMax="+escape(MAPlngMax)+"&rand="+escape(r),true); myRequestC.send(null); } function getFISSE(listaID_schede,id_lingua) { MaxLat=null; MinLat=null; MaxLng=null; MinLng=null; var r = Math.random(); CaricoHot=true; strutturefisse=true; StartAnimazioneAttesa(); memoHot=true; myRequestH = CreateXmlHttpReq(MettiAlloggi); myRequestH.open("GET","/inc/schede_su_mappa.php?listaID_schede="+escape(listaID_schede)+"&id_lingua="+escape(id_lingua)+"&rand="+escape(r),true); myRequestH.send(null); } function getOnlyGeo(idgeo,idcat,npagina,id_lingua) { MaxLat=null; MinLat=null; MaxLng=null; MinLng=null; var categorie=idcat+';'+idgeo; var r = Math.random(); CaricoHot=true; strutturefisse=true; scorrihotel=true; StartAnimazioneAttesa(); memoHot=true; myRequestH = CreateXmlHttpReq(MettiAlloggi); myRequestH.open("GET","/inc/schede_su_mappa.php?categorie="+escape(categorie)+"&npg="+escape(npagina)+"&contaschede=1&autogeocode=0&rating=1&myzp=1&id_lingua="+escape(id_lingua)+"&rand="+escape(r),true); myRequestH.send(null); } function getOnlyCAT(idcat,npagina,id_lingua) { MaxLat=null; MinLat=null; MaxLng=null; MinLng=null; categoriascorri=idcat; Linguaschede=id_lingua; var categorie=idcat; var r = Math.random(); //alert('call getOnlyCat'); CaricoHot=true; //strutturefisse=true; scorrihotel=true; mapGUIDA.clearOverlays(); StartAnimazioneAttesa(); paginascorrimento=npagina; memoHot=true; myRequestH = CreateXmlHttpReq(MettiAlloggi); myRequestH.open("GET","/inc/schede_su_mappa.php?categorie="+escape(categorie)+"&npg="+escape(npagina)+"&latMin="+escape(MAPlatMin)+"&latMax="+escape(MAPlatMax)+"&lngMin="+escape(MAPlngMin)+"&lngMax="+escape(MAPlngMax)+"&contaschede=1&autogeocode=0&rating=1&myzp=1&id_lingua="+escape(id_lingua)+"&rand="+escape(r),true); myRequestH.send(null); } function StopAnimazioneAttesa(){ //alert (coorinate); exit(); mappapronta=true; if ( CaricoLoc || CaricoHot || CaricoAer || CaricoCar ) return; if (nuovarichiesta) { bloccorichieste=true; tempoeventoId = setTimeout("aggiornaMAPPA()", 2000); return; } bloccorichieste=false; tempoeventoId = 0; if (scorrihotel) { /* if (dietro) document.getElementById('scorri_dietro').style.display='block'; else document.getElementById('scorri_dietro').style.display='none'; if (avanti && dietro) document.getElementById('scorri_barra').style.display='block'; else document.getElementById('scorri_barra').style.display='none'; if (avanti) document.getElementById('scorri_avanti').style.display='block'; else document.getElementById('scorri_avanti').style.display='none'; document.getElementById('conta_alloggi').innerHTML=contoalloggi; if (avanti || dietro) document.getElementById('conta_barra').style.display='block'; else document.getElementById('conta_barra').style.display='none'; //*/ } avanti=false; dietro=false; if (MYHTML!=null) document.getElementById('MY_load').style.display='none'; if (MYAREA!=null) document.getElementById('AREA_load').style.display='none'; if (strutturefisse) FittaMappa(); } function StartAnimazioneAttesa(){ if ( CaricoLoc || CaricoHot || CaricoAer || CaricoCar ) //if (CheckAttesi>0) { //if (CheckAttesi>4) //CheckAttesi=4; //alert('speta'); if (strutturefisse || scorrihotel) { if (MYAREA!=null) document.getElementById('AREA_load').style.display='block'; } else // if (!strutturefisse && !scorrihotel) if (MYHTML!=null) document.getElementById('MY_load').style.display='block'; } } var memoLoc=false; var memoHot=false; var memoAer=false; var memoCar=false; var CaricoLoc=false; var CaricoHot=false; var CaricoAer=false; var CaricoCar=false; var MAPlatMin; var MAPlatMax; var MAPlngMin; var MAPlngMax; var CategoriaGeografica; var Linguaschede; var LivelloGeografia; var paginascorrimento=0; var devoricaricare=false; var nuovarichiesta=false; var bloccorichieste=false; var tempoeventoId = 0; function aggiornaMAPPA(){ if (strutturefisse) return; tempoeventoId = 0; nuovarichiesta=false; memoLoc=false; memoHot=false; memoAer=false; memoCar=false; mapGUIDA.clearOverlays(); var dovevedo=mapGUIDA.getBounds(); if (dovevedo.isEmpty()) alert ('VUOTO'); var vedoSO=dovevedo.getSouthWest(); var vedoNE=dovevedo.getNorthEast(); MAPlatMin=vedoSO.lat(); MAPlatMax=vedoNE.lat(); MAPlngMin=vedoSO.lng(); MAPlngMax=vedoNE.lng(); if (scorrihotel) //getOnlyCAT(CategoriaGeografica,0,Linguaschede); ScorriTutto(0,Linguaschede); else CambioCH(CategoriaGeografica,Linguaschede); } function FittaMappa(){ if (MaxLat==null) return; if (no_fitt_map) return; //return; //alert("Mt"+MaxLat+"mt"+MinLat+"Ml"+MaxLng+"ml"+MinLng); var CentroLat=(parseFloat(MaxLat)+parseFloat(MinLat))/2; var CentroLng=(parseFloat(MaxLng)+parseFloat(MinLng))/2; var PuntoSO=new GLatLng(MinLat,MinLng); var PuntoNE=new GLatLng(MaxLat,MaxLng); var Puntocentro=new GLatLng(CentroLat,CentroLng); var Quadrato=new GLatLngBounds(PuntoSO,PuntoNE); var ZumCentro=mapGUIDA.getBoundsZoomLevel(Quadrato); //alert ("Lev"+ZumCentro); //alert ("CL"+CentroLat+"CT"+CentroLng); //strutturefisse=true; //mapGUIDA.clearOverlays(); mapGUIDA.setCenter(Puntocentro,ZumCentro); } function RicaricoMAPPA(){ if (strutturefisse) return; if (tempoeventoId>0) { nuovarichiesta=true; clearTimeout ( tempoeventoId ); tempoeventoId = setTimeout("aggiornaMAPPA()", 2000); return; } devoricaricare=true; if (possoricaricare) { nuovarichiesta=true; possoricaricare=true; if (bloccorichieste) return; devoricaricare=false; memoLoc=false; memoHot=false; memoAer=false; memoCar=false; mapGUIDA.clearOverlays(); EventoMAPPA(); } possoricaricare=true; } function EventoMAPPA(){ if (strutturefisse){ return; } if (tempoeventoId>0) { nuovarichiesta=true; clearTimeout ( tempoeventoId ); tempoeventoId = setTimeout("aggiornaMAPPA()", 2000); return; } nuovarichiesta=true; if (bloccorichieste){ //alert('call evento mappa bloccorichieste'); //return; } bloccorichieste=true; nuovarichiesta=false; possoricaricare=true; var dovevedo=mapGUIDA.getBounds(); if (dovevedo.isEmpty()) alert ('VUOTO'); var vedoSO=dovevedo.getSouthWest(); var vedoNE=dovevedo.getNorthEast(); //alert('call evento mappa 3'); MAPlatMin=vedoSO.lat(); MAPlatMax=vedoNE.lat(); MAPlngMin=vedoSO.lng(); MAPlngMax=vedoNE.lng(); //alert('call evento mappa 4'); var tuttioff=true; var n_tipologie_hotel=document.getElementById('n_Ghotel').value; for (i=1;i<=n_tipologie_hotel;i++){ if (document.getElementById('Ghotel_'+i).checked) tuttioff=false; } if (tuttioff) scorrihotel=true; //alert('call evento mappa 5'); if (scorrihotel) //getOnlyCAT(CategoriaGeografica,0,Linguaschede); {ScorriTutto(0,Linguaschede); // alert('call ScorriTutto da evento mappa'); } else{ CambioCH(CategoriaGeografica,Linguaschede); //alert('call CambioCH da evento mappa'); } } function TR_set_toggle() { /* toggleRow method */ var toggleRow = function() { this.style.display = ((this.style.display == '') ? 'none' : ''); return false; } for (var oTable, a = 0; a < arguments.length; ++a) { oTable = document.getElementById(arguments[a]); var r = 0, row, rows = oTable.rows; while (row = rows.item(r++)) row.toggle = toggleRow; } /* convenience function */ self.toggleRow = function(row_id) { document.getElementById(row_id).toggle(); } } function ScorriTutto(pagina,Linguaschede) { //document.getElementById('foo').style.display= 'block'; document.getElementById('foo1').style.display= 'block'; document.getElementById('foo2').style.display= 'block'; document.getElementById('foo3').style.display= 'none'; memoHot=false; memoAer=false; memoCar=false; CaricoHot=false; CaricoAer=false; CaricoCar=false; var alg=false; var id_tipologie=''; var aer=document.getElementById('Gtransp').checked; var car=document.getElementById('Gcarr').checked; var n_tipologie_hotel=document.getElementById('n_Ghotel').value; // alert('call ScorriTutto'); for (i=1;i<=n_tipologie_hotel;i++) { if (!document.getElementById('Ghotel_'+i).checked) continue; if (alg) id_tipologie+=','; id_tipologie+=document.getElementById('Ghotel_'+i).value; alg=true; } if (alg) { getOnlyCAT(id_tipologie,pagina,Linguaschede); memoHot=true; } if (aer) { getCoordinateA('21543',Linguaschede,0); memoAer=true; } if (car) { getCoordinateC('21545',Linguaschede,0); memoCar=true; } /* * 06 maggio 09 * codice aggiunto per la visualizzazione dei parametri di ricerca */ var label=''; var lista_hotel=''; var trasporti=false; var name_aer=document.getElementById('h_Gtransp').value; var name_car=document.getElementById('h_Gcarr').value; var Selezione_sotto_destinazione=document.getElementById('Selezione_sotto_destinazione'); if (aer) { label+=name_aer;} if (label!='' && car) { label+=',';} if (car) { label+=name_car;} if (aer || car) { trasporti=true;} alg=false; var app=0; var n_tipologie_hotel=document.getElementById('n_Ghotel').value; for (i=1;i<=n_tipologie_hotel;i++) { if (!document.getElementById('Ghotel_'+i).checked) continue; if (alg) lista_hotel+=','; lista_hotel+=document.getElementById('h_Ghotel_'+i).value; alg=true; app++; } if (app>0) { p=document.getElementById('hotelalloggi'); document.getElementById('foo2').style.display= 'block'; p.innerHTML=lista_hotel; } if (Selezione_sotto_destinazione==null) { document.getElementById('foo4').style.display= 'none'; document.getElementById('label_destinazione').style.display= 'none'; } else { document.getElementById('foo4').style.display= 'block'; document.getElementById('label_destinazione').style.display= 'block'; } if (trasporti){ document.getElementById('foo3').style.display= 'block'; document.getElementById('voloauto').style.display= 'block'; e=document.getElementById('voloauto'); e.innerHTML=label; } else { document.getElementById('foo3').style.display= 'none'; document.getElementById('voloauto').style.display= 'none'; } } function CambioCH(categoria,id_lingua){ //document.getElementById('foo').style.display= 'block'; document.getElementById('foo1').style.display= 'block'; document.getElementById('foo2').style.display= 'block'; document.getElementById('foo3').style.display= 'none'; //MaxLat=null; //MinLat=null; //MaxLng=null; //MinLng=null; //CheckAttesi=0; document.getElementById('MY_load').style.display='block'; var id_tipologie=''; var id_destinazioni=''; var plc=false //document.getElementById('Glocazioni').checked; var alg=false; var destinazioni_scelte=false; if (LivelloGeografia>2) { var n_tipologie_hotel=document.getElementById('n_Ghotel').value; for (i=1;i<=n_tipologie_hotel;i++) { if (!document.getElementById('Ghotel_'+i).checked) continue; if (alg) id_tipologie+=','; id_tipologie+=document.getElementById('Ghotel_'+i).value; alg=true; } } //for (i=0;i0) { p=document.getElementById('hotelalloggi'); document.getElementById('foo2').style.display= 'block'; p.innerHTML=lista_hotel; } if (Selezione_sotto_destinazione==null) { document.getElementById('foo4').style.display= 'none'; document.getElementById('label_destinazione').style.display= 'none'; } else { document.getElementById('foo4').style.display= ''; document.getElementById('label_destinazione').style.display= 'block'; } if (trasporti){ document.getElementById('foo3').style.display= 'block'; document.getElementById('voloauto').style.display= 'block'; e=document.getElementById('voloauto'); e.innerHTML=label; } else { document.getElementById('foo3').style.display= 'none'; document.getElementById('voloauto').style.display= 'none'; } //StartAnimazioneAttesa(); StopAnimazioneAttesa(); //alert('fine'); }