
function CheckRegistrate() { 

	//Initialise variables
	var errorMsg = "";
	
	//Check for a name
	with (document.form1) {
		
	if (xusyname.value == ""){
		errorMsg += "\nName: \t\tEnter your Username";	
	}
	
	//Check for a company name
	if (fullname.value == ""){
		errorMsg += "\nFullname: \tEnter your Full Name";
	}
	
	if (phonenumber.value == ""){
		errorMsg += "\nPhoneNumber: \tPhone Number";
	}
	if (paxword.value != vpassword.value ){
		errorMsg += "\nPasword Validation: \tPasswords are not the same";
	}

	/**/

	
 
	//if (frmFax.value == ""){
	//	errorMsg += "\nEnter the full name of the contactperson";
	//}
	//if (frmEmail.value == ""){
	//	errorMsg += "\nE-MAIL: \tEnter your E-mail Address";
	//}
	//Check for an e-mail address and that it is valid
	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 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 CheckRegistrateBride() { 

	//Initialise variables
	var errorMsg = "";
	
	//Check for a name
	with (document.form1) {
		
	if (xusyname.value == ""){
		errorMsg += "\nName: \t\tEnter your Username";	
	}
	
	//Check for a company name
	if (groomsurname.value == ""){
		errorMsg += "\nGroom surname: \tEnter Groom surname";
	}
	
	if (groomfirstname.value == ""){
		errorMsg += "\nGroom First name: \tEnter Groom First name";
	}
	
	if (mobilenumber.value == ""){
		errorMsg += "\nPhone Number: \tPhone Number";
	}
	if (paxword.value != vpassword.value ){
		errorMsg += "\nPasword Validation: \tPasswords are not the same";
	}

	/**/

	
 
	//if (frmFax.value == ""){
	//	errorMsg += "\nEnter the full name of the contactperson";
	//}
	//if (frmEmail.value == ""){
	//	errorMsg += "\nE-MAIL: \tEnter your E-mail Address";
	//}
	//Check for an e-mail address and that it is valid
	if ((emailaddress.value == "") || (emailaddress.value.length > 0 && (emailaddress.value.indexOf("@",0) == - 1 || emailaddress.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 CheckWebname() { 

	//Initialise variables
	var errorMsg = "";
	
	//Check for a name
	with (document.form1) {
		
	if (webname.value == ""){
		errorMsg += "\nSelect Name for  your website";	
	}
		
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg =  "________________________________________\n\n";
				msg += "Please complete the field.\n";
		msg += "________________________________________\n\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	return true;
	}
}
function CheckRegistrateProvider() { 

	//Initialise variables
	var errorMsg = "";
	
	//Check for a name
	with (document.form1) {
		
	if (xusyname.value == ""){
		errorMsg += "\nName: \t\tEnter your Username";	
	}
	
	//Check for a company name
	if (companyname.value == ""){
		errorMsg += "\nCompany Name: \tEnter Company Name";
	}
	
	if (contactperson.value == ""){
		errorMsg += "\nContact Person name: \tEnter Contact Person";
	}
	
	if (mobilenumber.value == ""){
		errorMsg += "\nPhone Number: \tPhone Number";
	}
	if (paxword.value != vpassword.value ){
		errorMsg += "\nPasword Validation: \tPasswords are not the same";
	}

	/**/

	
 
	//if (frmFax.value == ""){
	//	errorMsg += "\nEnter the full name of the contactperson";
	//}
	//if (frmEmail.value == ""){
	//	errorMsg += "\nE-MAIL: \tEnter your E-mail Address";
	//}
	//Check for an e-mail address and that it is valid
	if ((emailaddress.value == "") || (emailaddress.value.length > 0 && (emailaddress.value.indexOf("@",0) == - 1 || emailaddress.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 checkfriendname()
{
	with (document.form1)
		{
	if (friendname.value == "")
		{
			alert("Please Enter Friend Name");
			return false;
		}
		return true;
		}
		
	
}



function checkemail() { 

	//Initialise variables
	var errorMsg = "";
	
	//Check for a name
	with (document.form1) {
		
	if (emailnumber.value == 0){
		errorMsg += "\Email: \t\tPlease, Create At least One 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 tellfiend() { 

	//Initialise variables
	var errorMsg = "";
	
	//Check for a name
	with (document.form1) {
		
		if (yourname.value == ""){
		errorMsg += "\nName: \t\tEnter your name";	
	}
	if (friendsemail.value == 0){
		errorMsg += "\nEmail: \t\tPlease, Create At least One 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 submitform(a,url)
{

//alert("sausi");

	if (a==1)
		document.form1.action = url+"?status=1";
	else
	    document.form1.action = url+"?status=2";
document.form1.submit();

}

