<!--
function Form1_Validator(theForm)
{


// require at least 5 characters in the password field
if (theForm.Password.value.length < 5)
{
alert("Please enter at least 5 characters in the \"Password\" field.");
theForm.Password.focus();
return (false);
}

// check if both password fields are the same
if (theForm.Password.value != theForm.Password2.value)
{
	if (theForm.Password2.value.length < 1)
	{ 
		alert("Please confirm your password.");
		theForm.Password2.focus();
        return (false);
	} else {
	    alert("The two passwords are not the same.");
        theForm.Password2.focus();
        return (false);
	}
}

// because this is a sample page, don't allow to exit to the post action
// comes in handy when you are testing the form validations and don't
// wish to exit the page
return (true);
// replace the above with return(true); if you have a valid form to submit to
}
//-->