function show(id,oForm)
{
	el = document.getElementById(id);
	var el2 = document.Alta.categoria.value;
	if (el.style.display == 'none' && el2 == 'Aeropuerto Almeria')
	{
		el.style.display = '';
	} else {
		el.style.display = 'none';
	}
}
var nav4 = window.Event ? true : false;
function acceptNum(evt)
{     
	var key = nav4 ? evt.which : evt.keyCode;
	return (key <= 13 || (key >= 48 && key <= 57));
}
function checkemail(email)
{
	var ind1, ind2, ind3;
	ind1 = email.indexOf('@');
	ind2 = email.indexOf('.');
	ind3 = email.lastIndexOf('@');
	if ((ind1<=0) || (ind2<ind1) || (ind3 != ind1))
		  return true;
	else
		 return false;
}
function comprobar()
{
	if (document.Alta.Grupo.value=="")
	{
		alert("DEBE SELECCIONAR UNA SUBCATEGORÍA");
		document.Alta.Grupo.selectedIndex=0;
	}	
}
function compruebareserva()
{
	if (document.Alta.Grupo.value=="")
	{
		alert("DEBE SELECCIONAR UN GRUPO EN EL CAMPO VEHICULO");
		document.Alta.Grupo.selectedIndex=0;
		return false
	}
	fechareves1=document.Alta.anyo1.value+document.Alta.mes1.value+document.Alta.dia1.value;
	fechareves2=document.Alta.anyo2.value+document.Alta.mes2.value+document.Alta.dia2.value;
	if (fechareves1>fechareves2)
	{
		alert("LAS FECHAS SON ERRONEAS\nFECHA DE DEVOLUCÍON MENOR QUE LA FECHA DE RECOGIDA");
		return false
	}
	document.Alta.submit();
}
function compruebadatosreserva()
{
	if (document.Alta.email.value=="")
	{
		alert("DEBE INDICAR UN E-MAIL DE CONTACTO");
		document.Alta.email.focus();
		return false
	}
	if (document.Alta.nombre.value=="")
	{
		alert("DEBE INDICAR UN NOMBRE");
		document.Alta.nombre.focus();
		return false
	}
	if (document.Alta.apellidos.value=="")
	{
		alert("DEBE INDICAR SUS APELLIDOS");
		document.Alta.apellidos.focus();
		return false
	}
	if (document.Alta.direccion.value=="")
	{
		alert("DEBE INDICAR SU DIRECCION");
		document.Alta.direccion.focus();
		return false
	}
	if (document.Alta.pais.value=="")
	{
		alert("DEBE INDICAR SU PAIS");
		document.Alta.pais.focus();
		return false
	}
	if (document.Alta.telefono.value=="")
	{
		alert("DEBE INDICAR UN TELÉFONO DE CONTACTO");
		document.Alta.telefono.focus();
		return false
	}
	document.Alta.submit();
}
function compruebacontacte()
{
	if (document.contacte.nombre.value=="")
	{
		alert("DEBE INDICAR UN NOMBRE");
		document.contacte.nombre.focus();
		return false
	}
	if (document.contacte.email.value=="")
	{
		alert("DEBE INDICAR UNA DIRECCION DE E-MAIL");
		document.contacte.email.focus();
		return false
	}
	if (checkemail(document.contacte.email.value))
	{
		alert("DEBE INTRODUCIR UNA DIRECCION DE E-MAIL VALIDA");
		document.contacte.email.focus();
		return false;
	}
	if (document.contacte.comentarios.value=="")
	{
		alert("DEBE INDICAR EL CONTENIDO DEL MENSAJE");
		document.contacte.comentarios.focus();
		return false
	}
	document.contacte.submit();
}