// JavaScript Document
idioma = "es";

window.onload = function() {
	iniMenu();
	try {iniMenuHotel()} catch(e) {}
	try {inicializaCalendario()} catch(e) {}
	try {inicializaReserva()} catch(e) {}
	try {inicializaOfertas()} catch(e){}
	try {iniNuestrosHoteles()} catch(e) {}
	try {initPagLocal()} catch(e) {}
}

function SinReservas() {
	switch(idioma){
		case "es":
		mensaje = "En este momento no hay disponibilidad en nuestros hoteles"
		break;
		case "de":
		mensaje = "Kein verf&uuml;gbare Zimmer zu diesem Zeitpunkt"
		break;
		default:
		mensaje = "No rooms available at this time in our hotels"
		break;
	}
	
	var div1 = document.createElement("div");
	div1.id="fondoAdvertencia";
	div1.style.position="fixed";
	div1.style.top="0";
	div1.style.left="0";
	div1.style.width="100%";
	div1.style.height="100%";
	div1.style.backgroundColor="#000000";
	div1.style.filter="alpha(opacity=50)";
	div1.style.opacity=0.5;
	div1.style.zIndex="1000";
	
	var div2 = document.createElement("div");
	div2.id="advertencia";
	div2.style.position="fixed";
	div2.style.top="50%";
	div2.style.left="50%";
	div2.style.width="300px";
	div2.style.height="100px";
	div2.style.marginLeft="-150px";
	div2.style.marginTop="-50px";
	div2.style.backgroundColor="white";
	div2.style.cursor="pointer";
	div2.style.zIndex="1001";
	
	var div3 = document.createElement("div");
	div3.style.margin="35px";
	div3.style.textAlign="center";
	div3.style.fontWeight="bold";
	div3.innerHTML = mensaje;
	
	div1.onclick = div2.onclick = CierraAdvertencia;
	
	div2.appendChild(div3);
	document.body.appendChild(div1);
	document.body.appendChild(div2);
}

function CierraAdvertencia(){
	$("fondoAdvertencia").parentNode.removeChild($("fondoAdvertencia"));
	$("advertencia").parentNode.removeChild($("advertencia"));
}
