first off i'm a student i was in a web development class and I have a question about using scripts in a form.

it took me a while to get but i finally got the validation to work so it will allow for a dialog bow if something is not entered but i want to get it another to pop up if everything is entered and is able to send. i'm not looking for a real validation to check check to see if the email is valid or anything like. i'm just trying to figure out how exactly this stuff works because i'm having a hard time grasping the syntax for some of this. here is the code that is need help with.

<script>
function validate()
{
var vText1=trim(document.frm.sText1.value);
var vText2=trim(document.frm.sText2.value);
var vText3=trim(document.frm.sText3.value);

if(vText1=="")
{
alert("Please specify email address");
document.frm.sText1.focus();
return false;
}
else if(vText2, vText3=="")
{
alert("First and last name are required.");
document.frm.sText2.focus();
return false;
}
}

function trim(s) {
return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
}

</script>
</head>
<body>
<center><form name="frm" method="post" action="mailto: myemail@email.com" onsubmit="return validate ()">
Email:<input name="sText1" type="text" size="26"/>
<br/>
First:<input name="sText2" type="text" Size="27" maxlength="15" />
<br />
Last:<input name="sText3" type="text" size="28" maxlength="20" />
<br />
<textarea name="email" cols="45" rows="5" maxlength="500">Please keep all emails 500 words or less</textarea><br />
<input name="Submit" type="submit" value="Send Email" /></form></center><br />
</BODY>
</HTML>

what is killing me on this is trying to figure out what is needed to get the alert for the final if else i've tried several different things but all end up causing the code to fail. so i'm not sure what i need to do to make it pop up and that the email was sent based solely on the fact that text has been entered in all 3 boxes.