function ver_mapa_hotel(url)
{
window.open('http://www.travelnow.com/hotels/info/map.jsp?prop=' + url + '','map','width=478,height=333,top=170,left=162,toolbar=no,location=no,directories=no,status=no,menubar=no,dependent=yes,resizable=no,status=no,scrollbars=no');
}

function zoom(url)
   {  searchWin =
window.open(url,'zoom','location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no , width=100, height=100');

}

function mapa(loc,who) 
	{  
	var winl = (screen.width-575); 
	var wint = (screen.height-300)/2; 
	settings='height=420,width=550,top='+wint+',left='+winl+',scrollbars=yes,toolbar=0,location=no,titlebar=0,status=0,menubar=0,resizable=0,dependent=0,copyhistory=0' 
	
	{
	
	var myurl ='/mappa.php?id=' +loc+ '&chi=' + who;
	
	MyPopUp = window.open(myurl,'mappa',settings);
	MyPopUp.focus();
	} 
	}    

<!--
 function MM_jumpMenu(targ,selObj,restore){ //v3.0
   eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
   if (restore) selObj.selectedIndex=0;
 }
 
 
 function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
   if(window.screen)if(isCenter)if(isCenter=="true"){
	 var myLeft = (screen.width-myWidth)/2;
	 var myTop = (screen.height-myHeight)/2;
	 features+=(features!='')?',':'';
	 features+=',left='+myLeft+',top='+myTop;
   }
   window.open('http://www.it.ultrahotels.net'+theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
 }
 
function getById(id) { 
	return document.getElementById?document.getElementById(id):(document.all?document.all(id):null); 
	}
function hideDiv(id) { 
	getById(id).style.visibility = "hidden"; 
	getById(id).style.display = "none"; 
	}
function showDiv(id) { 
	getById(id).style.visibility = "visible"; 
	getById(id).style.display = "block"; 
}
function togglevis(layerID){ 
	if(getById(layerID).style.visibility=="hidden"){
		showDiv(layerID);
	}else{
		hideDiv(layerID);
	}
}
// Start progress bar
 var progressColour = "#3173C3";
    //hiding the progressbar on unload
    window.onunload = hideProgress;
    var progressEnd = 12;
    var progressInterval = 500;
    var progressAt = progressEnd;
    var progressTimer;
 
    function progressClear() {
        for (var i = 1; i <= progressEnd; i++) {
            document.getElementById('progress' + i).style.backgroundColor = 'transparent';
        }
        progressAt = 0;
    }
 
    function progressUpdate() {
        progressAt++;
        if (progressAt > progressEnd) {
            progressClear();
        }
        else {
            document.getElementById('progress' + progressAt).style.backgroundColor = progressColour;
        }
        progressTimer = setTimeout('progressUpdate()', progressInterval);
    }
 
    function progressStop() {
        clearTimeout(progressTimer);
        progressClear();
    }
 
    function hideProgress() {
       getById('progressBar').style.visibility = "hidden";
       getById('progressBar').style.display = "none";
    }
 //return {x:cont.scrollLeft, y:cont.scrollTop};return {x:window.pageXOffset, y:window.pageYOffset};
 function getScroll() {
 if (document.all) {
  var ieBox = document.compatMode != "CSS1Compat";
  var cont = ieBox ? document.body : document.documentElement;
  return {x:cont.scrollLeft, y:cont.scrollTop};
 } else {
  return {x:window.pageXOffset, y:window.pageYOffset};
 }
 }
  
function getBrowserWidth() {
    if (typeof( window.innerWidth ) == 'number') {
        //Non-IE
        return window.innerWidth;
    } else if (document.documentElement && document.documentElement.clientWidth) {
        //IE 6+ in 'standards compliant mode'
        return document.documentElement.clientWidth;
    } else if (document.body && document.body.clientWidth) {
        //IE 4 compatible
        return document.body.clientWidth;
    }
}
 
