<!-- // start hiding code
/*
// Copyright 1999 MTI All Rights Reserved.
// File Name:		MTI.js
// Purpose:	This is a file of javascript code for the MTI common area.  
// Modification History
// 02/29/2000 MEB Created By	Mike Benist
// 
*/

// This function makes sure that the user has completed the 
// login form correctly.
function LoginReady(form){
	lIsDirty=false;
	var i=0;
	if (FieldExists("document.form1.txtLoginID")) {
		if (document.form1.txtLoginID.value!="") {
			document.form1.txtLoginID.value = sqlSafe(document.form1.txtLoginID.value);
		} else {
			alert("Login ID is required");
			lIsDirty=true;
		}
	}
	if (FieldExists("document.form1.txtPassword")) {
		if (document.form1.txtPassword.value!="") {
			document.form1.txtPassword.value = sqlSafe(document.form1.txtPassword.value);
		} else {
			alert("A password is required");
			lIsDirty=true;
		}
	}
	if (lIsDirty==true) {
		return false;
	}
	return true;
}

// This function makes sure that the user has given us an email.
function PasswordReady(form){
	lIsDirty=false;
	var i=0;
	if (FieldExists("document.form1.txtEmail")) {
		if (document.form1.txtEmail.value!="") {
			if (isEmail(document.form1.txtEmail.value)) {
				document.form1.txtEmail.value = sqlSafe(document.form1.txtEmail.value);
			} else {
				alert("This e-mail address is not valid. Please try again.");
				lIsDirty=true;
			}
		} else {
			alert("Your e-mail address is required");
			lIsDirty=true;
		}
	}
	if (lIsDirty==true) {
		return false;
	}
	return true;
}

// stop hiding code
//-->
