function submitBoxSearch()
{
	var x;
	
	x = document.getElementById('destinazione');
	if( x.value == "" || x.value == "inserisci una destinazione" )
	{
		alert("E' necessario inserire una destinazione.");
		return false;
	}
	
	var check = document.getElementById('solo_disponibili');
	if (check.checked)
	{
		x = document.getElementById('check_in');
		if (x.value == "")
		{
			alert("E' necessario inserire una data di check in.");
			return false;
		}
		
		x = document.getElementById('check_out');
		if (x.value == "")
		{
			alert("E' necessario inserire una data di check out.");
			return false;
		}
	}
	
	return true;
}

function cleanDestinazione(obj)
{
	if( obj.value == 'inserisci una destinazione' )
	{
		obj.value = '';
	}
}

function showHide(x)
{
	var obj = document.getElementById(x);
	if( obj.className == "show" )
	{
		obj.className = "hide";
	}
	else
	{
		obj.className = "show";
	}
}

function showHideTr(x)
{
	var obj = document.getElementById(x);
	if( obj.className == "showTr" )
	{
		obj.className = "hide";
	}
	else
	{
		obj.className = "showTr";
	}
}


function showmap(x)
{
	var obj       = document.getElementById('mapContainer');
	var iframeObj = document.getElementById('mapIframe');
	if( obj.className == "show" )
	{
		obj.className = "hide";
		iframeObj.src = '';
	}
	else
	{
		obj.className = "show";
		iframeObj.src = 'maps/map_struttura.php';
	}
}

function prSubmit()
{
	alert("ATTENZIONE: La prenotazione sara' abilitata a breve!");
	return false;
}
function showDiv(x)
{
	var obj = document.getElementById(x);
	obj.style.display = "block";
}
function hideDiv(x)
{
	var obj = document.getElementById(x);
	obj.style.display = "none";
}


function showPhoto(path, id,img_w)
{
	x = document.getElementById(id);
	if (img_w == '')
		x.innerHTML = '<img src="'+ path +'" alt="">';
	else
		x.innerHTML = '<img src="'+ path +'" alt="" width="' + img_w + 'px">';
}

function openDisclaimersWin()
{
  var url = 'http://www.gopuglia.it/disclaimers.php';
	window.open(url,"disclaimers","width=790,height=650,menubar=no,statusbar=no,resizable=yes,scrollbars=yes");
}


