// JavaScript Document
<!--
      function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57))
            return false;
         return true;
      }
	  
function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Please Enter a valid email address!!")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Please Enter a valid email address!!")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Please Enter a valid email address!!")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Please Enter a valid email address!!")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Please Enter a valid email address!!")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Please Enter a valid email address!!")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Please Enter a valid email address!!")
		    return false
		 }

 		 return true					
	}

function ValidateForm(){
	var ddlDestination=document.bookingform.ddlDestination
	var ddlFlightFrom=document.bookingform.ddlFlightFrom
	var txtContactFirstName=document.bookingform.txtContactFirstName
	var txtContactSurname=document.bookingform.txtContactSurname
	var txtContactNumber=document.bookingform.txtContactNumber
	var txtContactEmail=document.bookingform.txtContactEmail
	var txtPreferredHotel=document.bookingform.txtPreferredHotel

		if ((txtPreferredHotel.value==null)||(txtPreferredHotel.value==""))
	{
		alert("Please enter your preferred hotel/resort!!")
		txtPreferredHotel.focus()
		return false;
	}
	   	if ((ddlDestination.value==null)||(ddlDestination.value==""))
	{
		alert("Please select your final destination!!")
		ddlDestination.focus()
		return false;
	}
	   	if ((ddlFlightFrom.value==null)||(ddlFlightFrom.value==""))
	{
		alert("Please enter where your flight is from!!")
		ddlFlightFrom.focus()
		return false;
	}
	    if ((txtContactFirstName.value==null)||(txtContactFirstName.value==""))
	{
		alert("Please enter your first name!!")
		txtContactFirstName.focus()
		return false;
	}	
    	if ((txtContactSurname.value==null)||(txtContactSurname.value==""))
	{
		alert("Please enter your surname!!")
		txtContactSurname.focus()
		return false;
	}
		if ((txtContactNumber.value==null)||(txtContactNumber.value==""))
	{
		alert("Please enter your contact number!!")
		txtContactNumber.focus()
		return false;
	}	
		if ((txtContactEmail.value==null)||(txtContactEmail.value==""))
	{
		alert("Please enter a valid email address!!")
		txtContactEmail.focus()
		return false;
	}	
	    if (echeck(txtContactEmail.value)==false)
	{
		txtContactEmail.value=""
		txtContactEmail.focus()
		return false;
	}
	return true;
}

function ValidateSubscription(){
	var firstname=document.subscriptionform.firstname
	var surname=document.subscriptionform.surname
	var email=document.subscriptionform.email
	var country=document.subscriptionform.country

	    if ((firstname.value==null)||(firstname.value==""))
	{
		alert("Please enter your first name!!")
		firstname.focus()
		return false;
	}	
    	if ((surname.value==null)||(surname.value==""))
	{
		alert("Please enter your surname!!")
		surname.focus()
		return false;
	}
		if ((email.value==null)||(email.value==""))
	{
		alert("Please enter a valid email address!!")
		email.focus()
		return false;
	}	
	if ((country.value==null)||(country.value==""))
	{
		alert("Please select your country!!")
		country.focus()
		return false;
	}

	    if (echeck(email.value)==false)
	{
		email.value=""
		email.focus()
		return false;
	}
	return true;
}


function ValidateNotices(){
	var firstname=document.notices.firstname
	var surname=document.notices.surname
	var email=document.notices.email
	var country=document.notices.country
	var notice=document.notices.notice
	var accept=document.notices.accept

if ((firstname.value==null)||(firstname.value==""))
	{
		alert("Please enter your first name!!")
		firstname.focus()
		return false;
	}	
    	if ((surname.value==null)||(surname.value==""))
	{
		alert("Please enter your surname!!")
		surname.focus()
		return false;
	}
		if ((email.value==null)||(email.value==""))
	{
		alert("Please enter a valid email address!!")
		email.focus()
		return false;
	}	
	if ((country.value==null)||(country.value==""))
	{
		alert("Please select your country!!")
		country.focus()
		return false;
	}
	if ((notice.value==null)||(notice.value==""))
	{
		alert("Please enter a notice!!")
		notice.focus()
		return false;
	}
		if ((accept.value==null)||(accept.value==""))
	{
		alert("Please accept the terms to proceed!!")
		accept.focus()
		return false;
	}
	    if (echeck(email.value)==false)
	{
		email.value=""
		email.focus()
		return false;
	}
	
	return true;
}


// -->

