//------------------------------------------------------------------------------
// Class:  SignIn
//------------------------------------------------------------------------------
// Author:  CL
// Date:  2008/01/23
// Description:  This class defines the functions used by the sign-in area.
//------------------------------------------------------------------------------
function SignIn()
{
	// Properties:
	this.isSignedIn = false;

	//--------------------------------------------------------------------------

	// Methods:
	this.goSignOut = goSignOut;
	this.goSignIn = goSignIn;
	this.goForgotPasswordStep1 = goForgotPasswordStep1;
	this.goForgotPasswordStep2 = goForgotPasswordStep2;
	this.goForgotPassword = goForgotPassword;
	this.goActivateAccount = goActivateAccount;
	this.submitEnterSignin = submitEnterSignin;

	//--------------------------------------------------------------------------

	function goSignOut()
	{
		var oCookieManager = new CookieManager();
		document.frmSignOut.action = location.href.replace(/^https:/, "http:");
		document.frmSignOut.submit();			
	}

	//--------------------------------------------------------------------------
	
	function goSignIn()
	{
		document.frmSignin.submit();
	}
	
	//--------------------------------------------------------------------------

	function goForgotPasswordStep1()
	{
		document.frmForgotPasswordStep1.submit();
	}
	
	//--------------------------------------------------------------------------

	function goForgotPasswordStep2()
	{
		document.frmForgotPasswordStep2.submit();
	}

	//--------------------------------------------------------------------------

	function goForgotPassword()
	{
		document.frmForgotPassword.emailAddress.value = document.frmSignIn.loginEmailAddress.value;
		document.frmForgotPassword.submit();
	}
	
	//--------------------------------------------------------------------------

	function goActivateAccount()
	{
		document.frmActivateAccount.submit();
	}
	
	//--------------------------------------------------------------------------

	function submitEnterSignin(event)
	{
		/*
		if(event==null)
		{
			event = window.event;
		}
		var keycode = "";
		if(event.keycode == "13")
		{
			document.frmSignin.submit();
		}
		else
		{
			return;
		}
		*/
	}
	
	
}

// Create sign-in object.
oSignIn = new SignIn();