function CheckForm () {

	var errorMsg = "";

	//If an e-mail is entered check that the e-mail address is valid
        if (document.frmLogin.loginemail.value == "" || (document.frmLogin.loginemail.value.indexOf("@",0) == -1||document.frmLogin.loginemail.value.indexOf(".",0) == -1)) {
                errorMsg +="\n\t<% = strTxtEmailAddressEnterYourValidEmailAddress %>";

        }

	//Check for a Password
	if (document.frmLogin.password.value==""){
		errorMsg += "\n\t<% = strTxtPassworEnterYourPassword %>";
	}

	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "<% = strTxtErrorDisplayLine %>\n\n";
		msg += "<% = strTxtErrorDisplayLine1 %>\n";
		msg += "<% = strTxtErrorDisplayLine2 %>\n";
		msg += "<% = strTxtErrorDisplayLine %>\n\n";
		msg += "<% = strTxtErrorDisplayLine3 %>\n";

		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}

	return true;
}


function CheckFormPassword () {

	var errorMsg = "";

	//If an e-mail is entered check that the e-mail address is valid
        if (document.frmNPass.email.value == "" || (document.frmNPass.email.value.indexOf("@",0) == -1||document.frmNPass.email.value.indexOf(".",0) == -1)) {
                errorMsg +="\n\t<% = strTxtEmailAddressEnterYourValidEmailAddress %>";

        }

	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "<% = strTxtErrorDisplayLine %>\n\n";
		msg += "<% = strTxtErrorDisplayLine1 %>\n";
		msg += "<% = strTxtErrorDisplayLine2 %>\n";
		msg += "<% = strTxtErrorDisplayLine %>\n\n";
		msg += "<% = strTxtErrorDisplayLine3 %>\n";

		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}

	return true;
}

function CheckFormDefault () {

	var errorMsg = "";

	//If an e-mail is entered check that the e-mail address is valid
        if (document.all.frmLogin.loginemail.value == "" || (document.all.frmLogin.loginemail.value.indexOf("@",0) == -1||document.all.frmLogin.loginemail.value.indexOf(".",0) == -1)) {
                errorMsg +="\n\t<% = strTxtEmailAddressEnterYourValidEmailAddress %>";

        }

	//Check for a Password
	if (document.all.frmLogin.password.value==""){
		errorMsg += "\n\t<% = strTxtPassworEnterYourPassword %>";
	}

	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "<% = strTxtErrorDisplayLine %>\n\n";
		msg += "<% = strTxtErrorDisplayLine1 %>\n";
		msg += "<% = strTxtErrorDisplayLine2 %>\n";
		msg += "<% = strTxtErrorDisplayLine %>\n\n";
		msg += "<% = strTxtErrorDisplayLine3 %>\n";

		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}

	return true;
}

function CheckFormManagementCentre () {

	var errorMsg = "";

	//Check for a name
        if (document.frmManCen.name.value.length == ''){
                errorMsg += "\n\t<% = strTxtNameEnterYourName %>";
        }
        
        //If an e-mail is entered check that the e-mail address is valid
        if (document.frmManCen.email.value == "" || (document.frmManCen.email.value.indexOf("@",0) == -1||document.frmManCen.email.value.indexOf(".",0) == -1)) {
                errorMsg +="\n\t<% = strTxtEmailAddressEnterYourValidEmailAddress %>";

        }
        
         //Check for old password
        if ((document.frmManCen.password.value.length > 0) && (document.frmManCen.oldPassword.value == '')){
                errorMsg += "\n\t<% = strTxtCurrentPasswordEnterCurrentPassword %>";
        }

        //Check for a password
        if ((document.frmManCen.password.value.length <= 3) && (document.frmManCen.password.value.length > 0)){
                errorMsg += "\n\t <% = strTxtNew & " " & strTxtPasswordYourPasswordMustB4Characters %>";
	}

        //Check both passwords are the same
        if ((document.frmManCen.password.value) != (document.frmManCen.password2.value)){
                errorMsg += "\n\t<% = strTxtPasswordError %>";
                document.frmManCen.password.value = ""
                document.frmManCen.password2.value = ""
        }

	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "<% = strTxtErrorDisplayLine %>\n\n";
		msg += "<% = strTxtErrorDisplayLine1 %>\n";
		msg += "<% = strTxtErrorDisplayLine2 %>\n";
		msg += "<% = strTxtErrorDisplayLine %>\n\n";
		msg += "<% = strTxtErrorDisplayLine3 %>\n";

		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}

	return true;
}
