/*************************************************************************
* Filename: submitPassword.js 						 *
* Description: Retrieves the plain password and seed from the login form *
*              and hashes the password form submission.			 *
* Author: Stephan Dale, Clicks and Links ltd.				 *
* Date: 01/07/2004							 *
* Modified: 04/02/2005							 *
*************************************************************************/

// Submit the password.
function submitPassword()
	{
	document.login_form.password.value = hex_md5(document.login_form.password.value+document.login_form.login_seed.value);
	document.login_form.login_seed.value = 0;
	document.login_form.submit();
	}
 
// Call the submitPassword function when the enter key is pressed.
function entsub(event, theform) 
	{
	var characterCode;

	if (event && event.which)
		{ //if which property of event object is supported (NN4)
		characterCode = event.which; //character code is contained in NN4's which property
		}
	else
		{
		characterCode = event.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)
		submitPassword();
		return false; 
		}
	else
		{
		return true 
		}
	/*
	if (event && event.which == 13)
		{
		//theform.submit();	
		submitPassword();
		}
	else return true;
	*/
	}		  
