
/*---------------------------------------------------------------------------
	Copyright 2004-2006 Thomson Course Technology, a division of
	Thomson Learning, Inc. All rights reserved. 
---------------------------------------------------------------------------*/

/***********************************************************************
handle_login_data.js

These functions manage user activity on the Login page.

***********************************************************************/

/*************************************************************
Executes when a user hits Enter or clicks the Login button 
without entering a username and password. Displays a dialog
which will redirect processing to the New User FUSEBOX if the
user responds Yes.
**************************************************************/

function valNewUser() {
	if (trim(document.all("uname").value) != "" &&
		trim(document.all("pword").value) != "") {
		retVal = confirm("You have entered a username and password.\n\nTo log in, select Cancel, then Login.\n\nOtherwise, select OK to create a new account."); 		
		if (retVal == 1) 
			startNewUser();
		else
			return false;
	}
	else
		startNewUser();
}

/*************************************************************
Executes when the "New User" button is clicked on the Login
page. Redirects processing to the New User FUSEBOX page.
**************************************************************/

function startNewUser() {
	document.location = "new_user.sam";
}

function requestPassword() {

	openDialog('request_password.sam', 420, 220, null);
	
}