/////////////////////////////////
function limitText(limitField, limitNum) {
    if (limitField.value.length > limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    } 
	else
		{
		document.forms.bookingForm.whatleft.value = limitNum - limitField.value.length;
		}
}
function limitText1a(limitField, limitNum) {
    if (limitField.value.length > limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    } 
	else
		{
		document.forms.accommodationForm.whatleft1.value = limitNum - limitField.value.length;
		}
}
function limitText2a(limitField, limitNum) {
    if (limitField.value.length > limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    } 
	else
		{
		document.forms.accommodationForm.whatleft2.value = limitNum - limitField.value.length;
		}
	
}
function limitText1(limitField, limitNum) {
    if (limitField.value.length > limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    } 
	else
		{
		document.forms.tourForm.whatleft1t.value = limitNum - limitField.value.length;
		}
}
function limitText2(limitField, limitNum) {
    if (limitField.value.length > limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    } 
	else
		{
		document.forms.tourForm.whatleft2t.value = limitNum - limitField.value.length;
		}
	
}
//////////////////////////////////////////

function validate_mail()
	{
	if (document.forms.bookingForm.Full_name.value == "")
		{
		alert("Please enter your name");
		document.forms.bookingForm.Full_name.focus();
		return false;
		}
	var checkEmail = document.forms.bookingForm.Email.value;
	if (document.forms.bookingForm.Email.value == "")
		{
		alert("Please enter your Email address");
		document.forms.bookingForm.Email.focus();
		return false;
		}
	if (document.forms.bookingForm.Email.value.length < 6)
  {
    alert("The Email address you entered is invalid");
    document.forms.bookingForm.Email.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzfSOZsozYÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@_-.";
  var checkStr = document.forms.bookingForm.Email.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and \"@_-.\" characters in the Email field.");
    document.forms.bookingForm.Email.focus();
    return (false);
  }

 if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))
{alert("You have entered an invalid email address. Please try again.");
document.forms.bookingForm.Email.focus();
return false;
} 
	if (document.forms.bookingForm.Confirm_email.value =="")
		{
		alert("Please confirm your Email address");
		document.forms.bookingForm.Confirm_email.focus();
		return false;
		}
	if (document.forms.bookingForm.Email.value != document.forms.bookingForm.Confirm_email.value)
		{
		alert("Your Email addresses do not match");
		document.forms.bookingForm.Email.focus();
		return false;
		}
		
	if (document.forms.bookingForm.Email.value.length < 6)
  {
    alert("The Email address you entered is invalid");
    document.forms.bookingForm.Email.focus();
    return (false);
  }
if (document.forms.bookingForm.Country_of_origin.selectedIndex < 1)
		{
		alert("Please choose your country of origin");
		document.forms.bookingForm.Country_of_origin.focus();
		return false;
		}
if (document.forms.bookingForm.No_of_adults.selectedIndex < 1)
		{
		alert("Please select the number of adults");
		document.forms.bookingForm.No_of_adults.focus();
		return false;
		}
if (document.forms.bookingForm.Children_0_to_12_years.selectedIndex < 1)
		{
		alert("Please select the number of children \nbelow 13 years old \nSelect \"0\" for none");
		document.forms.bookingForm.Children_0_to_12_years.focus();
		return false;
		}
	if (document.forms.bookingForm.Children_13_to_16_years.selectedIndex < 1)
		{
		alert("Please select the number of children \nbetween 13 and 16 years old \nSelect \"0\" for none");
		document.forms.bookingForm.Children_13_to_16_years.focus();
		return false;
		}
if (document.forms.bookingForm.Arrival_date.value == "Arrival")
		{
		alert("Please enter your date of arrival");
		document.forms.bookingForm.Arrival_date.focus();
		return false;
		}
if (document.forms.bookingForm.Departure_date.value == "Departure")
		{
		alert("Please enter your date of Departure");
		document.forms.bookingForm.Departure_date.focus();
		return false;
		}
		

		
		
		
if (document.forms.bookingForm.check.value == "")
		{
		alert("Please enter the red number");
		document.forms.bookingForm.check.focus();
		return false;
		}
	}
