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();
}

function validaConsulta() {
	if ($('consulta').value=='') {
		alert('Debe introducir una consulta');
		$('consulta').focus();
		return false;
	}
	return true;
}

function validaReclamacion() {
	if ($('nombre').value=='') {
		alert('Debe introducir su nombre');
		$('nombre').focus();
		return false;
	}
	if ($('direccion').value=='') {
		alert('Debe introducir su dirección');
		$('direccion').focus();
		return false;
	}
	if ($('poblacion').value=='') {
		alert('Debe introducir su población y código postal');
		$('poblacion').focus();
		return false;
	}
	if ($('telefono').value=='') {
		alert('Debe introducir su telefono de contacto');
		$('telefono').focus();
		return false;
	}
	if ($('email').value=='') {
		alert('Debe introducir su dirección de email');
		$('email').focus();
		return false;
	}
	if ($('motivo').value=='') {
		alert('Debe introducir el motivo de la reclamación');
		$('motivo').focus();
		return false;
	}
	if ($('nombre_atiende').value=='') {
		alert('Debe introducir el nombre de quien le atendió');
		$('nombre_atiende').focus();
		return false;
	}
	if ($('nombre_centro').value=='') {
		alert('Debe introducir el centro donde le atendieron');
		$('nombre_centro').focus();
		return false;
	}
	if ($('direccion_atiende').value=='') {
		alert('Debe introducir la dirección donde le atendieron');
		$('direccion_atiende').focus();
		return false;
	}
	if ($('poblacion_atiende').value=='') {
		alert('Debe introducir la población donde le atendieron');
		$('poblacion_atiende').focus();
		return false;
	}
	if ($('proteccion_datos').value=='') {
		alert('Debe leer y aceptar la política de protección de datos');
		$('proteccion_datos').focus();
		return false;
	}
	return true;
}

function validaBolsa() {
	if ($('empresa').value=='') {
		alert('Debe introducir el nombre de su empresa');
		$('nombre').focus();
		return false;
	}
	if ($('lugar').value=='') {
		alert('Debe introducir el lugar de trabajo');
		$('telefono').focus();
		return false;
	}
	if ($('funciones').value=='') {
		alert('Debe introducir las funciones y puesto de trabajo');
		$('funciones').focus();
		return false;
	}
	if ($('nombre_contacto').value=='') {
		alert('Debe introducir el nombre de la persona de contacto');
		$('nombre_contacto').focus();
		return false;
	}
	if ($('telefono').value=='') {
		alert('Debe introducir el telefono y horario de contacto');
		$('telefono').focus();
		return false;
	}
	if ($('email').value=='') {
		alert('Debe introducir la dirección de correo electronico del contacto');
		$('telefono').focus();
		return false;
	}
	if ($('correo').value=='') {
		alert('Debe introducir la dirección de correo del contacto');
		$('correo').focus();
		return false;
	}
	return true;
}



/*===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);
	}
}
