var count_strutture = 13; // JScript source code function GetPrenotazione(data) { //debugger; var dateFormatted = dateFormat(data,"yyyy-mm-dd"); try { showWorkingImage(); var strUrl = "_webservices/getprenotazione.php?d=" + encodeURIComponent(dateFormatted) + "&r="+Math.random(); stdAjaxCall(strUrl, getPrenotazioneCallback); } catch(ex) { var strErr = "\nErrore GetPrenotazione numero: " + (ex.number & 0xFFFF); strErr += "\nDescrizione: " + ex.description; window.alert(ex + strErr); } } function getPrenotazioneCallback() { try { if (objAquaXHttp.readyState == 4 || objAquaXHttp.readyState == "complete") { if (objAquaXHttp.status == 200) { var strResult = getFromResponse(objAquaXHttp); SetMapStatus(strResult); strResult = null; hideWorkingImage(); } else { alert('Error in getPrenotazioneCallback(), status = ' + objAquaXHttp.status); } } } catch(ex) { var strErr = "\nError getPrenotazioneCallback() num.: " + (ex.number & 0xFFFF); strErr += "\nDescription: " + ex.description; window.alert(ex + strErr); } } function SetMapStatus(strInfoPrenotazione) { var arrInfoPrenotazione = strInfoPrenotazione.split("|"); //debugger; for(var i = 1; i < count_strutture + 1; i++) { var map = document.getElementById("mappa"+i);//div var mp = document.getElementById("mp"+i);//img var imgmp = document.getElementById("map"+i);//img map if(map) { map.style.visibility = "hidden"; mp.src = "_mappa/pianta_nuova" + i + ".gif"; imgmp.alt = mp.getAttribute("longdesc"); imgmp.title = mp.getAttribute("longdesc"); for(var j = 0; j < arrInfoPrenotazione.length; j++) { var arrInfo = arrInfoPrenotazione[j].split("-"); var campo = arrInfo[0]; var arrivo = arrInfo[1]; var partenza = arrInfo[2]; if(campo == i) { map.style.zindex = 3+i; map.style.visibility = ""; /*if(arrivo!="00:00:00" || partenza!="24:00:00") { //mp.src = "_mappa/pianta_nuova" + i + "h.gif"; if(arrivo=="0000") { imgmp.alt += "\nPrenotato fino alle ore " + partenza.substring(0,2) + ":" + partenza.substring(2,4); } else { imgmp.alt += "\nPrenotato dalle ore " + arrivo.substring(0,2) + ":" + arrivo.substring(2,4); } if(arrivo!="0000" && partenza!="2400") { imgmp.alt += " alle ore " + partenza.substring(0,2) + ":" + partenza.substring(2,4); } } else { imgmp.alt += "\nPrenotato tutto il giorno"; }*/ } campo = null; arrivo = null; partenza = null; } imgmp.title = imgmp.alt; } map = null; mp = null; imgmp = null; } arrInfoPrenotazione = null; } function HightLightMapPoint(objMap,view) { var divDetVel = document.getElementById("DettaglioVeloce"); if(view) { divDetVel.innerHTML = ""+objMap.title+""; } else { divDetVel.innerHTML = ""; } divDetVel = null; } function OpenDetails(IDStruttura,open,lang) { if(open) { location.href = "/vara/main.php?pagina=presentazione&struttura=" + IDStruttura + "&lang=" + lang; //alert('Qui verrą aperta una finestra popup con i dettagli del campo selezionato\nHai selezionato il campo : ' + IDStruttura); } }