<!-- //
// first name check
function checktxtFirstName(box1)
	{
	textFieldEntry=box1.value;
	if (textFieldEntry == "")
		{
    	alert("You have not entered your First Name");
		box1.focus();
        return false;
		}
    if (textFieldEntry.length<2)
		{
    	alert("Your First Name is less than 2 characters");
		box1.focus();
        return false;
		}
	if (textFieldEntry.length>50)
		{
    	alert("Your First Name is more than 50 characters");
		box1.focus();
        return false;
		}
	var alphabets = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ";
	for (i=0; i < textFieldEntry.length; i++)
		{
		character = textFieldEntry.substring (i, i+1);
	    if (alphabets.indexOf(character)==-1)
			{
			alert("Your First Name can only have letters of the alphabet");
			box1.focus();
			return false;
        	}
    	}
    	return true
	}
	
	
// last name check
function checktxtLastName(box3)
	{
	textFieldEntry=box3.value;
	if (textFieldEntry == "")
		{
    	alert("You have not entered your Last Name");
		box3.focus();
        return false;
		}
    if (textFieldEntry.length<2)
		{
    	alert("Your Last Name is less than 2 characters");
		box3.focus();
        return false;
		}
	if (textFieldEntry.length>50)
		{
    	alert("Your Last Name is more than 50 characters");
		box3.focus();
        return false;
		}
	var alphabets = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ";
	for (i=0; i < textFieldEntry.length; i++)
		{
		character = textFieldEntry.substring (i, i+1);
	    if (alphabets.indexOf(character)==-1)
			{
			alert("Your Last Name can only have letters of the alphabet");
			box3.focus();
			return false;
        	}
    	}
    	return true
	}
	
	
// email address check
function checktxtEmail(box5)
	{
	textFieldEntry=box5.value;
	if (textFieldEntry == "")
		{
    	alert("You have not entered your Email Address");
		box5.focus();
        return false;
		}
    if (textFieldEntry.length<5)
		{
    	alert("Your Email Address is less than 5 characters");
		box5.focus();
        return false;
		}
	if (textFieldEntry.length>50)
		{
    	alert("Your Email Address is more than 50 characters");
		box5.focus();
        return false;
		}
	if (textFieldEntry.indexOf(" ") != -1)
		{
		alert("There must be no gap in your Email Address");
		box5.focus();
		return false;
		}
	if (textFieldEntry.indexOf(".") == -1)
		{
		alert("There is a ' . ' missing in your Email Address");
		box5.focus();
		return false;
		}
	if (textFieldEntry.indexOf("@") == -1)
		{
		alert("There is a ' @ ' missing in your Email Address");
		box5.focus();
		return false;
		}
	else
    	{
    	return true;
		}
	}
	
	
// textarea check
function checktxtComments(box24)
	{
	textFieldEntry=box24.value;
	if (textFieldEntry == "")
		{
    	alert("You have not entered any text");
		box24.focus();
        return false;
		}
	if (textFieldEntry.length>500)
		{
    	alert("Your text is more than 500 characters");
		box24.focus();
        return false;
		}
	else
    	{
    	return true;
		}
	/*
	var alphabets = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890?.,!-:;()£%'/? ";
	for (i=0; i < textFieldEntry.length; i++)
		{
		character = textFieldEntry.substring (i, i+1);
	    if (alphabets.indexOf(character)==-1)
			{
			alert("There seems to be a special character in the text, please remove");
			box24.focus();
			return false;
        	}
    	}
    	return true
	*/
	}
// -->
