//FUNCION QUE VALIDA EL FORMULARIO contacto
function validar_contacto()
{

	with (document.contacto)
	{
		//DATOS CONTACTO
		nombre=Nombre.value;
		lugar = Lugar.value;
		direc=Direccion.value;
		pais = Pais.value;
		tel = Telefono.value;
		fax = Fax.value;
		web = Web.value;
		email = Email.value;
		cemail = Email2.value;
		coment = Comentarios.value;
		seccion = Seccion.value;


		if(nombre.length<5 || nombre=="") //responsable
		{
			window.alert("Por Favor,\nEscriba correctamente su nombre completo");
			Nombre.select();
			return false;
		}

		if(lugar.length<3 || direc=="") //direccion
		{
			window.alert("Por Favor,\nEscriba correctamente su Lugar de Residencia");
			Lugar.select();
			return false;
		}

		if(direc.length<3 || direc=="") //direccion
		{
			window.alert("Por Favor,\nEscriba correctamente su Dirección de la Empresa");
			Direccion.select();
			return false;
		}

		if(tel.length<7 || tel=="") //telefono
		{
			window.alert("Por Favor,\nEscriba correctamente el teléfono de la Empresa");
			Telefono.select();
			return false;
		}

		if (!esEmail(email)) { //Email
			window.alert("Por Favor,\n Escriba un email Válido");
			Email.select()
			return false;
		}

		if (cemail != email) { //Confirmación del Email
			window.alert("La confirmación del Email no coincide,\n Por Favor verifícalo");
			Email2.select();
			return false;
		}
		
	} //fin del with


Datos = 'verificar_datos.php?Nombre='+nombre+'&Lugar='+lugar+'&Direccion='+direc;
Datos +='&Telefono='+tel+'&Fax='+fax+'&Web='+web+'&Email='+email+'&Comentarios='+coment;
Datos +='&Pais='+pais+'&Seccion='+seccion;
//window.open(Datos,'','width=400, height=350, menubar=no, status=no, toolbar=no, //scrollbars=yes,left=0, top=0,screenX=0,screenY=0');
ventana(Datos,400,350);
} //fin funcion validar_contacto



