/* - - - - - - - - - - - - - - - - - - - - - - -
 JavaScript
 19 July 2005 14:37:20
 HAPedit 3.0.11.102
 - - - - - - - - - - - - - - - - - - - - - - - */

function checkform()
{
         if (document.frmContactus.chkSalesContact[0].checked)
         {
			if (document.frmContactus.optSalesPerson.value == "none")
			{
				alert("Please select the sales person that contacted you.");
				document.frmContactus.optSalesPerson.focus();
				return false;
			}
			if (document.frmContactus.optSalesCallPeriod.value == "none")
			{
				alert("Please select the approximate time you were speaking with "+document.frmContactus.optSalesPerson.value+".");
				document.frmContactus.optSalesCallPeriod.focus();
				return false;
			}
		 }
         if (document.frmContactus.agentname.value == "")
         {
            alert("Please enter your company name.");
            document.frmContactus.agentname.focus();
            return false;
         }
         var agentname = eval('document.frmContactus.agentname.value');
         if (agentname.length < 2)
         {
			alert("Please enter your complete company name.");
			document.frmContactus.agentname.focus();
			return false;
		 }
         if (document.frmContactus.address1.value == "")
         {
            alert("Please enter your address.");
            document.frmContactus.address1.focus();
            return false;
         }
         if (document.frmContactus.town.value == "")
         {
            alert("Please enter the town your company is situated.");
            document.frmContactus.town.focus();
            return false;
         }
         if (document.frmContactus.county.value == "")
         {
            alert("Please enter the county your company is situated.");
            document.frmContactus.county.focus();
            return false;
         }
         if (document.frmContactus.postcode.value == "")
         {
            alert("Please enter your postcode.");
            document.frmContactus.postcode.focus();
            return false;
         }
         
         if (document.frmContactus.telno.value == "")
         {
            alert("Please enter your telephone number.");
            document.frmContactus.telno.focus();
            return false;
         }
         if (document.frmContactus.consort.value == "")
         {
            alert("Please select a consortium.");
            document.frmContactus.consort.focus();
            return false;
         }
         if ((document.frmContactus.consort.value == "") && (document.frmContactus.other.value == ""))
         {
            alert("Please specify the consortium.");
            document.frmContactus.other.focus();
            return false;
         }

         if (document.frmContactus.email.value == "")
         {
            alert("Please enter your email address.");
            document.frmContactus.email.focus();
            return false;
         }
         if (document.frmContactus.contactname.value == "")
         {
            alert("Please enter a contact name.");
            document.frmContactus.contactname.focus();
            return false;
         }
         if (document.frmContactus.position.value == "")
         {
            alert("Please enter your position in the company.");
            document.frmContactus.position.focus();
            return false;
         }
         if (document.frmContactus.net.value == "")
         {
            alert("Please enter your net annual insurance turnover");
            document.frmContactus.net.focus();
            return false;
         }

         if (document.frmContactus.projected.value == "")
         {
            alert("Please enter your projected annual insurance turnover.");
            document.frmContactus.projected.focus();
            return false;
         }
         if (document.frmContactus.currentsupplier.value == "")
         {
            alert("Please enter your current supplier.");
            document.frmContactus.currentsupplier.focus();
            return false;
         }
         if (document.frmContactus.period.value == "")
         {
            alert("Please enter the period you are with your current supplier.");
            document.frmContactus.period.focus();
            return false;
         }
         if (document.frmContactus.DateStart_d.value == "0")
         {
            alert("Please complete your current renewal date");
            document.frmContactus.DateStart_d.focus();
            return false;
         }
         if (document.frmContactus.DateStart_M.value == "0")
         {
            alert("Please complete your current renewal date");
            document.frmContactus.DateStart_M.focus();
            return false;
         }
         if (document.frmContactus.DateStart_Y.value == "-")
         {
            alert("Please complete your current renewal date");
            document.frmContactus.DateStart_Y.focus();
            return false;
         }
         /* if (document.frmContactus.latebooking.value == "")
         {
            alert("Please enter the amount of late bookings.");
            document.frmContactus.latebooking.focus();
            return false;
         }
         if (document.frmContactus.tailormade.value == "")
         {
            alert("Please enter the amount of tailor made bookings.");
            document.frmContactus.tailormade.focus();
            return false;
         }
         if (document.frmContactus.flightonly.value == "")
         {
            alert("Please enter the amount of flight only bookings.");
            document.frmContactus.flightonly.focus();
            return false;
         }
         if (document.frmContactus.cruise.value == "")
         {
            alert("Please enter the amount of cruise bookings.");
            document.frmContactus.cruise.focus();
            return false;
         }
         if (document.frmContactus.package.value == "")
         {
            alert("Please enter the amount of package bookings.");
            document.frmContactus.package.focus();
            return false;
         }
         if (document.frmContactus.businesstravel.value == "")
         {
            alert("Please enter the amount of business travel bookings.");
            document.frmContactus.businesstravel.focus();
            return false;
         }
         if (document.frmContactus.weekend.value == "")
         {
            alert("Please enter the amount of weekend travel bookings.");
            document.frmContactus.weekend.focus();
            return false;
         }
         if (document.frmContactus.othertype.value == "")
         {
            alert("Please enter the amount of other types of bookings.");
            document.frmContactus.othertype.focus();
            return false;
         }
         if (document.frmContactus.worldwide.value == "")
         {
            alert("Please enter the amount of worldwide (Excl USA) bookings recieved.");
            document.frmContactus.worldwide.focus();
            return false;
         }
         if (document.frmContactus.ww_usa.value == "")
         {
            alert("Please enter the amount of worldwide (Excl USA) bookings recieved.");
            document.frmContactus.ww_usa.focus();
            return false;
         }
         if (document.frmContactus.singletrip.value == "")
         {
            alert("Please enter the amount of single trip bookings.");
            document.frmContactus.singletrip.focus();
            return false;
         }
         if (document.frmContactus.multitrip.value == "")
         {
            alert("Please enter the amount of multi trip bookings.");
            document.frmContactus.multitrip.focus();
            return false;
         }
         if (document.frmContactus.bptrip.value == "")
         {
            alert("Please enter the amount of Backpacker/Longstay bookings.");
            document.frmContactus.bptrip.focus();
            return false;
         }
         if (document.frmContactus.under60.value == "")
         {
            alert("Please enter the amount of individuals booked under 60.");
            document.frmContactus.under60.focus();
            return false;
         }
         if (document.frmContactus.under80.value == "")
         {
            alert("Please enter the amount of individuals booked between 70 and 80.");
            document.frmContactus.under80.focus();
            return false;
         }
         if (document.frmContactus.under69.value == "")
         {
            alert("Please enter the amount of individuals booked between 66 and 69.");
            document.frmContactus.under69.focus();
            return false;
         }
         if (document.frmContactus.over81.value == "")
         {
            alert("Please enter the amount of individuals booked over the age of 80");
            document.frmContactus.over81.focus();
            return false;
         }   */
         if (!document.frmContactus.declaration.checked)
         {
            alert("Please tick to declare that you are happy with information entered.");
            document.frmContactus.declaration.focus();
            return false;
         }
         return true;
}

