Help with javascript validation =)

My validation is working. But when there’s empty fields like example the subject field is empty, it will prompt out the error that the field is empty but after that, it will still proceed to the next page which is my sendmail.php… Can someone help me with this?? Thanks alot! =)

<html>
<head>
<link rel=“stylesheet” type=“text/css” href=“design.css” />
<script type=“text/javascript”>
function validate_form ( )
{
//create initial message for the alert
var alertmsg = “Errors!
“;
//subject
if(document.form.subject.value==””)
{
alertmsg = alertmsg + " - Please fill in the ‘subject’ Box
“;
}
{
document.form.name.disabled=false;
}
//message
if(document.form.message.value==”")
{
alertmsg = alertmsg +" - Please fill in the ’ Message’ Box
";
}
{
document.form.name.disabled=false;
}
if(alertmsg == "Errors!
")
{
document.form.submit();
}
else
{
alert(alertmsg );
return false;
}
function enableField()
{
document.form.name.disabled=false;

}
}
</script>
</head>
<body>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” />
<title>Feedback And Enquires</title>
<center>
<body>
<table width=“928” border=“1”>
<tr>
<th scope=“col”><a href="home.html">Home</a></th>
<th scope=“col”><a href=“viewcourse.html”>View Courses </a></th>
<th scope=“col”><a href=“feedbacknenquires.php”> Feedback/Enquires</a></th>
<th scope=“col”><a href=“viewprofile.php”>View Profile</a></th>
<th scope=“col”><a href=“logout.php”>Logout</a></th>
</tr>
</table>
<td>
<p class=“style2”>Feedback/enquires</p>
<form name=“form” method=“post” action=“sendemail.php” onsubmit=“validate_form()”>
To: [email protected]

<p>Subject:
<label>
<input name=“subject” type=“text” id=“subject” />
</label>

&lt;p&gt;Message: &lt;/p&gt;

<p>
<label>
<textarea name=“message” cols=“30” rows=“9” id=“message”></textarea>
</label>
</p>
<p>FROM:
<label>
<input name=“email” type=“text” id=“email” value=“email” />
</label>
</p>
<p> </p>
<p>
<input type=“submit” value=“Submit” name=“submit”/>
</form>
</td>
<p class=“style2”></p>
</body>
</html>