	function doSubmit()
	{
		if ( validateForm() )
		{
			document.frmForgot.submit();
		}
	}

function checkZip(obj, sMsg){
	var sValue = obj.value;
	var sExp = /^[0-9]{5}$/

	if(!sExp.test(sValue)){
		alert(sMsg+" contains invalid characters\nor is in the format of #####.");
		return false;
	}
	return true;
}

function basicEmailCheck(sVal) {
		var oReg = strRegEx_Email; 
  
    if ( !oReg.test(sVal)) {
			alert( "Please enter a valid email address\n(e.g. username@domain.com)." );
			return false;
    }    
	return true;	
}

	function validateForm()
	{
		//Evaluate email
		if (document.frmForgot.email.value.length > 0)
		{
			if (! basicEmailCheck(document.frmForgot.email.value))
			{
				document.frmForgot.email.focus();
				return false;
			}
		}
		else
		{
			alert("Email is a required field");
			return false;
		}
		
		//Evaluate zip
		if (document.frmForgot.zip.value.length > 0)
		{
			if (! checkZip(document.frmForgot.zip,"Zip Code"))
			{
				document.frmForgot.zip.focus();
				return false;
			}
		}
		else
		{
			alert("Zip is a required field");		
			document.frmForgot.zip.focus();
			return false;			
		}
			
		return true;			
	}
	
function init()
{	
	checkShowInvalid();			
}	

function checkShowInvalid()
{
	var invalid = string_GetURLValue("invalid");	
	if (invalid == "true")
	{
		document.getElementById("showInvalid").style.display = "inline";
	}	 
}