function ValidarDatossocios (Form)
{TodoOk = true;
	if ((Form.email.value==""))
		{alert ("Debe introducir su e-mail")
		TodoOk=false}
	if ((Form.nombre.value==""))
		{alert ("Debe introducir su nombre")
		TodoOk=false}
	if ((Form.apellido1.value==""))
		{alert ("Debe introducir sus apellidos")
		TodoOk=false}
	if ((Form.dni.value==""))
		{alert ("Debe introducir su D.N.I.")
		TodoOk=false}
	if ((Form.direccion.value==""))
		{alert ("Debe introducir su Dirección postal")
		TodoOk=false}
	if ((Form.localidad.value==""))
		{alert ("Debe introducir su LOCALIDAD")
		TodoOk=false}
	if ((Form.provincia.value==""))
		{alert ("Debe introducir su PROVINCIA")
		TodoOk=false}
	if ((Form.cp.value==""))
		{alert ("Debe introducir su CODIGO POSTAL")
		TodoOk=false}
	if ((Form.genero.value!="H") && (Form.genero.value!="M"))
		{alert ("Debe introducir el sexo H o M")
		TodoOk=false}
	if ((Form.telefono.value=="") && (Form.movil.value==""))
		{alert ("Debe introducir un teléfono de contacto")
		TodoOk=false}
	if ((Form.forpago.value==""))
		{alert ("Debe seleccionar la FORMA DE PAGO")
		TodoOk=false}
	if ((Form.forpago.value=="domiciliacion") && (Form.cuenta.value.length<20))
		{alert ("En el caso de DOMICILIACIÓN. Debe especificar los 20 dígitos del número de cuenta")
		TodoOk=false}
	if ((Form.opcion.value=="socioadicae") && (Form.caso.value==""))
		{alert ("Debe seleccionar el CASO COLECTIVO o marcar OTROS")
		TodoOk=false}
	if ((Form.opcion.value=="socioadicae") && (Form.nombreentidad.value==""))
		{alert ("Debe seleccionar el NOMBRE ENTIDAD por la que usted es afectado")
		TodoOk=false}
	if ((Form.opcion.value=="socioadicae") && (Form.caso.value=="OTROS") && (Form.otros.value==""))
		{alert ("Debe especificar el nombre del caso para OTROS")
		TodoOk=false}
	if (TodoOk==true &&  !(FormatoEmail(Form.email.value)))
		{alert ("El formato del e-mail no es el correcto")
		TodoOk=false}

if (TodoOk==true) return true;
	else return false;}

function FormatoEmail (Texto)
	{var Simbol1 = 0
	 var Simbol2 = 0
	 for (i=0;i<Texto.length;i++)
		{if (Texto.substring(i,i+1)=="@") Simbol1++
		 if (Texto.substring(i,i+1)==".") Simbol2++}
	if ((Simbol1==1) && (Simbol2>0)) return(true)
	else return(false)}

function doClear(theText)
{if (theText.value == theText.defaultValue) theText.value = ""}

function Borrar()
	{document.Formulario.reset()}



	


