<!--
// A collection of routines for RealColour
//document.onkeypress = checkEnterKey;

// Routine to block the Enter key
function checkEnterKey(TheEvent)
	{
    var TheEvent = (TheEvent) ? TheEvent : ((event) ? event : null);
    var TheNode = (TheEvent.target) ? TheEvent.target : ((TheEvent.srcElement) ? TheEvent.srcElement : null);
	if ((TheEvent.keyCode == 13) && (TheNode.type == "text"))
{
alert("Got Enter");
		return(false);
}
	}

// Routine to execute the form
function onLogin()
	{
	var FormValidation;
	FormValidation = {
			FormFieldUserName: { verify: Valid_Email, required: true, min: 1, max:60, fieldname: "e-mail" },
			FormFieldPassword: { verify: Valid_Required, required: true, min: 1, max:10, fieldname: "password" }
			};
	if (Validate_Form(document.FormLogin, FormValidation))
		{
		document.FormLogin.FormAction.value = "Login";
		document.FormLogin.submit();
		}
	}

// Routine to execute the form
function onEditAccount()
	{
	document.FormLogin.action = "/AccountCentre/default.aspx";
	document.FormLogin.FormAction.value = "Edit";
	document.FormLogin.submit();
	}

// Routine to execute the form
function onForgotPassword()
	{
	var FormValidation;
	FormValidation = {
			FormFieldUserName: { verify: Valid_Email, required: true, min: 1, max:60, fieldname: "e-mail" }
			};
	if (Validate_Form(document.FormLogin, FormValidation))
		{
		document.FormLogin.action = "/AccountCentre/ForgotPassword.aspx";
		document.FormLogin.FormAction.value = "ForgotPassword";
		document.FormLogin.submit();
		}
	}

// Routine to print the window
function onPrintPage()
	{
	window.print();
	}

// Routine to email the page to a friend
var WindowEmailPage;
function onEmailPage(TheKeyField)
	{
	var ThePopupLocation = "" + document.location;
	var TheWindowParams = "toolbar=no,location=no,menubar=no,scrollbars=yes,status=no,statusbar=no,resizable=yes,title=no,titlebar=no,width=550,height=350";
	if (TheKeyField && (ThePopupLocation.indexOf("?") == -1))
		ThePopupLocation += "\%" + TheKeyField.name + "=" + TheKeyField.value;
	ThePopupLocation = "/Global/EmailPage/EmailPage.aspx?Location=" + ThePopupLocation;
	if (WindowEmailPage && !WindowEmailPage.closed)
		WindowEmailPage.location = ThePopupLocation;
	else
		WindowEmailPage = window.open(ThePopupLocation,"WindowEmailPage",TheWindowParams);
//alert("WindowEmailPage.document.all.TheTitle=" + WindowEmailPage.document.all.TheTitle);
//alert("WindowEmailPage.document.all.TheTitle.innerHTML =" + WindowEmailPage.document.all.TheTitle.innerHTML);
//		WindowEmailPage.document.all.TheTitle.innerHTML = "Error";
//		WindowEmailPage.document.all.TheContent.innerHTML = TheErrorMessage;
	WindowEmailPage.focus();
	}

// Routine to email the page to a friend
var WindowPolicies;
function onOpenPolicies()
	{
	var ThePopupLocation = "/Policies/default.htm";
	var TheWindowParams = "toolbar=no,location=no,menubar=no,scrollbars=yes,status=no,statusbar=no,resizable=no,title=no,titlebar=no,width=540,height=550";
	if (WindowPolicies && !WindowPolicies.closed)
		WindowPolicies.location = ThePopupLocation;
	else
		WindowPolicies = window.open(ThePopupLocation,"WindowPolicies",TheWindowParams);
	WindowPolicies.focus();
	}

// Routine to swap image in on mouse rollover
function onMouseOver(TheItemId)
	{
	document[TheItemId].imgRolln = document[TheItemId].src;
	document[TheItemId].src = document[TheItemId].lowsrc;
	}

// Routine to swap image out on mouse rollout
function onMouseOut(TheItemId)
	{
	document[TheItemId].src = document[TheItemId].imgRolln;
	}

//-->