<!--
//Copyright (c) Gumshoe Software Limited, 2009.
//All Rights Reserved.
//This file may not be reverse engineered, copied or sold without prior written authorisation from Gumshoe Software Limited.
//This copyright notice must remain visible inside this file at all times.
//Alterations to this web page may invalidate your warranty.
//**Start Encode**

function evalaccount (username)
	{
		var crucial = username.indexOf("@");
		if (username.length == 0) // if no email address entered allow it 
		{crucial = 0;}
		//the above uses a method of the string object to locate an at-sign in
		//the submitted form
		if (username=="" || crucial == -1)
		{
			window.alert ("You have not entered a correct User Name! Please return to the form and try again.");
			return false;
		}
		return true
	}

function evalpwd (password)
	{
		if (password.length < 7)
		{
			window.alert ("You have not entered a correct Password! Please return to the form and try again. Passwords must be at least 7 characters long.");
			return false;
		}
		return true
	}

function evalsearch (thissearch)
	{
		if (thissearch=="")
		{
			window.alert ("You have not entered a search term! Please return to the form and try again.");
			return false;
		}
		return true
	}

function evallogon (username,password)
	{
		var crucial = username.indexOf("@");
		if (username.length == 0) // if no email address entered allow it 
		{crucial = 0;}
		//the above uses a method of the string object to locate an at-sign in
		//the submitted form
		if (document.logonform.action=="newaccount.asp")
		{
			if (username=="")
			{
				window.alert ("You have not entered a correct User Name! Please return to the form and try again.");
				return false;
			}			
		}
		else
		{
			if (username=="" || crucial == -1)
			{
				window.alert ("You have not entered a correct User Name! Please return to the form and try again.");
				return false;
			}
			if (password.length < 7)
			{
				window.alert ("You have not entered a correct Password! Please return to the form and try again.");
				return false;
			}
		}
		document.logonform.screenwidth.value = screen.width;
		document.logonform.screenheight.value = screen.height;
		return true
	}

function evalpurchase ()
	{
		if (document.purchase.tandc.checked == false)
		{
			window.alert ("You must accept the Terms and Conditions! Please return to the form and try again.");
			return false;
		}
		return true
	}

function evaljoin()
	{
		if (document.purchase.join.checked == false)
			{
				document.purchase.custom.value = "no";
			}
		if (document.purchase.join.checked == true)
			{
				document.purchase.custom.value = "yes";
			}
	}

function evaltype (thistype)
	{
		if (thistype=="")
		{
			window.alert ("You have not entered a user type! Please return to the form and try again.");
			return false;
		}
		return true
	}

function evaluser (firstname,surname,userid,pwd,usertype)
	{
		var crucial = userid.indexOf("@");
		if (userid.length == 0) // if no email address entered allow it 
		{crucial = 0;}
		//the above uses a method of the string object to locate an at-sign in
		//the submitted form
			if (firstname=="")
			{
				window.alert ("You have not entered a correct First Name! Please return to the form and try again.");
				return false;
			}			
			if (surname=="")
			{
				window.alert ("You have not entered a correct Last Name! Please return to the form and try again.");
				return false;
			}			
			if (username=="" || crucial == -1)
			{
				window.alert ("You have not entered a correct User ID! Please return to the form and try again.");
				return false;
			}
			if (pwd.length < 7)
			{
				window.alert ("You have not entered a correct Password! Please return to the form and try again.");
				return false;
			}
			if (usertype == -1)
			{
				window.alert ("You have not selected a User Type! Please return to the form and try again.");
				return false;
			}
		return true
	}
//-->
