
	var i;
	var imagenes = new Array("img/espana/alava.gif","img/espana/albacete.gif","img/espana/alicante.gif","img/espana/almeria.gif","img/espana/asturias.gif","img/espana/avila.gif","img/espana/badajoz.gif","img/espana/baleares.gif","img/espana/barcelona.gif","img/espana/burgos.gif","img/espana/caceres.gif","img/espana/cadiz.gif","img/espana/canarias.gif","img/espana/cantabria.gif","img/espana/castellon.gif","img/espana/ciudad_real.gif","img/espana/cordoba.gif","img/espana/cuenca.gif","img/espana/gerona.gif","img/espana/granada.gif","img/espana/guadalajara.gif","img/espana/guipuzcua.gif","img/espana/huelva.gif","img/espana/huesca.gif","img/espana/jaen.gif","img/espana/lacoruna.gif","img/espana/larioja.gif","img/espana/leon.gif","img/espana/lerida.gif","img/espana/lugo.gif","img/espana/madrid.gif","img/espana/malaga.gif","img/espana/murcia.gif","img/espana/navarra.gif","img/espana/orense.gif","img/espana/palencia.gif","img/espana/pontevedra.gif","img/espana/salamanca.gif","img/espana/segovia.gif","img/espana/sevilla.gif","img/espana/soria.gif","img/espana/tarragona.gif","img/espana/teruel.gif","img/espana/toledo.gif","img/espana/valencia.gif","img/espana/valladolid.gif","img/espana/vizcaya.gif","img/espana/zamora.gif","img/espana/zaragoza.gif");
	var lista_imagenes = new Array();
function cargarimagenes(){

	for(i in imagenes){
		lista_imagenes[i] = new Image();
		lista_imagenes[i].src = imagenes[i];
	
	}
}

function muestracapa(idName){

    if(document.getElementById){
        document.getElementById(idName).style.visibility = "visible";
    }

	return(true);
}
function ocultacapa(idName){

    if(document.getElementById){
        document.getElementById(idName).style.visibility = "hidden";
    }

	return(true);
}
function cambiar_estilo(idName,class_name){
	
	if(document.getElementById){
        document.getElementById(idName).className = class_name;
    }
	return(true);
}
function cambiartitulo(titulo){
	document.title=titulo;	
	return(true);
}
function inicio_titulo(titulo){
	document.title=titulo;
	return(true);
}


function inicio_efectos(){
	new Effect.SlideDown('cuadro1');
	new Effect.Appear('cuadro2');
	new Effect.SlideDown('cuadro3');
	new Effect.Opacity('boton_cuadro1', { from: 1, to: 0.8 });
	new Effect.Opacity('boton_cuadro2', { from: 1, to: 0.8 });
	new Effect.Opacity('boton_cuadro3', { from: 1, to: 0.8 });
	return(true);
}
function buscar(){
	var donde;
	var patron;
	donde= document.getElementById('donde').selectedIndex;
	patron=document.getElementById('valor').value;
	switch (donde){
		case 0:document.location.href="?op=hoteles&name="+patron;
		break;
		case 1:document.location.href="?op=hoteles&state="+patron;
		break;
		case 2:document.location.href="?op=hoteles&city="+patron;
		break;
	}
	
	
}

function checkEnter(e){ //e is event object passed from function invocation
	var characterCode //literal character code will be stored in this variable
	if(e && e.which){ //if which property of event object is supported (NN4)
		e = e
		characterCode = e.which //character code is contained in NN4's which property
	}
	else{
		e = event
		characterCode = e.keyCode //character code is contained in IE's keyCode property
	}
	if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
	buscar();
return false
}
else{
return true
}

}
function cambia_fondo(id,ruta){
	var background;
	background="transparent url("+ruta+") no-repeat";
	document.getElementById(id).style.background = background;
}
function redirigir(pais){
	switch(pais){
		case "España": document.location.href="?op=hoteles&map=1&country="+pais;
		break;
		case "Portugal": document.location.href="?op=hoteles&map=2&country="+pais;
		break;
		case "Andorra": document.location.href="?op=hoteles&country="+pais;
		break;
		case "Resto de Europa": document.location.href="?op=hoteles&map=3";
		break;
	}
		
}
function loaded()
{
document.getElementById('tope').style.visibility = 'hidden';

} 



		//Indica aquí, en pixels, el ancho de tu marquesina
		var marqueewidth=200
		//Indica aquí, en pixels, el alto de tu marquesina
		var marqueeheight=20
		//Indica aquí la velocidad de recorrido del texto
		var speed=4
		//Escribe el mensaje que debe aparecer (con sus correspondientes enlaces, si los hay)
		
		 function create(contenido){
		 var marqueecontents=contenido
		if (document.all)
		document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>')
		 }
		function regenerate(){
			window.location.reload()
		}
		function regenerate2(){
			if (document.layers){
				setTimeout("window.onresize=regenerate",450)
				intializemarquee()
			}
		}
		 
		function intializemarquee(){
			document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>')
			document.cmarquee01.document.cmarquee02.document.close()
			thelength=document.cmarquee01.document.cmarquee02.document.width
			scrollit()
		}
		 
		function scrollit(){
			if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){
				document.cmarquee01.document.cmarquee02.left-=speed
				setTimeout("scrollit()",100)
			}else{
				document.cmarquee01.document.cmarquee02.left=marqueewidth
				scrollit()
			}
		}
		
		window.onload=regenerate2

