<!--

function mySubmit() {
    if (document.calculate.sales.value == '') {
        alert('You must enter your annual sales before proceeding');
        return false;
    }
    else {
        return true;
    }
}

function apply() {
    if (document.applyinfo.txtOne.value == '') {
        alert('You must supply a brief describtion of you company');
        return false;
    }
	
    
	if (document.applyinfo.txtTwo.value == '') {
        alert('You must let us Know how long you have been trading');
        return false;
    }
	
	if (document.applyinfo.txtThree.value == '') {
        alert('You must fill in how many employees are engaged in this sector?');
       return false;
    }
	
	if (document.applyinfo.txtFour.value == '') {
        alert('What is your company’s approximate annual sales in this sector');
        return false;
    }
	
	if (document.applyinfo.txtName.value == '') {
        alert('Fill in your name');
        return false;
    }
		
	if (document.applyinfo.txtPosition.value == '') {
        alert('What is your position in the company');
        return false;
    }
	
   if (document.applyinfo.txtCompanyname.value == '') {
       alert('Fill in your company name');
        return false;
    }
	
	if (document.applyinfo.txtCompanyaddress.value == '') {
        alert('You must supply your companies address');
        return false;
    }
	
	if (document.applyinfo.txtPostcode.value == '') {
        alert('You must supply your companies postcode');
        return false;
    }
	
	if (document.applyinfo.txtTelephone.value == '') {
        alert('You must supply your companies telephone number');
        return false;
    }
	
	if (document.applyinfo.txtEmail.value == '') {
        alert('You must supply a valid email address');
        return false;
	}

	if (document.applyinfo.txtEmail.value != '') {
		var invalidChars = " /:,;";
		
		for (var k=0; k<invalidChars.length;
			 k++) {
			var badChar = invalidChars.
			charAt(k);
			 if (document.applyinfo.txtEmail.value.indexOf(badChar) > -1) {
        alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
		}
		
	var atPos = document.applyinfo.txtEmail.value.indexOf("@",1);
	if (atPos == -1 ){
		 alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	if (document.applyinfo.txtEmail.value.indexOf("@",atPos+1)
		!= -1){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	var periodPos = document.applyinfo.txtEmail.value.indexOf(".",atPos);
	if (periodPos == -1){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	if (periodPos+3 > document.applyinfo.txtEmail.value.length){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	
	}
	

else {
        return true;
    }
}
	

function membercart() {
	
	if (document.cart.name.value == '') {
        alert('Card holders name is required');
        return false;
    }
	if (document.cart.MC_cardcompany.value == '') {
        alert('company name is required');
        return false;
    }
	if (document.cart.address.value == '') {
        alert('Card holders address is required');
        return false;
    }
	if (document.cart.postcode.value == '') {
        alert('Postcode is required');
        return false;
    }
	if (document.cart.tel.value == '') {
        alert('A contact telephone number is required');
        return false;
    }
	if (document.cart.email.value == '') {
        alert('A contact email is required');
        return false;
    }
	if (document.cart.email.value != '') {
		var invalidChars = " /:,;";
		
		for (var k=0; k<invalidChars.length;
			 k++) {
			var badChar = invalidChars.
			charAt(k);
			 if (document.cart.email.value.indexOf(badChar) > -1) {
        alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
		}
		
	var atPos = document.cart.email.value.indexOf("@",1);
	if (atPos == -1 ){
		 alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	if (document.cart.email.value.indexOf("@",atPos+1)
		!= -1){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	var periodPos = document.cart.email.value.indexOf(".",atPos);
	if (periodPos == -1){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	if (periodPos+3 > document.cart.email.value.length){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	
	
	
	var checkbox_choices = 0;
		if (eval (cart.checkbox.length))
		{
			for(count=0; count<cart.checkbox.length; count++)
			{
				if(cart.checkbox[count].checked == true)
				{
					checkbox_choices = 1;
					break;
				}
			}
		}
		else
		{
			if (cart.checkbox.checked == true)
			{
				checkbox_choices = 1;
			}
		}
 
		if(checkbox_choices == 0)
		{
			msg = "Do you agree to terms and conditions?";
			alert(msg);
			return false;
		}
		
		
	
	
	}
	
	else {
        return true;
    }
}
	
function profile() {
	
	if (document.searchprofile.describtion.value == ''){
		alert('You must supply a description of your company');
		return false;
	}
	else {
		return true;
	}
}

function check() {
	if (document.newmember.description.value == ''){
		alert('Enter short description');
		return false;
	}
	if (document.newmember.company.value == ''){
		alert('You must enter a company name');
		return false;
	}
	
	else {
		return true;
	}


}

function datacart() {
	
	if (document.database.contactname.value == ''){
		alert('You must enter a contact name');
		return false;
	
	}
		if (document.database.contactnumber.value == ''){
		alert('You must enter a contact number');
		return false;
	
	}
		if (document.database.contactemail.value == ''){
		alert('You must enter a contact email');
		return false;
	}
	
	var checkbox_agree = 0;
	
		if (eval (database.checkbox.length))
		{
		
			for(count=0; count<database.checkbox.length; count++)
			{
				if(database.checkbox[count].checked == true)
				{
					checkbox_agree = 1;
					break;
				}
			}
		}
		
		else
		{
			if (database.checkbox.checked == true)
			{
				checkbox_agree = 1;
			}
		}
 
		if(checkbox_agree == 0)
		{
			msg = "Do you agree to terms and conditions?";
			alert(msg);
			return false;
		}
		
		
	else {
        return true;
    }
}

function publiccontact() {
    if (document.contactinfo.txtName.value == '') {
        alert('Please supply a contact name');
        return false;
    }
	if (document.contactinfo.txtTel.value == '') {
        alert('Please supply a contact telephone number');
        return false;
    }
	if (document.contactinfo.txtEmail.value == '') {
        alert('A contact email is required');
        return false;
    }
	if (document.contactinfo.txtEmail.value != '') {
		var invalidChars = " /:,;";
		
		for (var k=0; k<invalidChars.length;
			 k++) {
			var badChar = invalidChars.
			charAt(k);
			 if (document.contactinfo.txtEmail.value.indexOf(badChar) > -1) {
        alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
		}
		
	var atPos = document.contactinfo.txtEmail.value.indexOf("@",1);
	if (atPos == -1 ){
		 alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	if (document.contactinfo.txtEmail.value.indexOf("@",atPos+1)
		!= -1){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	var periodPos = document.contactinfo.txtEmail.value.indexOf(".",atPos);
	if (periodPos == -1){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	if (periodPos+3 > document.contactinfo.txtEmail.value.length){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	
	var checkbox_contact = 0;
		if (eval (contactinfo.Forward.length))
		{
			for(count=0; count<contactinfo.Forward.length; count++)
			{
				if(contactinfo.Forward[count].checked == true)
				{
					checkbox_contact = 1;
					break;
				}
			}
		}
		else
		{
			if (contactinfo.Forward.checked == true)
			{
				checkbox_contact = 1;
			}
		}
 
		if(checkbox_contact == 0)
		{
			msg = "May we forward your enquiry to our members?";
			alert(msg);
			return false;
		}
		
	
	}
	
    else {
        return true;
    }
}

function memberscontact() {
    if (document.contactinfo.txtName.value == '') {
        alert('Please supply a contact name');
        return false;
    }
	if (document.contactinfo.txtTel.value == '') {
        alert('Please supply a contact telephone number');
        return false;
    }
	if (document.contactinfo.txtDetails.value == '') {
        alert('What is your message?');
        return false;
    }
	if (document.contactinfo.txtEmail.value == '') {
        alert('A contact email is required');
        return false;
    }
	if (document.contactinfo.txtEmail.value != '') {
		var invalidChars = " /:,;";
		
		for (var k=0; k<invalidChars.length;
			 k++) {
			var badChar = invalidChars.
			charAt(k);
			 if (document.contactinfo.txtEmail.value.indexOf(badChar) > -1) {
        alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
		}
		
	var atPos = document.contactinfo.txtEmail.value.indexOf("@",1);
	if (atPos == -1 ){
		 alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	if (document.contactinfo.txtEmail.value.indexOf("@",atPos+1)
		!= -1){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	var periodPos = document.contactinfo.txtEmail.value.indexOf(".",atPos);
	if (periodPos == -1){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	if (periodPos+3 > document.contactinfo.txtEmail.value.length){
		alert('This is not a valid email address, you must supply a valid email address');
        return false;
	}
	
	var checkbox_contact = 0;
		if (eval (contactinfo.Forward.length))
		{
			for(count=0; count<contactinfo.Forward.length; count++)
			{
				if(contactinfo.Forward[count].checked == true)
				{
					checkbox_contact = 1;
					break;
				}
			}
		}
		else
		{
			if (contactinfo.Forward.checked == true)
			{
				checkbox_contact = 1;
			}
		}
 
		if(checkbox_contact == 0)
		{
			msg = "May we forward your enquiry to our members?";
			alert(msg);
			return false;
		}
		
	
	}
	
    else {
        return true;
    }
}


-->
