function cercaRuta(){
		cityFrom=document.getElementById("cityFrom").value;
		document.location.href="http://www.hotelalcoceber.com/~central/htl_rutamapa.php?cityFrom=" + cityFrom;
									}

function getAbsoluteElementPosition(element) {
  if (typeof element == "string")
    element = document.getElementById(element)
    
  if (!element) return { top:0,left:0 };
  
  var y = 0;
  var x = 0;
  while (element.offsetParent) {
    x += element.offsetLeft;
    y += element.offsetTop;
    element = element.offsetParent;
  }
  return {top:y,left:x};
}


	function addFav(argVal){
		var bookData = new Array();
		bookData = argVal.split("|");

		if (document.all){
			window.external.AddFavorite(bookData[0], bookData[1]);
		} else {
			alert("Lo sentimos, los usuarios de Netscape han de añadir a favoritos esta web manualmente pulsando <Ctrl-D>");
		}
	}
	
function ensenar()
{
	document.getElementById("resumen").style.display = "block";
  	var elemento = document.getElementById("otrosEnlaces");
  	var pos = getAbsoluteElementPosition(elemento);
	pos.top = pos.top - 150;
	document.getElementById("resumen").style.top = pos.top+"px";
	document.getElementById("resumen").style.left = pos.left+"px";
}

function esconder()
{
	document.getElementById("resumen").style.display = "none";
}

function mostrar(id)
{
	if (document.getElementById('td_sub_' + id)!= 'null'){
		if (document.getElementById('td_sub_' + id).style.display != ''){
			document.getElementById('td_sub_' + id).style.display ='';
			document.getElementById('vinculo' + id).className ="link1_over";
		}
		else {
			document.getElementById('td_sub_' + id).style.display='none';
			document.getElementById('vinculo' + id).className ="link1";
		}
	}
}

function mostrarocultar()
{
 	   if (document.getElementById("subterminos").style.display != 'none'){
			document.getElementById("subterminos").style.display ='none';
		}
		else {
			document.getElementById("subterminos").style.display='block';
		}
}