function getBrowserHeight() {
    if (typeof( window.innerHeight ) == 'number') {
        //Non-IE
        return window.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
        //IE 6+ in 'standards compliant mode'
        return document.documentElement.clientHeight;
    } else if (document.body && document.body.clientHeight) {
        //IE 4 compatible
        return document.body.clientHeight;
    }
}
 
    function progressStart(waitText) {
 
        var progress = getById('progressBar');
        var scroll = getScroll();
		var bwidth=getBrowserWidth();
 
        progress.innerHTML = '<table class="progressTable" bordercolor="#000000" style="width:1px;" align="center">' +
                '<tr><td class="progressText"><br>'+
                waitText+
                '<br></td></tr>' +
                '<tr><td class="progressBar">' +
                '<span id="progress1">&nbsp; &nbsp;</span>' +
                '<span">&nbsp;</span>' +
                '<span id="progress2">&nbsp; &nbsp;</span>' +
                '<span">&nbsp;</span>' +
                '<span id="progress3">&nbsp; &nbsp;</span>' +
                '<span">&nbsp;</span>' +
                '<span id="progress4">&nbsp; &nbsp;</span>' +
                '<span">&nbsp;</span>' +
                '<span id="progress5">&nbsp; &nbsp;</span>' +
                '<span">&nbsp;</span>' +
                '<span id="progress6">&nbsp; &nbsp;</span>' +
                '<span">&nbsp;</span>' +
                '<span id="progress7">&nbsp; &nbsp;</span>' +
                '<span">&nbsp;</span>' +
                '<span id="progress8">&nbsp; &nbsp;</span>' +
                '<span">&nbsp;</span>' +
                '<span id="progress9">&nbsp; &nbsp;</span>' +
                '<span">&nbsp;</span>' +
                '<span id="progress10">&nbsp; &nbsp;</span>' +
                '<span">&nbsp;</span>' +
                '<span id="progress11">&nbsp; &nbsp;</span>' +
                '<span">&nbsp;</span>' +
                '<span id="progress12">&nbsp; &nbsp;</span>' +
                '</td></tr></table>';
 
        progress.style.top = (350 - progress.scrollHeight) + 100; //+ scroll.y
        progress.style.left = (780 - progress.scrollWidth) + bwidth/7 + scroll.x;
 
        progressUpdate();
    }
	// end progress bar
function setCheckOut(){
	var smesef=document.verifica_date.mese_start.value;
	var s_day=document.verifica_date.giorno_start.value;
	s_day_test=parseInt(s_day);
	s_day=s_day_test+1;
	var sdateArray = smesef.split('/');
	var smonth=sdateArray[0]-1;
	var syear=sdateArray[1];
	var sdate_test = new Date(syear,smonth,s_day_test,0,0,0);
    var sdate = new Date(syear,smonth,s_day,0,0,0);
	var stest_month=sdate_test.getMonth();
	if (stest_month!=smonth){
		alert('fecha de llegada no valida: il '+s_day_test+'/'+sdateArray[0]+'/'+syear+' no existe!');//
		return false;
	}
	var e_day=sdate.getDate();
	var e_month=sdate.getMonth()+1;
	e_month=e_month.toString();
	if (e_month.length==1){
		e_month='0'+e_month;
	}
	var e_year=sdate.getYear();
	var e_mese=e_month+'/'+e_year;
	document.verifica_date.giorno_end.value=e_day;
	document.verifica_date.mese_end.value=e_mese;
}

function checkFormAvailability(today){
	var smesef=document.verifica_date.mese_start.value;
	var emesef=document.verifica_date.mese_end.value;
	var s_day=document.verifica_date.giorno_start.value;
	
	
 	var sdateArray = smesef.split('/');
	var smonth=sdateArray[0]-1;
	var syear=sdateArray[1];
    var sdate = new Date(syear,smonth,s_day,0,0,0);
	var stest_month=sdate.getMonth();
	if (stest_month!=smonth){
		alert('fecha de llegada no valida: il '+s_day+'/'+sdateArray[0]+'/'+syear+' no existe!');//
		return false;
	}
	var e_day=document.verifica_date.giorno_end.value;
	var edateArray =emesef.split('/');
	var emonth=edateArray[0]-1;
	var eyear=edateArray[1];
    var edate = new Date(eyear,emonth,e_day,0,0,0);
	var etest_month=edate.getMonth();
	if (etest_month!=emonth){
		alert('fecha de llegada no valida: il '+e_day+'/'+edateArray[0]+'/'+eyear+' no existe!');					
		return false;
	}
	var end_time=edate.getTime();
	var start_time=sdate.getTime();
	if (start_time-today<0){
		alert('fecha de llegada no valida');
		return false;
	}
	if ((edate.getTime()-sdate.getTime())<=0){
		alert('fecha de salida anterior o igual a la fecha de llegada');
		return false;
	}
	else {
		progressStart("Búsqueda de alojamento en curso, esperar por favor...");
		return true;
		}

}