function validar(campo,textoerror)
	{
	with(campo)
		{
			if(value == null || value == "")
			{
				alert(textoerror);
				return false;
			}
			else
			{
				return true;
			}
			
		}
	}  
function validar_formulario(mi_formulario)
{
	with(mi_formulario)
	{
		if(validar(nombre, "Ingrese su nombre") == false)
		{
			nombre.focus();
			return false;	
		}	
		if(validar(empresa, "Ingrese su empresa") == false)
		{
			empresa.focus();
			return false;
		}	
		if(validar(ciudad, "Ingrese su ciudad") == false)
		{
			ciudad.focus();
			return false;
		}
		if(validar(email, "Ingrese su correo electronico") == false)
		{
			email.focus();
			return false;
		}
		if(tipocomentario.value == "consulta")
		{
			if(validar(informacion, "Ingrese la informacion") == false)
			{
			informacion.focus();
			return false;
			}	
		}
		if(validar(mensaje, "Ingrese el mensaje") == false)
		{
			mensaje.focus();
			return false;
		}		
	}
}


function validar_formulario3(mi_formulario)
{
	with(mi_formulario)
	{
		if(validar(nombre, "Ingrese su nombre") == false)
		{
			nombre.focus();
			return false;	
		}	
		if(validar(direccion, "Ingrese su direccion") == false)
		{
			direccion.focus();
			return false;
		}	
		if(validar(ciudad, "Ingrese su ciudad") == false)
		{
			ciudad.focus();
			return false;
		}
		if(validar(telefono, "Ingrese su telefono") == false)
		{
			telefono.focus();
			return false;
		}	
		if(validar(email, "Ingrese su correo electronico") == false)
		{
			email.focus();
			return false;
		}
		if(validar(mensaje, "Ingrese el mensaje") == false)
		{
			mensaje.focus();
			return false;
		}		
	}
}

function verifica(palabra)
{
if(palabra.value == "")
palabra.value = "Busqueda";
}