/////////////////////////////////////////
function validate_book()
	{
	if (document.forms.bookingForm2.Full_name.value == "")
		{
		alert("Please enter your name");
		document.forms.bookingForm2.Full_name.focus();
		return false;
		}
	var checkEmail = document.forms.bookingForm2.Email.value;
	if (document.forms.bookingForm2.Email.value == "")
		{
		alert("Please enter your Email address");
		document.forms.bookingForm2.Email.focus();
		return false;
		}
	if (document.forms.bookingForm2.Email.value.length < 6)
  {
    alert("The Email address you entered is invalid");
    document.forms.bookingForm2.Email.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzfSOZsozYÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@_-.";
  var checkStr = document.forms.bookingForm2.Email.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and \"@_-.\" characters in the Email field.");
    document.forms.bookingForm2.Email.focus();
    return (false);
  }

 if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))
{alert("You have entered an invalid email address. Please try again.");
document.forms.bookingForm2.Email.focus();
return false;
} 
	if (document.forms.bookingForm2.Confirm_email.value =="")
		{
		alert("Please confirm your Email address");
		document.forms.bookingForm2.Confirm_email.focus();
		return false;
		}
	if (document.forms.bookingForm2.Email.value != document.forms.bookingForm2.Confirm_email.value)
		{
		alert("Your Email addresses do not match");
		document.forms.bookingForm2.Email.focus();
		return false;
		}
		
	if (document.forms.bookingForm2.Email.value.length < 6)
  {
    alert("The Email address you entered is invalid");
    document.forms.bookingForm2.Email.focus();
    return (false);
  }
if (document.forms.bookingForm2.Country_of_origin.selectedIndex < 1)
		{
		alert("Please choose your country of origin");
		document.forms.bookingForm2.Country_of_origin.focus();
		return false;
		}
if (document.forms.bookingForm2.No_of_adults.selectedIndex < 1)
		{
		alert("Please select the number of adults");
		document.forms.bookingForm2.No_of_adults.focus();
		return false;
		}
if (document.forms.bookingForm2.Children_0_to_12_years.selectedIndex < 1)
		{
		alert("Please select the number of children \nbelow 13 years old \nSelect \"0\" for none");
		document.forms.bookingForm2.Children_0_to_12_years.focus();
		return false;
		}
	if (document.forms.bookingForm2.Children_13_to_16_years.selectedIndex < 1)
		{
		alert("Please select the number of children \nbetween 13 and 16 years old \nSelect \"0\" for none");
		document.forms.bookingForm2.Children_13_to_16_years.focus();
		return false;
		}
if (document.forms.bookingForm2.Arrival_date.value == "Arrival")
		{
		alert("Please enter your date of arrival");
		document.forms.bookingForm2.Arrival_date.focus();
		return false;
		}
if (document.forms.bookingForm2.Departure_date.value == "Departure")
		{
		alert("Please enter your date of Departure");
		document.forms.bookingForm2.Departure_date.focus();
		return false;
		}
		

		
		
		
if (document.forms.bookingForm2.check.value == "")
		{
		alert("Please enter the red number");
		document.forms.bookingForm2.check.focus();
		return false;
		}
		
		
		
		
	}	
		
		
/////////////////////////////////////////////////////////////
function validate_accommodation()
	{
	if (document.forms.accommodationForm.Full_name.value == "")
		{
		alert("Please enter your name");
		document.forms.accommodationForm.Full_name.focus();
		return false;
		}
	var checkEmail = document.forms.accommodationForm.Email.value;
	if (document.forms.accommodationForm.Email.value == "")
		{
		alert("Please enter your Email address");
		document.forms.accommodationForm.Email.focus();
		return false;
		}
	if (document.forms.accommodationForm.Email.value.length < 6)
  {
    alert("The Email address you entered is invalid");
    document.forms.accommodationForm.Email.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzfSOZsozYÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@_-.";
  var checkStr = document.forms.accommodationForm.Email.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and \"@_-.\" characters in the Email field.");
    document.forms.accommodationForm.Email.focus();
    return (false);
  }

 if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))
{alert("You have entered an invalid email address. Please try again.");
document.forms.accommodationForm.Email.focus();
return false;
} 
	if (document.forms.accommodationForm.Confirm_email.value =="")
		{
		alert("Please confirm your Email address");
		document.forms.accommodationForm.Confirm_email.focus();
		return false;
		}
	if (document.forms.accommodationForm.Email.value != document.forms.accommodationForm.Confirm_email.value)
		{
		alert("Your Email addresses do not match");
		document.forms.accommodationForm.Email.focus();
		return false;
		}
		
	if (document.forms.accommodationForm.Email.value.length < 6)
  {
    alert("The Email address you entered is invalid");
    document.forms.accommodationForm.Email.focus();
    return (false);
  }
 if (document.forms.accommodationForm.Phone.value =="")
		{
		alert("Please enter your phone number");
		document.forms.accommodationForm.Phone.focus();
		return false;
		}
 if (document.forms.accommodationForm.Country_of_origin.selectedIndex < 1)
		{
		alert("Please choose your country of origin");
		document.forms.accommodationForm.Country_of_origin.focus();
		return false;
		}

