function in_cojefoco(o) {
	if (o.className=='') {
		o.value=''
	}
	o.className='input_foco';
}

function in_quitafoco(o,text) {
	if (o.value=='' || o.value==text)
	{
		o.value=text;
		o.className='';
	}
}

function validaPrivada() {
	if ($('email').value=='') {
		alert('Introduzca su email');
		$('email').focus();
		return false;
	}
	if ($('pass').value=='') {
		alert('Introduzca su contraseņa');
		$('pass').focus();
		return false;
	}
	return true;
}
function recuperarPass() {
	if ($('email').value=='') {
		alert('Introduzca su email');
		$('email').focus();
		return false;
	}
	$('accion').value='recordar';
	$('privada').submit();
}

/*===Scroll de imagenes===*/
var numElem=0;
var timerID=0;

function it(nE) {
	numElem=nE;
	x=document.getElementById("scroll_dentro");
	x.style.width=((154*numElem)+2) + "px";
}
function st() {
	/*Parar el movimiento*/
	clearTimeout(timerID);
}
function dr() {
	/*Mover a la derecha*/
	clearTimeout(timerID);
	timerID=setTimeout("dcha()", 50);
}
function di() {
	/*Mover a la izquierda*/
	clearTimeout(timerID);
	timerID=setTimeout("izda()", 50);
}
function dcha() {
	x=document.getElementById("scroll_dentro");
	if ( (154*numElem+parseInt(x.style.left)) >= 614 ) {
		x.style.left=(parseInt(x.style.left)-10) + "px";
		timerID=setTimeout("dcha()", 50);
	}
}
function izda() {
	x=document.getElementById("scroll_dentro");
	if ( parseInt(x.style.left) <= 0 ) {
		x.style.left=(parseInt(x.style.left)+10) + "px";
		timerID=setTimeout("izda()", 50);
	}
}

function validaContactoWeb() {
	x=document.getElementById('nombre');
	if (x.value=='') {
		alert('Introduzca su nombre, por favor');
		x.focus();
		return false;
	}
	x=document.getElementById('email');
	if (x.value=='') {
		alert('Introduzca su email para poder contactar con usted, por favor');
		x.focus();
		return false;
	}
	x=document.getElementById('consulta');
	if (x.value=='') {
		alert('Introduzca su consulta, por favor');
		x.focus();
		return false;
	}
	return true;
}

function select_alojamiento(x) {
	if (x==0)	{ //No se ha seleccionado alojamiento
		document.getElementById('zona').disabled=false;
		document.getElementById('precio').disabled=false;
		document.getElementById('habitacion').disabled=false;
	} else {
		document.getElementById('zona').disabled=true;
		document.getElementById('precio').disabled=true;
		document.getElementById('habitacion').disabled=true;
	}
	document.getElementById('hotel').selectedIndex=x;
}
