
function signupformcheck () {
if (document.signupform.searchtxt.value == '') {
alert("Please enter your account number as depicted on your Telephone Statement.");
signupform.searchtxt.focus();
return false;
		}
len = document.signupform.searchtxt.value.length;
if(len != 8) 
{
alert("Account number is not correct length.");
signupform.searchtxt.focus();
return false;
}	
if (document.signupform.password.value == '') {		
alert ('Please enter the new password.');
signupform.password.focus();
return false;
	} 
if (document.signupform.confirmpassword.value == '') {
alert ('Please confirm the new password.');
signupform.confirmpassword.focus();
return false;
		}
if (document.signupform.password.value != document.signupform.confirmpassword.value) {
alert ('Re-enter your passwords as they do not match.');
signupform.password.focus();
return false;
		}
	}
	

function loginformcheck() {
if(document.loginform.searchtxt.value == '') {
alert("Please enter your telephone number excluding the STD code.");
loginform.searchtxt.focus();
return false;
}
if(document.loginform.password.value == '') { 
alert("Please enter your password.");
loginform.password.focus();
return false;
}
}

function forgotpasswordformcheck() {
if(document.forgotpasswordform.searchtxt.value == '') {
alert("Please enter your account number as depicted on your Telephone Statement.");
forgotpasswordform.searchtxt.focus();
return false;
}
len = document.forgotpasswordform.searchtxt.value.length;
if(len != 8) 
{
alert("Account number is not correct length.");
forgotpasswordform.searchtxt.focus();
return false;
}
}

function directoryenquiryformcheck() {
if(document.loginform.searchtxt.value == '') {
alert("Please enter some search text.");
loginform.searchtxt.focus();
return false;
}
len = document.loginform.searchtxt.value.length;
if(len < 3)
{
alert("Your search text should at least be 3 characters long.");
loginform.searchtxt.focus();
return false;
}
}

function enquiriesformcheck() {
	var mylist = document.getElementById("myList");
	if(mylist.options[mylist.selectedIndex].text == '(Other)') {
	  if(document.enquiriesform.SubjectOther.value== '') {
		alert("Please enter some text.");
		enquiriesform.SubjectOther.focus();
		return false;
	}
	else {
	len = document.enquiriesform.SubjectOther.value.length;
	if(len < 3) 
	{ 
		alert("You should enter some text at least 3 characters long.");
		enquiriesform.SubjectOther.focus();
		return false;
	}
   }
   }
   if(document.enquiriesform.Username.value == '') {
   		alert("Please enter your name.");
   		enquiriesform.Username.focus();
   		return false;
	}
    if(document.enquiriesform.UserEmail.value == '') {
    	alert("Please enter your email.");
    	enquiriesform.UserEmail.focus();
		return false;
	}  
}
