<!--
	function validate_form() {	
		if (!check_valid_username_or_password_contents(document.login.username.value)) {
			alert("Please complete a valid Username");
			self.document.login.username.focus();
			return false;			
		}
		if (!check_valid_username_or_password_contents(document.login.password.value)) {
			alert("Please complete a valid Password");
			self.document.login.password.focus();
			return false;			
		}
		return true
	}
	
	function validate_reminder_form() {	
		if (!check_valid_email_contents(document.Reminder_Form.Email.value)) {			
			self.document.Reminder_Form.Email.focus();
			return false;
		}
		return true
	}
	
	function check_valid_username_or_password_contents(inputbox) {
		var teststring
		var outputstring		
		teststring = trim(inputbox.toString())
		if (teststring == "") {
			return false
		}
		if (isblank(teststring)) {
			return false
		}		
		if (teststring.length < 5) {
			return false
		}			
		return true
	}
		
	function isblank(inbox) {
		for (var i = 0; i <  inbox.length; i++) {
			var c = inbox.charAt(i)
			if (c != " "){		
				return false;
			}
		}
		return true
	}	
		
	function check_valid_email_contents(inputbox) {
		if (inputbox == "") {
			alert("Please complete a valid Email Address");
			return false
		}
		
		var teststring 

		teststring = trim(inputbox.toString())
		
		if (isblank(teststring)) {
			alert("Please complete a valid Email Address");
			return false
		}		

		// Convert inputbox to string			
		
		outputstring = removeblank(teststring)

		// Check for at least 7 chrs

		if (outputstring.length <= 6){
			alert("The email address you have entered is not in a valid format");				
			return false;
		}

		// Check for Illegal Characters

		var illegalchrs = new Array("*","£","$","!")

		var counter

		for (counter=0; counter <= illegalchrs.length; counter++){
			if (outputstring.indexOf(illegalchrs[counter]) != -1){
			alert("You have entered an invalid character in your email address");				
			return false;
			}				
		}

		// Check for the @ and the dots


		// First check that they both exist

		var atpositionback = outputstring.lastIndexOf("@")

		var dotpositionback = outputstring.lastIndexOf(".")

		var atpositionfront = outputstring.indexOf("@")


		if (atpositionback == -1){
			alert("The email address you have entered is not in a valid format");				
			return false;
		}

		if (dotpositionback == -1){
			alert("The email address you have entered is not in a valid format");				
			return false;
		}

		if (atpositionfront != atpositionback){
			alert("The email address you have entered is not in a valid format");				
			return false;
		}

		if (atpositionback > dotpositionback){
			alert("The email address you have entered is not in a valid format");				
			return false;
		}				
		return true
	}
	
	function removeblank(inbox) {
		var output = ""
		for( var i = 0; i <  inbox.length; i++) {
			var c = inbox.charAt(i)
			if (c != " "){		
				output = output + c			
			}
		}
		return output
	}
	
	function trim(str) {	
   		return str.replace(/^\s*|\s*$/g,"");
	}

//-->