function checkformbroker()
{
         
         /*if (document.frmContactus.chkSalesContact[0].checked)
         {
			if (document.frmContactus.optSalesPerson.value == "none")
			{
				alert("Please select the sales person that contacted you.");
				document.frmContactus.optSalesPerson.focus();
				return false;
			}
			if (document.frmContactus.optSalesCallPeriod.value == "none")
			{
				alert("Please select the approximate time you were speaking with "+document.frmContactus.optSalesPerson.value+".");
				document.frmContactus.optSalesCallPeriod.focus();
				return false;
			}
		 }*/
         if (document.frmContactus.agentname.value == "")
         {
            alert("Please enter your company name.");
            document.frmContactus.agentname.focus();
            return false;
         }
         var agentname = eval('document.frmContactus.agentname.value');
         if (agentname.length < 2)
         {
			alert("Please enter your complete company name.");
			document.frmContactus.agentname.focus();
			return false;
		 }
         if (document.frmContactus.address1.value == "")
         {
            alert("Please enter your address.");
            document.frmContactus.address1.focus();
            return false;
         }
         if (document.frmContactus.town.value == "")
         {
            alert("Please enter the town your company is situated.");
            document.frmContactus.town.focus();
            return false;
         }
         if (document.frmContactus.county.value == "")
         {
            alert("Please enter the county your company is situated.");
            document.frmContactus.county.focus();
            return false;
         }
         if (document.frmContactus.postcode.value == "")
         {
            alert("Please enter your postcode.");
            document.frmContactus.postcode.focus();
            return false;
         }
         
         if (document.frmContactus.telno.value == "")
         {
            alert("Please enter your telephone number.");
            document.frmContactus.telno.focus();
            return false;
         }
         if (document.frmContactus.consort.value == "")
         {
            alert("Please select a consortium.");
            document.frmContactus.consort.focus();
            return false;
         }
         if ((document.frmContactus.consort.value == "") && (document.frmContactus.other.value == ""))
         {
            alert("Please specify the consortium.");
            document.frmContactus.other.focus();
            return false;
         }

         if (document.frmContactus.email.value == "")
         {
            alert("Please enter your email address.");
            document.frmContactus.email.focus();
            return false;
         }
         if (document.frmContactus.contactname.value == "")
         {
            alert("Please enter a contact name.");
            document.frmContactus.contactname.focus();
            return false;
         }
         if (document.frmContactus.position.value == "")
         {
            alert("Please enter your position in the company.");
            document.frmContactus.position.focus();
            return false;
         }
         if (!document.frmContactus.declaration.checked)
         {
            alert("Please tick to declare that you are happy with information entered.");
            document.frmContactus.declaration.focus();
            return false;
         }
         return true;
}


