function checkname() { 

	//Initialise variables
	var errorMsg = "";
	
	//Check for a name
	with (document.form1) {
			
	
	if (contactfullname.value == ""){
		errorMsg += "\nName: \tEnter Your Name";	
	}
	
	if (contactcitytown.value == ""){
		errorMsg += "\nCity/Town: \tEnter City or Town";	
	}
	
	if (contactcountry.value == ""){
		errorMsg += "\nCountry Name: \tEnter Country Name";	
	}
	
	if ((contactemail.value == "") || (contactemail.value.length > 0 && (contactemail.value.indexOf("@",0) == - 1 || contactemail.value.indexOf(".",0) == - 1))) { 
		errorMsg += "\nE-MAIL: \t\tEnter a valid Email address";
	}

	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg =  "________________________________________\n\n";
				msg += "Please complete the following fields.\n";
		msg += "________________________________________\n\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	return true;
	}
}

function checkname2() { 

	//Initialise variables
	var errorMsg = "";
	
	//Check for a name
	with (document.form1) {
		
		
	
	if (friendname.value == ""){
		errorMsg += "\nName:     \t\tEnter Your Name";	
	}
	
	if (friendaddress.value == ""){
		errorMsg += "\nAddress:     \tEnter Your Address";	
	}
	
	if (friendcitytown.value == ""){
		errorMsg += "\nCity/Town: \tEnter City or Town";	
	}
	
	if (friendcountry.value == ""){
		errorMsg += "\nCountry Name: \tEnter Country Name";	
	}

	if (friendlanguagepref.value == ""){
		errorMsg += "\nCountry Name: \tEnter Language of Preference";	
	}
	
	if ((friendemail.value == "") || (friendemail.value.length > 0 && (friendemail.value.indexOf("@",0) == - 1 || friendemail.value.indexOf(".",0) == - 1))) { 
		errorMsg += "\nE-MAIL: \t\tEnter a valid Email address";
	}
		
	if ((frienddateofbirth.value == "") || (frienddateofbirth.value.length < 10 )|| (frienddateofbirth.value.indexOf("-",0) == - 1)) { 
		errorMsg += "\nBirth Date: \tEnter a valid Date";
	}
	
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg =  "________________________________________\n\n";
				msg += "Please complete the following fields.\n";
		msg += "________________________________________\n\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	return true;
	}
}

function checkname3() { 

	//Initialise variables
	var errorMsg = "";
	
	//Check for a name
	with (document.form1) {
		
		
	
	if (contactname.value == ""){
		errorMsg += "\nName: \t\tEnter Your Name";	
	}
	
	if (organization.value == ""){
		errorMsg += "\nOrganisation: \tEnter Organisation Name";	
	}
	
	if (citytown.value == ""){
		errorMsg += "\nCity/Town: \tEnter City or Town";	
	}
	
	if (position.value == ""){
		errorMsg += "\nPosition: 	\tEnter Position";	
	}

	if (address.value == ""){
		errorMsg += "\nCountry Name: \tEnter Language of Preference";	
	}
	
	if ((email.value == "") || (email.value.length > 0 && (email.value.indexOf("@",0) == - 1 || email.value.indexOf(".",0) == - 1))) { 
		errorMsg += "\nE-MAIL: \t\tEnter a valid Email address";
	}
		
	if ((phone.value == "") && (mobile.value == "" )) { 
		errorMsg += "\nPhone: \t\tEnter either Phone and/or Mobile";
	}
	
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg =  "________________________________________\n\n";
				msg += "Please complete the following fields.\n";
		msg += "________________________________________\n\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	return true;
	}
}



