Another way is to put a
everytime the conditions are not met like...
function validate_form ( )
valid = true;
if ( enquire.txtname.value == "" )
alert ( "Please fill in the ' Name' box." );
valid = false;}
And put this attribute in your form tags