
function CheckGlobalSearchField() {
missinginfo = "";

if (document.frmGlobalSearch.SearchString.value == "" || document.frmGlobalSearch.SearchString.value == "Search Site...") {
missinginfo += "\nPlease enter a search keyword or phrase";
}

if (missinginfo != "") {
alert(missinginfo);
return false;
}
else document.frmGlobalSearch.submit();
}
onsubmit="return checkFields()"

function ResetSearchBox() {
if (document.frmGlobalSearch.SearchString.value == "Search Site...") {
	document.frmGlobalSearch.SearchString.value = '';
	}
}

function gotoservice() {
	if (document.frmBookingServices.ServiceCat.value != "") {
		if (document.frmBookingServices.ServiceCat.value == "4")
			{
			document.frmBookingServices.action = "#addr#loughmelvin/booking.cfm?website_Key=47&Category_key=134&Page_Key=382";
			}
		document.frmBookingServices.submit();
		return true;
		}
	else 
		{
		alert('Please Choose Service Type');
		return false;
		}
	
}

function checkFields() {
missinginfo = "";

if (document.form.FirstName.value == "") {
missinginfo += "\n     -  First Name";
}
if (document.form.LastName.value == "") {
missinginfo += "\n     -  Last Name";
}
if(document.form.Address1.value == "") {
missinginfo += "\n     -  Address line 1";
}
if(document.form.Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}
if(document.form.Email.value == "") {
missinginfo += "\n     -  Email";
}
if(document.form.MethodOfContact.value == "") {
missinginfo += "\n     -  Method of Contact";
}
if(document.form.Your_Details.value == "") {
missinginfo += "\n     -  Comments";
}
if(document.form.Destination_Id.value == "") {
missinginfo += "\n     -  Destination";
}

if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checkFields()"

function checklinkFields() {
missinginfo = "";

if (document.form.Link_Name.value == "") {
missinginfo += "\n     -  Title of Link";
}
if (document.form.Link_Cat.value == "") {
missinginfo += "\n     -  Category";
}
if(document.form.Link_URL.value == "" || document.form.Link_URL.value == "http://") {
missinginfo += "\n     -  Website Address";
}
if (document.form.lname.value == "") {
missinginfo += "\n     -  Contact Name";
}
if (document.form.ltelephone.value == "") {
missinginfo += "\n     -  Telephone";
}

if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checklinkFields()"

function checkFAQFields() {
missinginfo = "";

if (document.form.UsersQuestion.value == "") {
missinginfo += "\n     -  Your Question";
}
if(document.form.Users_Name.value == "") {
missinginfo += "\n     -  Your Name";
}
if(document.form.Users_Email.value == "") {
missinginfo += "\n     -  Your Email";
}


if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checkFAQFields()"



function checktendersFields() {
missinginfo = "";

if (document.form.comments.value == "") {
missinginfo += "\n     -  Comments";
}
if (document.form.firstname.value == "") {
missinginfo += "\n     -  Firstname";
}
if (document.form.surname.value == "") {
missinginfo += "\n     -  Surname";
}
if (document.form.comp_name.value == "") {
missinginfo += "\n     -  Company Name";
}

if (document.form.address.value == "") {
missinginfo += "\n     -  Address";
}
if (document.form.town.value == "") {
missinginfo += "\n     -  Town";
}
if (document.form.tel.value == "") {
missinginfo += "\n     -  Telephone";
}
if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checktendersFields()"



function checkinspectionFields() {
missinginfo = "";


if (document.form.M_InspectionType.value == "") {
missinginfo += "\n     -  Select Category You Would Like To Book";
}
if (document.form.Book_Date.value == "") {
missinginfo += "\n     -  Date";
}
if (document.form.AppNumber.value == "" || document.form.AppNumber.value == "F/") {
missinginfo += "\n     -  Building Regulation Application Number";
}
if (document.form.AppName.value == "") {
missinginfo += "\n     -  Applicant Name";
}
if (document.form.AppDesc.value == "" || document.form.AppDesc.value == "<description>") {
missinginfo += "\n     -  Description";
}
if (document.form.AppLocation.value == "" || document.form.AppDesc.value == "<location>") {
missinginfo += "\n     -  Location";
}



if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else 
	{
		
		return confirm('About to submit the following details:\n\n--------------------------------------------\nBuilding Regulation Application No: ' + document.form.AppNumber.value + '\nApplicant Name: ' + document.form.AppName.value + '\n\nI hereby give at least two days notice that I intend to commence work in connection with ' + document.form.AppDesc.value + ' at ' + document.form.AppLocation.value + ' and that any foundation trenches will be ready for inspection on ' + document.form.Book_Date.value + '\n\n\nClick OK to Finish');
	
	
	}
}
onsubmit="return checkinspectionFields()"


function checkAmuseFields() {
missinginfo = "";

if (document.form.Firstname.value == "") {
missinginfo += "\n     -  First Name";
}
if (document.form.Surname.value == "") {
missinginfo += "\n     -  Surname";
}
if(document.form.Address.value == "") {
missinginfo += "\n     -  Address";
}
if(document.form.Town.value == "") {
missinginfo += "\n     -  Postcode";
}
if(document.form.Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}

if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checkAmuseFields()"



function checkAmusePermitFields() {
missinginfo = "";

if (document.form.M_Title_Of_Body.value == "" && document.form.M_Firstname.value == "" && document.form.M_Surname.value == "") {
missinginfo += "\n     -  Title of Body   OR    Firstname and Surname";
}
if(document.form.M_Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}
if(document.form.email.value == "") {
missinginfo += "\n     -  Email";
}
if(document.form.M_Res_Address.value == "") {
missinginfo += "\n     -  Residential Address";
}
if(document.form.M_Res_Town.value == "") {
missinginfo += "\n     -  Town (Residential)";
}
if(document.form.M_Prem_Address.value == "") {
missinginfo += "\n     -  Address of Premises";
}
if(document.form.M_Prem_Town.value == "") {
missinginfo += "\n     -  Town (Premises)";
}

if (document.form.M_chkPremisesUsageA.checked == false && document.form.M_chkPremisesUsageB.checked == false) {
missinginfo += "\n     -  Tick 1 of the boxes for usage of Permit";
}

if (document.form.M_chkAppTypeA.checked == false && document.form.M_chkAppTypeB.checked == false && document.form.M_chkAppTypeC) {
missinginfo += "\n     -  Tick 1 of the boxes for Application type";
}



if(document.form.M_Owner_Firstname.value == "") {
missinginfo += "\n     -  Owner of Premises - Firstname";
}
if(document.form.M_Owner_Surname.value == "") {
missinginfo += "\n     -  Owner of Premises - Surname";
}
if(document.form.M_Owner_Address.value == "") {
missinginfo += "\n     -  Address of Owner";
}
if(document.form.M_Owner_Town.value == "") {
missinginfo += "\n     -  Town (Address of Owner)";
}


if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else 
	 if (document.form.M_chkConfirm.checked == false )
	{
		alert('Tick box to confirm you have read and understood our declaration.');
		return false;
	}else
		return confirm('About to transfer you to WorldPay for secure payment\n\nContinue?') ;
	 
}
//onsubmit="return checkAmusePermitFields()"




function checkTourismFields() {
missinginfo = "";

if (document.form.rate_Waiting.value == "") {
missinginfo += "\n     -  Waiting and Response Times";
}
if (document.form.rate_Service.value == "") {
missinginfo += "\n     -  Service";
}
if (document.form.rate_Quality.value == "") {
missinginfo += "\n     -  Quality of Information";
}
if (document.form.rate_Attitude.value == "") {
missinginfo += "\n     -  Attitude of Staff";
}
if (document.form.rate_Knowledge.value == "") {
missinginfo += "\n     -  Knowledge of Staff";
}
if (document.form.rate_Facilities.value == "") {
missinginfo += "\n     -  Facilities";
}
if (document.form.rate_Value.value == "") {
missinginfo += "\n     -  Value for Money";
}
if (document.form.rate_Overall.value == "") {
missinginfo += "\n     -  Overall impression of facility/service";
}
if (document.form.which_aspect.value == "") {
missinginfo += "\n     -  Which aspect of using a T.I.C. is the most important to you";
}
if (document.form.improve_standards.value == "") {
missinginfo += "\n     -  Can we improve upon service standards";
}

if (document.form.Fullname.value == "") {
missinginfo += "\n     -  Your Name";
}
if(document.form.Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}

if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checkTourismFields()"



function checkbrochureFields() {
missinginfo = "";

if (document.form.FirstName.value == "") {
missinginfo += "\n     -  First Name";
}
if (document.form.LastName.value == "") {
missinginfo += "\n     -  Last Name";
}
if(document.form.Address1.value == "") {
missinginfo += "\n     -  Address line 1";
}
if(document.form.Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}
if(document.form.Email.value == "") {
missinginfo += "\n     -  Email";
}
if(document.form.RequestBrochure.value == "") {
missinginfo += "\n     -  Request Brochure";
}

if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checkbrochureFields()"


function checkAmusePermitFields() {
missinginfo = "";

if (document.form.M_Title_Of_Body.value == "" && document.form.M_Firstname.value == "" && document.form.M_Surname.value == "") {
missinginfo += "\n     -  Title of Body   OR    Firstname and Surname";
}
if(document.form.M_Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}
if(document.form.email.value == "") {
missinginfo += "\n     -  Email";
}
if(document.form.M_Res_Address.value == "") {
missinginfo += "\n     -  Residential Address";
}
if(document.form.M_Res_Town.value == "") {
missinginfo += "\n     -  Town (Residential)";
}
if(document.form.M_Prem_Address.value == "") {
missinginfo += "\n     -  Address of Premises";
}
if(document.form.M_Prem_Town.value == "") {
missinginfo += "\n     -  Town (Premises)";
}


if(document.form.M_Owner_Firstname.value == "") {
missinginfo += "\n     -  Owner of Premises - Firstname";
}
if(document.form.M_Owner_Surname.value == "") {
missinginfo += "\n     -  Owner of Premises - Surname";
}
if(document.form.M_Owner_Address.value == "") {
missinginfo += "\n     -  Address of Owner";
}
if(document.form.M_Owner_Town.value == "") {
missinginfo += "\n     -  Town (Address of Owner)";
}


if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else 
	 if (document.form.M_chkConfirm.checked == false )
	{
		alert('Tick box to confirm you have read and understood our declaration.');
		return false;
	}else
		return confirm('About to transfer you to WorldPay for secure payment\n\nContinue?') ;
	 
}
//onsubmit="return checkAmusePermitFields()"


function checkCimenaFields() {
missinginfo = "";


if (document.form.M_Firstname.value == "") {
missinginfo += "\n     -  First Name";
}
if (document.form.M_Surname.value == "") {
missinginfo += "\n     -  Surname";
}
if(document.form.M_Address.value == "") {
missinginfo += "\n     -  Premises Address";
}
if(document.form.M_Town.value == "") {
missinginfo += "\n     -  Premises Town";
}
if(document.form.M_Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}
if (document.form.email.value == "") {
missinginfo += "\n     -  Email";
}
if(document.form.M_Premises_Address.value == "") {
missinginfo += "\n     -  Premises Address";
}
if(document.form.M_Premises_Name.value == "") {
missinginfo += "\n     -  Premises Name";
}
if(document.form.M_Premises_Town.value == "") {
missinginfo += "\n     -  Premises Town";
}
if(document.form.M_Premises_Telephone.value == "") {
missinginfo += "\n     -  Premises Telephone";
}
if(document.form.M_transfer_Licence[1].checked == true && document.form.M_Total_Amount.value == "") {
missinginfo += "\n     -  Please choose Duration of licence so that we can calculate your fee";
}



if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else 
	{
	document.form.amount.value = document.form.M_Total_Amount.value;
	
	 if (document.form.M_chkConfirm.checked == false )
	{
		alert('Tick box to confirm you have read and understood our declaration.');
		return false;
	}else
		return confirm('About to transfer you to WorldPay for secure payment\n\nContinue?') ;
	
	
	}
}
onsubmit="return checkCimenaFields()"

function DisableCinemafields() {
	document.form.M_Licence_Duration.disabled = true;
	document.form.M_Licence_Duration.className = 'disable';
	document.form.M_Total_Amount.value = '#qGettransferFee.ServiceFee_Price#';
	
}

function EnableCinemafields() {
	document.form.M_Licence_Duration.disabled = false;
	document.form.M_Licence_Duration.className = 'enable';
	document.form.M_Total_Amount.value = '';
	
}


function checkDogSTDFields() {
missinginfo = "";

if (document.form.M_Firstname.value == "") {
missinginfo += "\n     -  First Name";
}
if (document.form.M_Surname.value == "") {
missinginfo += "\n     -  Surname";
}
if(document.form.M_Address.value == "") {
missinginfo += "\n     -  Applicant Address";
}
if(document.form.M_Town.value == "") {
missinginfo += "\n     -  Town";
}
if(document.form.M_Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}
if(document.form.email.value == "") {
missinginfo += "\n     -  Email";
}

if(document.form.M_Age.value == "") {
missinginfo += "\n     -  Age";
}
if(document.form.M_Colour.value == "") {
missinginfo += "\n     -  Colour";
}
if(document.form.M_Breed.value == "") {
missinginfo += "\n     -  Breed";
}
if(document.form.M_Name.value == "") {
missinginfo += "\n     -  Name";
}


if(document.form.M_Total_Amount.value == "") {
missinginfo += "\n     -  Before you submit to Worldpay we need to calculate your Fee, so please enter your Number of litres of Petrol and Petroleum Mix (if applicable) into the appropriate boxes then click Calculate Your Fee";
}



if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else 
	{
	document.form.amount.value = document.form.M_Total_Amount.value;
	return confirm('About to transfer you to WorldPay for secure payment\n\nContinue?') ;
	}
}
onsubmit="return checkDogSTDFields()"

function SetDogPrice(ThisVal) {
	document.form.amount.value = ThisVal;
	document.form.M_Total_Amount.value = ThisVal;
}

function checkDogBlockFields() {
missinginfo = "";

if (document.form.App_Firstname.value == "") {
missinginfo += "\n     -  Firstname";
}
if (document.form.App_Surname.value == "") {
missinginfo += "\n     -  Surname";
}
if(document.form.App_Address.value == "") {
missinginfo += "\n     -  Address";
}
if(document.form.App_Town.value == "") {
missinginfo += "\n     -  Town";
}
if(document.form.App_Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}
if(document.form.email.value == "") {
missinginfo += "\n     -  Email";
}

if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checkDogBlockFields()"

function checkEntFields() {
missinginfo = "";

if (document.form.Firstname.value == "") {
missinginfo += "\n     -  First Name";
}
if (document.form.Surname.value == "") {
missinginfo += "\n     -  Surname";
}
if(document.form.Address.value == "") {
missinginfo += "\n     -  Address";
}
if(document.form.Town.value == "") {
missinginfo += "\n     -  Postcode";
}
if (document.form.email.value == "") {
missinginfo += "\n     -  Email";
}
if(document.form.Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}

if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checkEntFields()"

function checkLotteryFields() {
missinginfo = "";


if(document.form.M_Firstname.value == "") {
missinginfo += "\n     -  Firstname";
}
if(document.form.M_Surname.value == "") {
missinginfo += "\n     -  Surname";
}
if(document.form.M_Society.value == "") {
missinginfo += "\n     -  Full Name of Society";
}

if(document.form.M_Address.value == "") {
missinginfo += "\n     -  Address of Society";
}
if(document.form.M_Town.value == "") {
missinginfo += "\n     -  Town ";
}
if(document.form.email.value == "") {
missinginfo += "\n     -  Email";
}
if(document.form.M_Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}

if (document.form.M_chkA.checked == false && document.form.M_chkB.checked == false && document.form.M_chkC.checked == false) {
missinginfo += "\n     -  Tick 1 of the boxes for purpose of society";
}

if (document.form.M_chkC.checked == true && document.form.M_Details_ForC.value == "") {
missinginfo += "\n     -  You ticked c) for purpose of society, so please give details for which society is established and conducted";
}


if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else 
		return confirm('About to transfer you to WorldPay for secure payment\n\nContinue?') ;
	 
}
//onsubmit="return checkLotteryFields()"

function checkPetrolFields() {
missinginfo = "";

if (document.form.M_Premises.value == "") {
missinginfo += "\n     -  Premises Name";
}
if (document.form.M_Firstname.value == "") {
missinginfo += "\n     -  First Name";
}
if (document.form.M_Surname.value == "") {
missinginfo += "\n     -  Surname";
}
if(document.form.M_Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}
if(document.form.email.value == "") {
missinginfo += "\n     -  Email";
}
if(document.form.M_Premises_Address.value == "") {
missinginfo += "\n     -  Premises Address";
}
if(document.form.M_Premises_Town.value == "") {
missinginfo += "\n     -  Premises Town";
}
if(document.form.M_App_Address.value == "") {
missinginfo += "\n     -  Applicants Address";
}
if(document.form.M_App_Town.value == "") {
missinginfo += "\n     -  Applicants Town";
}
if(document.form.M_Total_Amount.value == "") {
missinginfo += "\n     -  Before you submit to Worldpay we need to calculate your Fee, so please enter your Number of litres of Petrol and Petroleum Mix (if applicable) into the appropriate boxes then click Calculate Your Fee";
}

if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else 
	{
	document.form.amount.value = document.form.M_Total_Amount.value;
	return confirm('About to transfer you to WorldPay for secure payment\n\nContinue?') ;
	}
}
onsubmit="return checkPetrolFields()"

function DisablePetrolfields() {
	document.form.M_Num_Petrol.disabled = true;
	document.form.M_Num_Petrol_Mix.disabled = true;
	document.form.btnCalc.disabled = true;
	document.form.M_Num_Petrol.className = 'disable';
	document.form.M_Num_Petrol_Mix.className = 'disable';
	document.form.M_Total_Litres.value = '';
	document.form.M_Num_Petrol.value = '';
	document.form.M_Num_Petrol_Mix.value = '';
	document.form.M_Total_Amount.value = '#qGettransferFee.ServiceFee_Price#';
	
}

function EnablePetrolfields() {
	document.form.M_Num_Petrol.disabled = false;
	document.form.M_Num_Petrol_Mix.disabled = false;
	document.form.btnCalc.disabled = false;
	document.form.M_Num_Petrol.className = 'enable';
	document.form.M_Num_Petrol_Mix.className = 'enable';
	document.form.M_Total_Amount.value = '';
	
}
function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }



function CalcTotal() {
	var missingvals = "";
	if (document.form.M_Num_Petrol.value == "")
		alert('Please Enter Number of litres of petrol');
	else
	 {
			if (IsNumeric(document.form.M_Num_Petrol.value) == false || IsNumeric(document.form.M_Num_Petrol_Mix.value) == false && document.form.M_Num_Petrol_Mix.value != "")
				{
				alert('Please enter only numeric values in the litres of petrol field');
				}
			else
			
			{
				
				var value1 = eval(document.form.M_Num_Petrol.value);
				var value2 = eval(document.form.M_Num_Petrol_Mix.value);
				
				if (document.form.M_Num_Petrol.value == "" || document.form.M_Num_Petrol.value < 1) {
				alert('Please Enter Number of litres of petrol');
				}
				else 
					
					{
					if (document.form.M_Num_Petrol_Mix.value == "") var value2 = 0;
					
					
					var tot1 = eval(value1 + value2);
					document.form.M_Total_Litres.value = tot1;
					if (tot1 < 2500) document.form.M_Total_Amount.value = "40.00";
					if (tot1 >= 2500 && tot1 < 50000) document.form.M_Total_Amount.value = "55.00";
					if (tot1 >= 50000) document.form.M_Total_Amount.value = "115.00";
					}
			}
	}
		
}

function checkHairFields() {
missinginfo = "";

if (document.form.App_Firstname.value == "") {
missinginfo += "\n     -  Applicants First Name";
}
if (document.form.App_Surname.value == "") {
missinginfo += "\n     -  Applicants Surname";
}
if(document.form.App_Address.value == "") {
missinginfo += "\n     -  Applicants Address";
}
if(document.form.App_Town.value == "") {
missinginfo += "\n     -  Applicants Town";
}
if(document.form.App_Telephone.value == "") {
missinginfo += "\n     -  Applicants Telephone";
}
if(document.form.email.value == "") {
missinginfo += "\n     -  Applicants Email";
}

if(document.form.Premises_Name.value == "") {
missinginfo += "\n     -  Premises Name";
}
if(document.form.Premises_Address.value == "") {
missinginfo += "\n     -  Premises Address";
}
if(document.form.Premises_Town.value == "") {
missinginfo += "\n     -  Premises Town";
}
if(document.form.Premises_Telephone.value == "") {
missinginfo += "\n     -  Premises Telephone";
}
if(document.form.Applicant_Interest[1].checked && document.form.Owner_Firstname.value == "") {
missinginfo += "\n     -  Owner Firstname";
}
if(document.form.Applicant_Interest[1].checked && document.form.Owner_Surname.value == "") {
missinginfo += "\n     -  Owner Surname";
}
if(document.form.Applicant_Interest[1].checked && document.form.Owner_Address.value == "") {
missinginfo += "\n     -  Owner Address";
}
if(document.form.Applicant_Interest[1].checked && document.form.Owner_Town.value == "") {
missinginfo += "\n     -  Owner Town";
}


if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checkHairFields()"

function DisableHairfields() {
	document.form.Owner_Firstname.disabled = true;
	document.form.Owner_Surname.disabled = true;
	document.form.Owner_Address.disabled = true;
	document.form.Owner_Town.disabled = true;
	document.form.Owner_Postcode.disabled = true;
	
	document.form.Owner_Firstname.className = 'disable';
	document.form.Owner_Surname.className = 'disable';
	document.form.Owner_Address.className = 'disable';
	document.form.Owner_Town.className = 'disable';
	document.form.Owner_Postcode.className = 'disable';
	
	
}

function EnableHairfields() {
	document.form.Owner_Firstname.disabled = false;
	document.form.Owner_Surname.disabled = false;
	document.form.Owner_Address.disabled = false;
	document.form.Owner_Town.disabled = false;
	document.form.Owner_Postcode.disabled = false;
	
	document.form.Owner_Firstname.className = 'enable';
	document.form.Owner_Surname.className = 'enable';
	document.form.Owner_Address.className = 'enable';
	document.form.Owner_Town.className = 'enable';
	document.form.Owner_Postcode.className = 'enable';
	
}

function checkArdBrochureFields() {
missinginfo = "";

if (document.form.FirstName.value == "") {
missinginfo += "\n     -  First Name";
}
if (document.form.LastName.value == "") {
missinginfo += "\n     -  Last Name";
}
if(document.form.Address1.value == "") {
missinginfo += "\n     -  Address line 1";
}
if(document.form.Telephone.value == "") {
missinginfo += "\n     -  Telephone";
}
if(document.form.Email.value == "") {
missinginfo += "\n     -  Email";
}
if(document.form.RequestBrochure.value == "") {
missinginfo += "\n     -  Request Brochure";
}

if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checkArdBrochureFields()"

function checkDirectoryFields() {
missinginfo = "";

if(document.form.Type_Id.value == "") {
missinginfo += "\n     -  Business Category";
}
if (document.form.Comp_Name.value == "") {
missinginfo += "\n     -  Business Name";
}
if(document.form.Address1.value == "") {
missinginfo += "\n     -  Address line 1";
}
if(document.form.Address3.value == "") {
missinginfo += "\n     -  Town";
}


if (missinginfo != "") {
missinginfo ="You failed to correctly fill in the following details:\n" +
missinginfo + "\n_________________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
onsubmit="return checkDirectoryFields()"