//Essa função deve ser usada junto ao arquivo solicita.js
//ela usa a função existeItem()

function validaForm()
{
	var texto = "Preencha o seguintes itens:";
	var Bnome = false;
	var Bfrom = false;
	if( document.formulario.nome.value.length < 3 )
	{
		texto+="\n- Nome";
		Bnome = true;
	}
	if( document.formulario.from.value.indexOf('@')==-1 || document.formulario.from.value.length < 4 || document.formulario.from.value.indexOf('.')==-1 )
	{
		texto+="\n- E-mail";
		Bfrom = true;
	}

	if(Bnome||Bfrom)
	{
		window.alert(texto);
		if(Bnome)
			document.formulario.nome.focus();
		else if(Bfrom)
			document.formulario.from.focus();
		return false;
	}
	else
	{
		return true;
	}
}
