function VerifyLogin(frmRegister, updCommand) {
	if (updCommand == "Log In") {
		if (frmRegister.Login_txtUsername.value == "") {
			alert ("Please enter Username.")
			frmRegister.Login_txtUsername.focus()
			frmRegister.Login_txtUsername.select()
		    return false
		}
		if (frmRegister.Login_txtPassword.value == "") {
			alert ("Please enter Password.")
			frmRegister.Login_txtPassword.focus()
			frmRegister.Login_txtPassword.select()
		    return false
	    }
	}
	//if (updCommand == "Clear") {
	//	frmRegister.Login_txtUsername.value = ""
	//	frmRegister.Login_txtPassword.value = ""
	//  frmRegister.Login_txtUsername.focus();
	//	return false
    //}
	if (updCommand == "Send it") {
		if (frmRegister.Login_txtUsrname.value == "") {
			alert ("Please enter Full Name.")
			frmRegister.Login_txtUsrname.focus()
			frmRegister.Login_txtUsrname.select()
		    return false
		}
		if (frmRegister.Login_txtEmail.value == "") {
			alert ("Please enter Email.")
			frmRegister.Login_txtEmail.focus()
			frmRegister.Login_txtEmail.select()
		    return false
	    }
        alert("An email with your login details will be sent to you shortly,\nprovided we found a match in the system. Thank you.");
    }
	if (updCommand == "Cleer") {
		frmRegister.Login_txtUsrname.value = ""
		frmRegister.Login_txtEmail.value = ""
	    frmRegister.Login_txtUsrname.focus();
		return false
    }
	if (updCommand == "Submit") {
		if (frmRegister.Login_txtNewPassword.value == "" || frmRegister.Login_txtConfirm.value == "") {
			alert ("Please enter New Password and confirm it by retyping.")
		    frmRegister.Login_txtNewPassword.value = ""
		    frmRegister.Login_txtConfirm.value = ""
			frmRegister.Login_txtNewPassword.focus()
			frmRegister.Login_txtNewPassword.select()
		    return false
		}
		if (frmRegister.Login_txtNewPassword.value != frmRegister.Login_txtConfirm.value) {
			alert ("New Password does not match Confirmation Password.")
		    frmRegister.Login_txtNewPassword.value = ""
		    frmRegister.Login_txtConfirm.value = ""
			frmRegister.Login_txtNewPassword.focus()
			frmRegister.Login_txtNewPassword.select()
		    return false
		}
    }
}

function checkEnter(e, btnName) {            //e is event object passed from function invocation
    var characterCode;              //literal character code will be stored in this variable
    if (e && e.which) {             //if which property of event object is supported (NN4)
        e = e
        characterCode = e.which     //character code is contained in NN4's which property
    } else {
        e = event
        characterCode = e.keyCode   //character code is contained in IE's keyCode property
    }
    if (characterCode == 13) {      //if generated character code is equal to ascii 13 (if enter key)
        //document.forms[0].submit()  //submit the form
        //return false
        btnName.focus();
    } else {
        return true 
    }
}

function LoadWindow(popupbox) {
    //popupbox = '../includes/calendar.aspx?FormName=' + document.forms[0].name + '&CtrlName=' + CtrlName;
    var feature = 'width=483,height=500,top=50,left=50,toolbar=no,menubar=no,scrollbars=yes,location=no,status=no,resizable=no';
	var load = window.open(popupbox,'',feature);
}

//_uacct = "UA-120138-6";
//urchinTracker();
