//geocoder = new GClientGeocoder(); var georisposta=0; var dcodificare=[]; var icodificare=[]; var gcodificare=[]; var kcodificare=[]; var markerAperto=[]; var markerList=[]; var indexmarker=-1; 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 markerHT=null; var markerZP=null; var markerAE=null; var markerAU=null; var markerCT=null; function CreaIcone(){ markerHT=Mappa_CreaImg_Marker_jifs('/img/GMAPHotelFree.png',25,25,0,0,12,12); markerZP=Mappa_CreaImg_Marker_jifs('/img/GMAPHotelSuit.png',36,32,0,0,18,18); markerAE=Mappa_CreaImg_Marker_jifs('/img/GMAPplane.png',34,32,0,0,17,16); markerAU=Mappa_CreaImg_Marker_jifs('/img/GMAPcar.png',32,32,0,0,16,16); markerCT=Mappa_CreaImg_Marker_jifs('/img/GMAPplace.png',20,20,0,0,11,11); } var AggiornataVisita=function F_AggiornataVisita(contenuto){ } var idChiamata_AggiornaVisita=Definisci_Chiamata_jifs(AggiornataVisita,'txt'); function AggiornaVisite(idsk) { var urlrichiesta='/inc/setVisiteMap.php?id_sk='+escape(idsk); Chiamata_jifs(urlrichiesta,idChiamata_AggiornaVisita); } var possoricaricare=true; function AperturaMarkerGuida(idsk,idmarker){ var marcatore=markerList[idmarker]; possoricaricare=false; if (!markerAperto[idsk]) { AggiornaVisite(idsk); marcatore.ApriBaloon(); } markerAperto[idsk]=true; } function ChiusuraMarkerGuida(idsk){ possoricaricare=true; markerAperto[idsk]=false; devoricaricare=true; bloccorichieste=false; //if (devoricaricare) RicaricoMAPPA(); } function createMarkerGUIDA(point, description ,Options,idsk) { var marker =new Oggetto_Marker_jifs(); markerList[++indexmarker]=marker; marker.mappa_associata=mapGUIDA; marker.SettaIcona(Options); marker.SetPoint(point.lat(),point.lng()); marker.AggiungiEventoMarcatore('click','AperturaMarkerGuida('+idsk+','+indexmarker+');'); if (strutturefisse && !scorrihotel) { marker.AggiungiEventoMarcatore('mouseover','AperturaMarkerGuida('+idsk+','+indexmarker+')'); } marker.AggiungiEventoMarcatore('closeclick','ChiusuraMarkerGuida('+idsk+')'); marker.createMarker(description,true); return marker; } function createMarkerGUIDAClick(point, description ,Options,UrlClick) { var marker =new Oggetto_Marker_jifs(); marker.mappa_associata=mapGUIDA; marker.SettaIcona(Options); marker.SetPoint(point.lat(),point.lng()); marker.AggiungiEventoMarcatore('click','location.replace(\''+UrlClick+'\');'); marker.createMarker(description,true); return marker; } var RispostaRKS=function FR_SendDato(contenuto){ } var idChiamata_RispostaRK=Definisci_Chiamata_jifs(RispostaRKS,'txt'); function SendDatoCOD(idsk,lat,lng) { var urlrichiesta='/inc/caricaLat.php?idsk='+escape(idsk)+'&lat='+escape(lat)+'&lng='+escape(lng); Chiamata_jifs(urlrichiesta,idChiamata_RispostaRK); } var PuntoCodificato_geoscript=new Oggetto_LatLng_jifs(); function addAddressToMap(response) { if (!response) { var descrizione=dcodificare[ncodifica-1]; // alert('no codificato\n'+descrizione); ncodifica--; if (ncodifica>0) { var geocodifica=gcodificare[ncodifica-1]; //geocoder.getLocations(geocodifica, addAddressToMap) CodificaIndirizzo_jifs(geocodifica,'addAddressToMap(true)','addAddressToMap(false)',PuntoCodificato_geoscript); } } else { var lat=PuntoCodificato_geoscript.lat; var lng=PuntoCodificato_geoscript.lng; rispostapint = new google.maps.LatLng(lat,lng); ncodifica--; var descrizione=dcodificare[ncodifica]; var icona=icodificare[ncodifica]; var idk=kcodificare[ncodifica]; var hotelsuGUida=createMarkerGUIDA(rispostapint,descrizione,icona,idk); SendDatoCOD(idk,lat,lng); if (ncodifica>0) { var geocodifica=gcodificare[ncodifica-1]; CodificaIndirizzo_jifs(geocodifica,'addAddressToMap(true)','addAddressToMap(false)',PuntoCodificato_geoscript); } } } 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 google.maps.LatLng(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]; CodificaIndirizzo_jifs(geocodifica,'addAddressToMap(true)','addAddressToMap(false)',PuntoCodificato_geoscript); } //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 google.maps.LatLng(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); hotelsuGUida=createMarkerGUIDA(rispostapint,descrizione,icona,IDScheda); } } if (ncodifica>0) { var geocodifica=gcodificare[ncodifica-1]; //geocoder.getLocations(geocodifica, addAddressToMap); CodificaIndirizzo_jifs(geocodifica,'addAddressToMap(true)','addAddressToMap(false)',PuntoCodificato_geoscript); } //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 google.maps.LatLng(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); hotelsuGUida=createMarkerGUIDA(rispostapint,descrizione,icona,IDScheda); if (apri_primo_marker) { //hotelsuGUida.openInfoWindowHtml(descrizione,{maxWidth: MassimaAmpiezza}); hotelsuGUida.ApriBaloon(); 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); CodificaIndirizzo_jifs(geocodifica,'addAddressToMap(true)','addAddressToMap(false)',PuntoCodificato_geoscript); } //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 google.maps.LatLng(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); hotelsuGUida=createMarkerGUIDA(rispostapint,descrizione,icona,IDScheda); } } if (ncodifica>0) { var geocodifica=gcodificare[ncodifica-1]; //geocoder.getLocations(geocodifica, addAddressToMap); CodificaIndirizzo_jifs(geocodifica,'addAddressToMap(true)','addAddressToMap(false)',PuntoCodificato_geoscript); } //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_jifs(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_jifs(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_jifs(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_jifs(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_jifs(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_jifs(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(); mapGUIDA.Clear(); StartAnimazioneAttesa(); paginascorrimento=npagina; memoHot=true; myRequestH = CreateXmlHttpReq_jifs(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(); mapGUIDA.Clear(); 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; mapGUIDA.FittaMappa(MaxLat,MinLat,MaxLng,MinLng); /* //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.Clear(); 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'); }