<!--
// JavaScript Document
	function loginSubmit(frm)
	{
		if(loginValidate(frm))
		{
			frm.submit();	
		}
	}

	// This function requires the functions in validation.js
	function loginValidate(frm) 
	{  
		var msg = "";
		var focusSet =  false;
		
		function chkRqdText(field, element)
		{
			if(trim(element.value) == "")
			{
				if(focusSet != true)
				{
					msg += "\n - The following required fields are empty:\n";
					element.focus();
					focusSet = true;
				}
				msg += "              " + field + "\n";
			}	
		}
		// Start the error message
		msg =  " The form was not submitted due to the following error(s).\n";
		msg += " Please correct these errors and resubmit.\n";

		// Process the required fields
		chkRqdText("Username", frm.username);
		chkRqdText("Password", frm.password);
		// Check the fields that require validation
		msg += "\n - The following fields are invalid:\n";

		// If errors were found alert the user and exit	
		if(focusSet){alert(msg);return false;}
		
		// No errors found
		// Allow the form to be submitted.
		// Trimming of whitespace will be done server side.
		return true;
	}
-->
