	function Submitfreetrial()
	{		
		
			if (document.applyonline.greeting2.value == "Enter your company name")
	  	{
	  		alert("Please enter your company or trading name")
			return false;
		}

			if (document.applyonline.maintel.value == "")
	  	{
	  		alert("Please enter the main telephone number that you will be diverting or pointing calls from")
			return false;
		}

	document.applyonline.submit()

	     }

	function SubmitfreetrialB()
	{
	document.applyonlineB.submit()
	}

	function SubmitfreetrialC()
	{		
		
			if (document.applyonlineC.business_name.value == "")
	  	{
	  		alert("Please enter your business name")
			return false;
		}

			if (document.applyonlineC.contact_name.value == "")
	  	{
	  		alert("Please enter a contact name")
			return false;
		}

			if ((document.applyonlineC.tel.value == "") && (document.applyonlineC.mobile.value == ""))
	  	{
	  		alert("Please enter at contact telephone number")
			return false;
		}

	document.applyonlineC.submit()

	     }



	function CheckSubmitprofile()
	{		
		if (document.profile.business_name.value == "")
		{
			alert("Please enter your Business Name.")
			return false
		}
			if (document.profile.address1.value == "")
		{
			alert("Please enter the first line of your business address.")
			return false
		}
			if (document.profile.postcode.value == "")
		{
			alert("Please enter your business postcode.")
			return false
		}
			if (document.profile.contact_name.value == "")
		{
			alert("Please enter a contact name.")
			return false
		}
			if (document.profile.tel.value == "")
		{
			alert("Please enter a contact telephone number.")
			return false
		}
			if (document.profile.email.value == "")
		{
			alert("Please enter a contact email address.")
			return false
		}
	
			if ((document.profile.destination1.value == "") && (document.profile.destination2.value == "") && (document.profile.destination3.value == "") && (document.profile.destination4.value == "") && (document.profile.destination5.value == "") && (document.profile.destination6.value == ""))
		{
			alert("Please enter how would you like us to relay your Virtual PA messages to you.")
			return false
		}
			if (document.profile.TandC.checked==false)
		{
			alert("Please tick box to confirm you have read and agree to our terms and conditions.")
			return false
		}
		return true
	}


	function Checktelephony()
	{		
			if (document.profile.business_name.value == "")
		{
			alert("Please enter your Business Name.")
			return false
		}
				
			if (document.profile.address1.value == "")
		{
			alert("Please enter the first line of your business address.")
			return false
		}
			if (document.profile.postcode.value == "")
		{
			alert("Please enter your business postcode.")
			return false
		}
			if (document.profile.contact_name.value == "")
		{
			alert("Please enter a contact name.")
			return false
		}
			if (document.profile.tel.value == "")
		{
			alert("Please enter a contact telephone number.")
			return false
		}
		
		
		var emailRegEx = /^.+@[^\.].*\.[a-z]{2,}$/i;
     	if (document.profile.email.value.search(emailRegEx) == -1) {
        	alert("Please enter a valid email address.");
     		return false
		}
    
			if (document.profile.fax_email.value == "")
		{
			alert("Please enter either an email address faxes are to be sent to.")
			return false
		}
			if (document.profile.payment1.value == "--Select--" && document.profile.payment2.value == "--Select--")
		{
			alert("Please select a payment option")
			return false
		}

	return true
		 }
		 function dofax2email() {
		 	document.getElementById('e2femail').style.display = 'none';
		 	document.getElementById('normaldest').style.display = 'inline';
			document.getElementById('fax2email_info').style.display = 'block';
			document.getElementById('e2f_info').style.display = 'none';
			document.getElementById('number0845_info').style.display = 'none';
			document.getElementById('number08452_info').style.display = 'none';
			document.getElementById('number0800_info').style.display = 'none';
			document.getElementById('localpres_info').style.display = 'none';
			document.getElementById('localpres_area').style.display = 'none';
			document.getElementById('payment1').style.display = 'inline';
			document.getElementById('payment2').style.display = 'none';
		 }
		 function doe2f() {
		 	document.getElementById('e2femail').style.display = 'inline';
		 	document.getElementById('normaldest').style.display = 'none';
			document.getElementById('fax2email_info').style.display = 'none';
			document.getElementById('e2f_info').style.display = 'block';
			document.getElementById('number0845_info').style.display = 'none';
			document.getElementById('number08452_info').style.display = 'none';
			document.getElementById('number0800_info').style.display = 'none';
			document.getElementById('localpres_info').style.display = 'none';
			document.getElementById('localpres_area').style.display = 'none';
			document.getElementById('payment1').style.display = 'none';
			document.getElementById('payment2').style.display = 'inline';
		 }
		 function do0845() {
		 	document.getElementById('e2femail').style.display = 'none';
		 	document.getElementById('normaldest').style.display = 'inline';
			document.getElementById('fax2email_info').style.display = 'none';
			document.getElementById('e2f_info').style.display = 'none';
			document.getElementById('number0845_info').style.display = 'block';
			document.getElementById('number08452_info').style.display = 'none';
			document.getElementById('number0800_info').style.display = 'none';
			document.getElementById('localpres_info').style.display = 'none';
			document.getElementById('localpres_area').style.display = 'none';
			document.getElementById('payment1').style.display = 'inline';
			document.getElementById('payment2').style.display = 'none';
		 }	
		 function do08452() {
		 	document.getElementById('e2femail').style.display = 'none';
		 	document.getElementById('normaldest').style.display = 'inline';
			document.getElementById('fax2email_info').style.display = 'none';
			document.getElementById('e2f_info').style.display = 'none';
			document.getElementById('number0845_info').style.display = 'none';
			document.getElementById('number08452_info').style.display = 'block';
			document.getElementById('number0800_info').style.display = 'none';
			document.getElementById('localpres_info').style.display = 'none';
			document.getElementById('localpres_area').style.display = 'none';
			document.getElementById('payment1').style.display = 'none';
			document.getElementById('payment2').style.display = 'inline';
		 }		 
		 function do0800() {
		 	document.getElementById('e2femail').style.display = 'none';
		 	document.getElementById('normaldest').style.display = 'inline';
			document.getElementById('fax2email_info').style.display = 'none';
			document.getElementById('e2f_info').style.display = 'none';
			document.getElementById('number0845_info').style.display = 'none';
			document.getElementById('number08452_info').style.display = 'none';
			document.getElementById('number0800_info').style.display = 'block';
			document.getElementById('localpres_info').style.display = 'none';
			document.getElementById('localpres_area').style.display = 'none';
			document.getElementById('payment1').style.display = 'none';
			document.getElementById('payment2').style.display = 'inline';
		 }		 
		 function dolocalpres() {
		 	document.getElementById('e2femail').style.display = 'none';
		 	document.getElementById('normaldest').style.display = 'inline';
			document.getElementById('fax2email_info').style.display = 'none';
			document.getElementById('e2f_info').style.display = 'none';
			document.getElementById('number0845_info').style.display = 'none';
			document.getElementById('number08452_info').style.display = 'none';
			document.getElementById('number0800_info').style.display = 'none';
			document.getElementById('localpres_info').style.display = 'block';
			document.getElementById('payment1').style.display = 'none';
			document.getElementById('payment2').style.display = 'inline';
			document.getElementById('localpres_area').style.display = 'inline';
		 }



	function Submitcallback()
	{		
		
			if (document.callback.contactname.value == "")
	  	{
	  		alert("Please enter a contact name")
			return false;
		}

			if (document.callback.tel.value == "")
	  	{
	  		alert("Please enter a valid contact number")
			return false;
		}
		
			if (document.callback.time.value == "- - -")
	  	{
	  		alert("Please enter the best time to call you back")
			return false;
		}
					

	document.callback.submit()

	     }
