		function cargaGaleria(plano,nombrePlano, txt_alt){
			posicionaCapa("dd1")
			var obj_fondo = document.getElementById("dd1");
			if(document.documentElement.clientHeight < document.documentElement.scrollHeight){
				var alto_temp = document.documentElement.scrollHeight;
				var ancho_temp = document.documentElement.scrollWidth;
			}else{
				var alto_temp = document.documentElement.clientHeight;
				var ancho_temp = document.documentElement.clientWidth;
			}
			
			obj_fondo.style.visibility="visible";
			obj_fondo.style.top = 0 + "px";
			obj_fondo.style.width= ancho_temp + "px";
			obj_fondo.style.height= alto_temp + "px";	
			var obj_contenido = document.getElementById("capaContenido");
			if (window.pageYOffset)	{
				_scrollTop = window.pageYOffset;
			}
			else
			{
				_scrollTop = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
			}

			top_temp = (document.documentElement.clientHeight/2) - 255; //el 200 es la altura/2 de la capa
			left_temp = (document.documentElement.clientWidth/2) - 209; //el 209 es la anchura/2 de la capa

			obj_contenido.style.top= eval(top_temp+_scrollTop) + "px";
			obj_contenido.style.left= left_temp + "px";

			obj_contenido.innerHTML = "<table border=0 style=background-repeat:no-repeat background=imagenes/fondoPlano1.gif cellpadding=0 cellspacing=0 width=418 height=510 bgcolor=#009933><tr><td height=70 valign=top><table width=100% height='75'><tr><td width='70'>&nbsp;</td><td valign='top' align='right'><a href='javascript:cerrarCapa()' style='color:#000000'>X </a>&nbsp;<br><br><br><br><font style='font-weight:bold; color:#FFFFFF; font-size:16px;'>" + txt_alt + "</font></td></tr></table></td></tr><tr><td valign='top'><img src='" + plano + "' width='400' height='420' class='imagenPlano' style='margin-top:5px'></td></tr></table>";

			obj_contenido.style.visibility="visible";
	
		}
		
		function cargaPlano(plano,nombrePlano){
			posicionaCapa("dd1")
			var obj_fondo = document.getElementById("dd1");
			if(document.documentElement.clientHeight < document.documentElement.scrollHeight){
				var alto_temp = document.documentElement.scrollHeight;
				var ancho_temp = document.documentElement.scrollWidth;
			}else{
				var alto_temp = document.documentElement.clientHeight;
				var ancho_temp = document.documentElement.clientWidth;
			}
			obj_fondo.style.visibility="visible";
			obj_fondo.style.top = 0 + "px";
			obj_fondo.style.width= ancho_temp + "px";
			obj_fondo.style.height= alto_temp + "px";	
			var obj_contenido = document.getElementById("capaContenido");
			if (window.pageYOffset)	{
				_scrollTop = window.pageYOffset;
			}
			else
			{
				_scrollTop = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
			}

			top_temp = (document.documentElement.clientHeight/2) - 200; //el 200 es la altura/2 de la capa
			left_temp = (document.documentElement.clientWidth/2) - 209; //el 209 es la anchura/2 de la capa

			obj_contenido.style.top= eval(top_temp+_scrollTop) + "px";
			obj_contenido.style.left= left_temp + "px";

			
    	obj_contenido.innerHTML = "<table border='0' background='imagenes/fondoPlano.gif' cellpadding='0' cellspacing='0' width='418' height='400'><tr><td height='70' valign='top'><table width='100%' height='75'><tr><td width='70'>&nbsp;</td><td align='left' valign='bottom' class='pnombrehotel'><strong>Plano " +  nombrePlano + "</strong></td><td width='70' valign='top' align='right'><a href='javascript:cerrarCapa()' style='color:#000000'>X </a>&nbsp;</td></tr></table></td></tr><tr><td><img src='hoteles/" + plano + "' width='400' height='300' class='imagenPlano'></td></tr></table>";
			obj_contenido.style.visibility="visible";
	
		}
		function AccionesFondo(url_ajax){
			posicionaCapa("dd1")
			var obj_fondo = document.getElementById("dd1");
			if(document.documentElement.clientHeight < document.documentElement.scrollHeight){
				var alto_temp = document.documentElement.scrollHeight;
				var ancho_temp = document.documentElement.scrollWidth;
			}else{
				var alto_temp = document.documentElement.clientHeight;
				var ancho_temp = document.documentElement.clientWidth;
			}
			obj_fondo.style.visibility="visible";
			
			obj_fondo.style.top = 0 + "px";
			obj_fondo.style.width= ancho_temp + "px";
			obj_fondo.style.height= alto_temp + "px";

			http_CargaDatos = NuevoAjax();
			var q = url_ajax + '&aleatorio='+ aleatorio(1,99999);

			http_CargaDatos.open("GET", q, true);
			http_CargaDatos.onreadystatechange = ResultadoCargaDatos;
			http_CargaDatos.send(null);
		}
		
		function ResultadoCargaDatos(){
			if (http_CargaDatos.readyState == 4)
			{
				var valor = http_CargaDatos.responseText.split('|');
				
				var obj_contenido = document.getElementById("capaContenido");
			if (window.pageYOffset)	{
				_scrollTop = window.pageYOffset;
			}
			else
			{
				_scrollTop = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
			}
			/*top_temp = 150 + _scrollTop;
			left_temp = 150;
			obj_contenido.style.top= top_temp + "px";
			obj_contenido.style.left= left_temp + "px";*/
			top_temp = (document.documentElement.clientHeight/2) - 260; //el 200 es la altura/2 de la capa
			left_temp = (document.documentElement.clientWidth/2) - 364; //el 209 es la anchura/2 de la capa

			obj_contenido.style.top= eval(top_temp+_scrollTop) + "px";
			obj_contenido.style.left= left_temp + "px";
			
				obj_contenido.innerHTML = valor[1];
				obj_contenido.style.visibility="visible";
			}else{
			}
		}
		
		function cerrarCapa(){
			var obj_fondo = document.getElementById("dd1");
			obj_fondo.style.visibility="hidden";
			obj_fondo.style.width= 1 + "px";
			obj_fondo.style.height= 1 + "px";
			var obj_contenido = document.getElementById("capaContenido");
			obj_contenido.style.visibility="hidden";
		}

	var miTimerOcultar;
	var miTimerMostrar;

	function cargaImagen(id_salon_h,puntero)
	{
		if (miTimerOcultar){
			clearTimeout(miTimerOcultar)
		}
		if (miTimerMostrar){
			clearTimeout(miTimerMostrar)
		}
		http = NuevoAjax();
		b = "&puntero=" + puntero;
		var z = 'ajax_imagesGallery_salon.cfm?id_salon_h=' + id_salon_h +' &idcache=' + aleatorio(1,9999999);
		http.open("GET", z+b, true);
//		document.write(z+b)
		http.onreadystatechange = ResultadoImagen;
		http.send(null);
	}
	
	function ResultadoImagen() {
		if (http.readyState == 4) {
			var valor = http.responseText.split('|');
			obj = document.getElementById("imagenDetalle");
			obj1 = document.getElementById("textoDetalle");
			objFlechas = document.getElementById("idFlechas");
			ocultar(obj,obj1,100,valor[1],valor[2]);
			objFlechas.innerHTML = valor[3]
		}
		else{
		}
	}
	
