I have a form in html that I need to validate using Javascript regular expressions.

I was validating the fields one by one and it was working fine till I tried to validate email field. Even If I remove email validation field still the form validates Name correctly, atleast.

Here is my code:

	<script type="text/javascript">
	function validate()
		if(document.getElementById('name').value== "")
				alert("Please Fill the Name");
				return false;
				alert("Phone No. is not valid");
				return false;
				alert("Email Id is not Valid");
				return false;
		return true;
<form name="myform" id="myform" method="get">
<table border ="1" align="center" cellpadding="0" cellspacing="0">
	<tr><td>Name</td><td><input type="text" id="name" name="name" maxlength="10"></td></tr>
	<tr><td>Phone</td><td><input type="text" id="phone" name="phone"></td></tr>
	<tr><td>Email</td><td><input type="text" id="email" name="email"></td></tr>
	<tr><td>Gender</td><td><input type="radio" name="male" id="male">Male</input><input type="radio" name="male" id="male">Female</input></td></tr>
	<tr><td>3 Boxes</td><td><input type="checkbox" name="box1" id="box1">Box 1</input><input type="checkbox" name="box2" id="box2">Box 2</input><input type="checkbox" name="box3" id="box3">Box 3</input></td></tr>
	<tr><td></td><td><input type="button" value = "Submit Form" onclick="return validate();"></td></tr>

At first the phone no. field was working correctly now it too doesn't work correctly. I am not sure what did I do wrong. can someone point me to right direction as where I am doing wrong.

Is it incorrect to match using a ! operator , if so what would be the correct way to validate this form using Regular expressions.

Thanks for the help..