function valida(){
			submitOk = true;
			var emailFilter=/^.+@.+\..{2,4}$/;
			if(document.frmNEWSLETTER.email.value == ""){
				submitOk = false;
				alert("");
				document.frmNEWSLETTER.email.focus();
			}			
			if (document.frmNEWSLETTER.email.value != "" && !(emailFilter.test(document.frmNEWSLETTER.email.value)) && submitOk) {
				submitOk = false;
				alert("");
				document.frmNEWSLETTER.email.focus();
			}			

			if(!document.frmNEWSLETTER.leido.checked && submitOk){
				submitOk = false;
				alert("");
			}

			return submitOk;
			
		}
		
		<!--
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Gestionar todos los mensajes de FSCommand de una película Flash
function carroussel_DoFSCommand(command, args) {
	var carrousselObj = isInternetExplorer ? document.all.carroussel : document.carroussel;
	//
	// Introduzca su código aquí.
	//
	//alert(command);
	//alert(args);
	pop('http://www.onodo.com/360/showipix.php?img='+ args,'ipix','500','300','no','no');
	

}
// Ancla para Internet Explorer
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub carroussel_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call carroussel_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
//-->
		
									
								  function checkCR(evt) {
								
									var evt  = (evt) ? evt : ((event) ? event : null);
								
									var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
								
									if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
								
								  }
								
								  document.onkeypress = checkCR;	




	
		function valida(){
			submitOk = true;
			var emailFilter=/^.+@.+\..{2,4}$/;
			if(document.frmNEWSLETTER.email.value == ""){
				submitOk = false;
				alert("no olvide su email");
				document.frmNEWSLETTER.email.focus();
			}			
			if (document.frmNEWSLETTER.email.value != "" && !(emailFilter.test(document.frmNEWSLETTER.email.value)) && submitOk) {
				submitOk = false;
				alert("su email no parece correcto");
				document.frmNEWSLETTER.email.focus();
			}			

			if(!document.frmNEWSLETTER.leido.checked && submitOk){
				submitOk = false;
				alert("es necesario aceptar las condiciones de privacidad para continuar con el proceso");
			}

			return submitOk;
			
		}
		
			var imageOfferes = 'es'; 
			var imageOfferen = 'en';
			
					function reservar1(){
								var fecha_entrada = document.getElementById('fecha_entrada').value;
								var fecha_salida = document.getElementById('fecha_salida').value;
											
								if(fecha_entrada=='' && fecha_salida==''){
									alert('Las fechas son obligatorias!');return false;
								}
								else{
										if(fecha_entrada==''){
											alert('Las fecha de Entrada es obligatoria!');return false;
										}
										else{
											if(fecha_salida==''){
													alert('Las fecha de Salida es obligatoria!');return false;
											}
											else{
												var dif = DiferenciaFechas ('Las fecha de Entrada es obligatoria!', document.getElementById('fecha_entrada'), 'Las fecha de Salida es obligatoria!', document.getElementById('fecha_salida'), '/');
												if( dif >= 0){
													window.open('http://www.vectork.net/webguest/peticiones/FrmPeticion.aspx?hotel=186&idioma='+'es'+'&en='+fecha_entrada+'&sa='+fecha_salida+'&rg=AD&p1=2&n1=0&b1=0&p2=0&n2=0&b2=0&p3=0&n3=0&b3=0', 'Detalle', 'height=800,top=0,left=0,  width=1000, scrollbars=yes, statusbar=si,titlebar=yes, resizable=yes,toolbar=yes,menubar=yes,location=yes,  status=yes,fullscreen=no');				
												}
											}
										}
								}
						}
				function reservar3(){
								var fecha_entrada = document.getElementById('fecha_entrada').value;
								var fecha_salida = document.getElementById('fecha_salida').value;
								
																
								if(fecha_entrada=='' && fecha_salida==''){
									alert('Las fechas son obligatorias!');return false;
								}
								else{
										if(fecha_entrada==''){
											alert('Las fecha de Entrada es obligatoria!');return false;
										}
										else{
											if(fecha_salida==''){
													alert('Las fecha de Salida es obligatoria!');return false;
											}
											else{
												var dif = DiferenciaFechas ('Las fecha de Entrada es obligatoria!', document.getElementById('fecha_entrada'), 'Las fecha de Salida es obligatoria!', document.getElementById('fecha_salida'), '/');
												if( dif >= 0){
													window.open('http://www.vectork.net/webguest/peticiones/FrmPeticion.aspx?hotel=189&idioma='+'es'+'&en='+fecha_entrada+'&sa='+fecha_salida+'&rg=AD&p1=2&n1=0&b1=0&p2=0&n2=0&b2=0&p3=0&n3=0&b3=0', 'Detalle', 'height=800,top=0,left=0,  width=1000, scrollbars=yes, statusbar=si,titlebar=yes, resizable=yes,toolbar=yes,menubar=yes,location=yes,  status=yes,fullscreen=no');				
												}
											}
										}
								}
						}				
				
				function reservar4(){
								var fecha_entrada = document.getElementById('fecha_entrada').value;
								var fecha_salida = document.getElementById('fecha_salida').value;
								
																
								if(fecha_entrada=='' && fecha_salida==''){
									alert('Las fechas son obligatorias!');return false;
								}
								else{
										if(fecha_entrada==''){
											alert('Las fecha de Entrada es obligatoria!');return false;
										}
										else{
											if(fecha_salida==''){
													alert('Las fecha de Salida es obligatoria!');return false;
											}
											else{
												var dif = DiferenciaFechas ('Las fecha de Entrada es obligatoria!', document.getElementById('fecha_entrada'), 'Las fecha de Salida es obligatoria!', document.getElementById('fecha_salida'), '/');
												if( dif >= 0){
													window.open('http://www.vectork.net/webguest/peticiones/FrmPeticion.aspx?hotel=192&idioma='+'es'+'&en='+fecha_entrada+'&sa='+fecha_salida+'&rg=AD&p1=2&n1=0&b1=0&p2=0&n2=0&b2=0&p3=0&n3=0&b3=0', 'Detalle', 'height=800,top=0,left=0,  width=1000, scrollbars=yes, statusbar=si,titlebar=yes, resizable=yes,toolbar=yes,menubar=yes,location=yes,  status=yes,fullscreen=no');				
												}
											}
										}
								}
						}
				function reservar5(){
								var fecha_entrada = document.getElementById('fecha_entrada').value;
								var fecha_salida = document.getElementById('fecha_salida').value;
								
																
								if(fecha_entrada=='' && fecha_salida==''){
									alert('Las fechas son obligatorias!');return false;
								}
								else{
										if(fecha_entrada==''){
											alert('Las fecha de Entrada es obligatoria!');return false;
										}
										else{
											if(fecha_salida==''){
													alert('Las fecha de Salida es obligatoria!');return false;
											}
											else{
												var dif = DiferenciaFechas ('Las fecha de Entrada es obligatoria!', document.getElementById('fecha_entrada'), 'Las fecha de Salida es obligatoria!', document.getElementById('fecha_salida'), '/');
												if( dif >= 0){
													window.open('http://www.vectork.net/webguest/peticiones/FrmPeticion.aspx?hotel=188&idioma='+'es'+'&en='+fecha_entrada+'&sa='+fecha_salida+'&rg=AD&p1=2&n1=0&b1=0&p2=0&n2=0&b2=0&p3=0&n3=0&b3=0', 'Detalle', 'height=800,top=0,left=0,  width=1000, scrollbars=yes, statusbar=si,titlebar=yes, resizable=yes,toolbar=yes,menubar=yes,location=yes,  status=yes,fullscreen=no');				
												}
											}
										}
								}
						}
						
				function reservar6(){
								var fecha_entrada = document.getElementById('fecha_entrada').value;
								var fecha_salida = document.getElementById('fecha_salida').value;
								
																
								if(fecha_entrada=='' && fecha_salida==''){
									alert('Las fechas son obligatorias!');return false;
								}
								else{
										if(fecha_entrada==''){
											alert('Las fecha de Entrada es obligatoria!');return false;
										}
										else{
											if(fecha_salida==''){
													alert('Las fecha de Salida es obligatoria!');return false;
											}
											else{
												var dif = DiferenciaFechas ('Las fecha de Entrada es obligatoria!', document.getElementById('fecha_entrada'), 'Las fecha de Salida es obligatoria!', document.getElementById('fecha_salida'), '/');
												if( dif >= 0){
													window.open('http://www.vectork.net/webguest/peticiones/FrmPeticion.aspx?hotel=193&idioma='+'es'+'&en='+fecha_entrada+'&sa='+fecha_salida+'&rg=AD&p1=2&n1=0&b1=0&p2=0&n2=0&b2=0&p3=0&n3=0&b3=0', 'Detalle', 'height=800,top=0,left=0,  width=1000, scrollbars=yes, statusbar=si,titlebar=yes, resizable=yes,toolbar=yes,menubar=yes,location=yes,  status=yes,fullscreen=no');				
												}
											}
										}
								}
						}
						
				function reservar7(){
								var fecha_entrada = document.getElementById('fecha_entrada').value;
								var fecha_salida = document.getElementById('fecha_salida').value;
								
																
								if(fecha_entrada=='' && fecha_salida==''){
									alert('Las fechas son obligatorias!');return false;
								}
								else{
										if(fecha_entrada==''){
											alert('Las fecha de Entrada es obligatoria!');return false;
										}
										else{
											if(fecha_salida==''){
													alert('Las fecha de Salida es obligatoria!');return false;
											}
											else{
												var dif = DiferenciaFechas ('Las fecha de Entrada es obligatoria!', document.getElementById('fecha_entrada'), 'Las fecha de Salida es obligatoria!', document.getElementById('fecha_salida'), '/');
												if( dif >= 0){
													window.open('http://www.vectork.net/webguest/peticiones/FrmPeticion.aspx?hotel=190&idioma='+'es'+'&en='+fecha_entrada+'&sa='+fecha_salida+'&rg=AL&p1=2&n1=0&b1=0&p2=0&n2=0&b2=0&p3=0&n3=0&b3=0', 'Detalle', 'height=800,top=0,left=0,  width=1000, scrollbars=yes, statusbar=si,titlebar=yes, resizable=yes,toolbar=yes,menubar=yes,location=yes,  status=yes,fullscreen=no');				
												}
											}
										}
								}
						}						

					function DiferenciaFechas (msg_fecha_ini, fecha_ini, msg_fecha_fin, fecha_fin, separador) {

					   //Obtiene los datos del formulario
					   CadenaFecha1 = fecha_ini.value
					   CadenaFecha2 = fecha_fin.value
					   
					   //Obtiene dia, mes y año
					   var fecha1 = new fecha( CadenaFecha1 )   
					   var fecha2 = new fecha( CadenaFecha2 )
					   
					   //Obtiene objetos Date
					   var miFecha1 = new Date(fecha1.anio, fecha1.mes ,fecha1.dia)
					   var miFecha2 = new Date(fecha2.anio, fecha2.mes, fecha2.dia)
					   var today = new Date();
					   var month = today.getMonth();
					   var year  = today.getFullYear();
					   var dia = today.getDate();
					   var miFecha3 = new Date(year, month, dia);
					  					   
					   
					   var diferencia1 = miFecha1.getTime() - miFecha3.getTime()
					   var dias1 = Math.floor(diferencia1 / (1000 * 60 * 60 * 24))
					   
					   
					   if(dias1 < 0){
						   		alert ('Se ha ingresado un intervalo de fechas no permitido!');
								var dias=-1;
					   }
					   else{
						   
						   var diferencia2 = miFecha2.getTime() - miFecha3.getTime()
					       var dias2 = Math.floor(diferencia2 / (1000 * 60 * 60 * 24))
					  	   if(dias2 < 0){
						   		alert ('Se ha ingresado un intervalo de fechas no permitido!');
								var dias=-1;
							}
							else{
									//Resta fechas y redondea
								   var diferencia = miFecha2.getTime() - miFecha1.getTime()
								   var dias = Math.floor(diferencia / (1000 * 60 * 60 * 24))
									
								   var segundos = Math.floor(diferencia / 1000)
								   if (dias < 0)
								   		alert ('Se ha ingresado un intervalo de fechas no permitido!');
							}
					  	}
					   return dias;
					}

					function fecha( cadena ) {
					   //Separador para la introduccion de las fechas
					   var separador = "/"

					   //Separa por dia, mes y año
					   if ( cadena.indexOf( separador ) != -1 ) {
					        var posi1 = 0
					        var posi2 = cadena.indexOf( separador, posi1 + 1 )
					        var posi3 = cadena.indexOf( separador, posi2 + 1 )
					        this.dia = cadena.substring( posi1, posi2 )
					        txtMes = cadena.substring( posi2 + 1, posi3 ) - 1
							txtMes = "0" + txtMes;
							this.mes = txtMes.substring( txtMes.length -2, txtMes.length )
					        this.anio = cadena.substring( posi3 + 1, cadena.length )
					   } else {
					        this.dia = 0
					        this.mes = 0
					        this.anio = 0   
					   }
					}
	