function hideWaitMessageAndShowCaption(obj,obj1)
{
	document.getElementById('waitMessage').style.display='none';
	mostrar(obj,obj1,0);	
}


function ocultar(obj,obj1,cont,imagen,texto){
	laimagen = imagen;
	eltexto = texto;
	aux = cont - 6;
	if (aux > 1){
		if (obj.style.MozOpacity){
			if (aux < 10){
				obj.style.MozOpacity = eval("0.0" + parseInt(aux))
				obj1.style.MozOpacity = eval("0.0" + parseInt(aux))
			}else{
				obj.style.MozOpacity = eval("0." + parseInt(aux))
				obj1.style.MozOpacity = eval("0." + parseInt(aux))
			}
		}else{
			obj.filters.alpha.opacity = parseInt(aux)
		}
		miTimerOcultar = setTimeout("ocultar(obj,obj1,aux,laimagen,eltexto)",1)
	}else{
		
		if (obj.style.MozOpacity){
			obj.style.MozOpacity = 0
			obj1.style.MozOpacity = 0
		}else{
			obj.filters.alpha.opacity = parseInt(aux)
		}

		document.getElementById('waitMessage').style.left = 170 + "px";
		document.getElementById('waitMessage').style.top = 280 + "px";
		document.getElementById('waitMessage').style.display='inline';
		obj.onload = function() { hideWaitMessageAndShowCaption(obj,obj1); };
		obj.src = laimagen;
		obj1.innerHTML = texto;

//		mostrar(obj,obj1,0);		
	}
}
function mostrar(obj,obj1,cont){
	aux = cont + 5
	if (aux < 99){
		if (obj.style.MozOpacity){
			if (aux < 10){
					obj.style.MozOpacity = eval("0.0" + parseInt(aux))
					obj1.style.MozOpacity = eval("0.0" + parseInt(aux))
			}else{

				obj.style.MozOpacity = eval("0." + parseInt(aux))
				obj1.style.MozOpacity = eval("0." + parseInt(aux))
			}
		}else{
				obj.filters.alpha.opacity = parseInt(aux)
		}
		miTimerMostrar =setTimeout("mostrar(obj,obj1,aux)",3)
	}else{
		if (obj.style.MozOpacity){
			obj.style.MozOpacity = 100
			obj1.style.MozOpacity = 100
		}else{
			obj.filters.alpha.opacity = parseInt(aux)
		}

	}
}