function SelectChannel()
{
  if (document.frmContactus.optCompType.value == "Agency")
  {
      top.location.href = "contact_us_Agency.asp"
  }
  if (document.frmContactus.optCompType.value == "Broker")
  {
      top.location.href = "contact_us_Broker.asp"
  }
}

function checkBrokerAppForm()
{

	 if (document.frmNewAffiliate.txtPosition.value == "")
         {
            alert("Please enter your position in the company.");
            document.frmNewAffiliate.txtPosition.focus();
            return false;
         }
		 if (document.frmNewAffiliate.txtContactName.value == "")
         {
            alert("Please enter a contact name.");
            document.frmNewAffiliate.txtContactName.focus();
            return false;
         }
         if (document.frmNewAffiliate.txtCompName.value == "")
         {
            alert("Please enter your company name.");
            document.frmNewAffiliate.txtCompName.focus();
            return false;
         }
         var txtCompName = eval('document.frmNewAffiliate.txtCompName.value');
         if (txtCompName.length < 2)
         {
			alert("Please enter your complete company name.");
			document.frmNewAffiliate.txtCompName.focus();
			return false;
		 }
		 if (document.frmNewAffiliate.txtBusinessDesc.value == "")
         {
            alert("Please describe your Business.");
            document.frmNewAffiliate.txtBusinessDesc.focus();
            return false;
         }
		  if (document.frmNewAffiliate.txtCompTelNo.value == "")
         {
            alert("Please enter your telephone number.");
            document.frmNewAffiliate.txtCompTelNo.focus();
            return false;
         }
         if (document.frmNewAffiliate.txtAddress.value == "")
         {
            alert("Please enter your address.");
            document.frmNewAffiliate.txtAddress.focus();
            return false;
         }
            
        
         return true;
}