if (document.forms.accommodationForm.Total_number_of_people_travelling.selectedIndex < 1)
		{
		alert("Please select the number of peaople");
		document.forms.accommodationForm.Total_number_of_people_travelling.focus();
		return false;
		}
if (document.forms.accommodationForm.Arrival_date.value == "")
		{
		alert("Please enter your date of arrival");
		document.forms.accommodationForm.Arrival_date.focus();
		return false;
		}
if (document.forms.accommodationForm.Departure_date.value == "")
		{
		alert("Please enter your date of Departure");
		document.forms.accommodationForm.Departure_date.focus();
		return false;
		}
if (document.forms.accommodationForm.No_of_nights.value == "")
		{
		alert("Please enter the number of nights");
		document.forms.accommodationForm.No_of_nights.focus();
		return false;
		}
if (document.forms.accommodationForm.Room_type.value == "")
		{
		alert("Please select the room type");
		document.forms.accommodationForm.Room_type.focus();
		return false;
		}
if (document.forms.accommodationForm.Room_category.selectedIndex < 1)
		{
		alert("Please select the room category");
		document.forms.accommodationForm.Room_category.focus();
		return false;
		}
if (document.forms.accommodationForm.Number_of_adults.selectedIndex < 1)
		{
		alert("Please select the number of adults");
		document.forms.accommodationForm.Number_of_adults.focus();
		return false;
		}
	if (document.forms.accommodationForm.Childrens_ages.value == "" && document.forms.accommodationForm.Number_of_children.selectedIndex > 0)
		{
		alert("Please enter the childrens ages");
		document.forms.accommodationForm.Childrens_ages.focus();
		return false;
		}

		
		
		
if (document.forms.accommodationForm.check.value == "")
		{
		alert("Please enter the red number");
		document.forms.accommodationForm.check.focus();
		return false;
		}
		
		
		
		
	}	
////////////////////////////////////////////
function validate_tour()
	{
	if (document.forms.tourForm.Full_name.value == "")
		{
		alert("Please enter your name");
		document.forms.tourForm.Full_name.focus();
		return false;
		}
	var checkEmail = document.forms.tourForm.Email.value;
	if (document.forms.tourForm.Email.value == "")
		{
		alert("Please enter your Email address");
		document.forms.tourForm.Email.focus();
		return false;
		}
	if (document.forms.tourForm.Email.value.length < 6)
  {
    alert("The Email address you entered is invalid");
    document.forms.tourForm.Email.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzfSOZsozYÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@_-.";
  var checkStr = document.forms.tourForm.Email.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and \"@_-.\" characters in the Email field.");
    document.forms.tourForm.Email.focus();
    return (false);
  }

 if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))
{alert("You have entered an invalid email address. Please try again.");
document.forms.tourForm.Email.focus();
return false;
} 
	if (document.forms.tourForm.Confirm_email.value =="")
		{
		alert("Please confirm your Email address");
		document.forms.tourForm.Confirm_email.focus();
		return false;
		}
	if (document.forms.tourForm.Email.value != document.forms.tourForm.Confirm_email.value)
		{
		alert("Your Email addresses do not match");
		document.forms.tourForm.Email.focus();
		return false;
		}
		
	if (document.forms.tourForm.Email.value.length < 6)
  {
    alert("The Email address you entered is invalid");
    document.forms.tourForm.Email.focus();
    return (false);
  }
 if (document.forms.tourForm.Phone.value =="")
		{
		alert("Please enter your phone number");
		document.forms.tourForm.Phone.focus();
		return false;
		}
 if (document.forms.tourForm.Country_of_origin.selectedIndex < 1)
		{
		alert("Please choose your country of origin");
		document.forms.tourForm.Country_of_origin.focus();
		return false;
		}
 if (document.forms.tourForm.Number_of_adults.selectedIndex < 1)
		{
		alert("Please choose the number of adults");
		document.forms.tourForm.Number_of_adults.focus();
		return false;
		}
 if (document.forms.tourForm.Number_of_children.selectedIndex >0 && document.forms.tourForm.Childrens_ages.value == "")
		{
		alert("Please enter the childrens ages");
		document.forms.tourForm.Childrens_ages.focus();
		return false;
		}
 if (document.forms.tourForm.Tour_departure_date.value == "Date")
		{
		alert("Please select the tour departure date");
		document.forms.tourForm.Tour_departure_date.focus();
		return false;
		}
if (document.forms.tourForm.check.value == "")
		{
		alert("Please enter the red number");
		document.forms.tourForm.check.focus();
		return false;
		}
	}

