
<!--
function Form1_Validator(theForm)
{
	
// check to see if the field is blank
if (theForm.nom.value == "")
{
theForm.nom.style.backgroundColor="#ffffcc";
alert("Es requereix el \"Nom\" o \"Empresa\".");
theForm.nom.focus();
return (false);
} else {
theForm.nom.style.backgroundColor="white";
}

// require at least 2 characters be entered
if (theForm.nom.value.length < 2)
{
theForm.nom.style.backgroundColor="#ffffcc";
alert("Mínim 2 carŕcters en el \"Nom\"o \"Empresa\".");
theForm.nom.focus();
return (false);
} else {
theForm.nom.style.backgroundColor="white";
}


// check to see if the field is blank
if (theForm.consulta.value == "") 
{
theForm.consulta.style.backgroundColor="#ffffcc";
alert("Es requereix \"Comentaris\".");
theForm.consulta.focus();
return (false);
} else {
theForm.consulta.style.backgroundColor="#ffffff";
}

// require at least 3 characters be entered
if (theForm.consulta.value.length < 3)
{
theForm.consulta.style.backgroundColor="#ffffcc";
alert("Mínim 3 carŕcters en \"Comentaris\".");
theForm.consulta.focus();
return (false);
} else {
theForm.consulta.style.backgroundColor="white";
}

return (true);
}
//-->

   