function validaconsulta() 

{
   
if (document.proceso.contacto.value == "" || document.proceso.contacto.value == null)
      {		fError(document.proceso.contacto,"Por favor, rellene el campo PERSONA DE CONTACTO") 
			return
      } 

if (document.proceso.direccion.value == "" || document.proceso.direccion.value == null)
       {	fError(document.proceso.direccion,"Por favor, rellene el campo DIRECCIÓN") 
			return
       }

if (document.proceso.poblacion.value == "" || document.proceso.poblacion.value == null)
       {	fError(document.proceso.poblacion,"Por favor, rellene el campo POBLACIÓN") 
			return
       }

if (document.proceso.provincia.selectedIndex == 0 )
        {	fError(document.proceso.provincia,"Por favor, seleccione una PROVINCIA") 
			return
        }

if (document.proceso.cp.value != null || document.proceso.cp.value != "") 
		{ var a = document.proceso.cp.value.toString()
						for (var i=0;i < a.length; i++)
							{ var caracter = a.charAt(i)
							  if (caracter < "0" || caracter > "9")
							  { document.proceso.cp.focus()
							  document.proceso.cp.select()
							  window.alert ("El campo CÓDIGO POSTAL solo puede contener números")
							  return
							  							  }
							}
}

if (document.proceso.telefono.value == null || document.proceso.telefono.value == "" )
        {	fError(document.proceso.telefono,"Por favor, indique un TELEFONO de contacto") 
			return
        }

if (document.proceso.telefono.value != null || document.proceso.telefono.value != "") 
		{ var a = document.proceso.telefono.value.toString()
						for (var i=0;i < a.length; i++)
							{ var caracter = a.charAt(i)
							  if (caracter < "0" || caracter > "9")
								{	document.proceso.telefono.focus()
									document.proceso.telefono.select()
									window.alert ("El campo TELÉFONO solo puede contener números")
									return 
							  	}
							}
		}

if (document.proceso.fax.value != null || document.proceso.fax.value != "") 
		{ var a = document.proceso.fax.value.toString()
						for (var i=0;i < a.length; i++)
							{ var caracter = a.charAt(i)
							  if (caracter < "0" || caracter > "9")
								{ 
									document.proceso.fax.focus()
									document.proceso.fax.select()
									window.alert ("El campo FAX solo puede contener números")
									return 
							  	}
							}
		}
		
if (document.proceso.email.value == null || document.proceso.email.value == "") 
		{	document.proceso.email.focus()
			window.alert ("Debe rellenar obligatoriamente el campo E-MAIL")
			return		
		}
		else		
		{ 	if (document.proceso.email.value.indexOf ("@",0) == -1) 
				{ document.proceso.email.focus()
					window.alert ("Debe rellenar correctamente el campo E-MAIL")
					return				
				}
		}
		   
document.proceso.submit()

}

function fError(elem, text) 
{
   window.alert(text)
   elem.select()
   elem.focus()
}


