Prueba a hacer esto:
Código PHP:
function validate_form ( )
{
valid = true;
if (document.myForm.Nombre.value == "" )
{
alert ( "Please fill in the 'Your Name' box." );
valid = false;
}
if (document.MyForm.Apellido.value == "" )
{
alert ( "Please fill in the 'Your Name' box." );
valid = false;
}
return valid;
}
Es decir con solo un return al final de todo...