';
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;i
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= '';
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');
}