function validarCart2()
	{
		if($('fName').value=='')
		{
			$('fName').focus(); 
			alert("Please, enter your name.");
			return false;
		}
		if($('lName').value=='')
		{
			$('lName').focus(); 
			alert("Please, enter your last name.");
			return false;
		}
		if($('email').value=='')
		{
			$('email').focus(); 
			alert("Please, enter your e-mail.");
			return false;
		}
		if($('email').value!=$('emailAgain').value)
		{
			$('email').focus(); 
			alert("Please, enter your e-mail Correctly.");
			return false;
		}
		
		if(-1 == $('email').value.indexOf("@"))
		{ 
			$('email').focus(); 
			alert("Your e-mail must have '@' ."); 
			return false; 
		}
		if(-1 != $('email').value.indexOf(","))
		{ 
			$('email').focus(); 
			alert("Your e-mail must not have ',' ."); 
			return false; 
		}
		if(-1 != $('email').value.indexOf("#"))
		{ 
			$('email').focus(); 
			alert("Your e-mail must not have '#' ." ); 
			return false; 
		}
		if(-1 != $('email').value.indexOf("!"))
		{ 
			$('email').focus(); 
			alert("Your e-mail must not have '!' ." ); 
			return false; 
		}
		if(-1 != $('email').value.indexOf(" "))
		{ 
			$('email').focus(); 
			alert("Your e-mail must not have spaces." ); 
			return false; 
		}
		if($('email').value.length == ($('email').value.indexOf("@")+1) )
		{
			$('email').focus();
			alert("Your e-mail must have a domain after the '@'.");
			return false;
		}
		if($('email').value.length == 0)
		{ 
			$('email').focus(); 
			alert("Please enter your email."); 
			return false; 
		}
		if($('mNumber').value=='')
		{
			$('mNumber').focus(); 
			alert("Please, enter your cell phone number.");
			return false;
		}
		if( isNaN($('mNumber').value) ) {
			$('mNumber').focus(); 
			alert("Please, enter only numbers.");
		  	return false;
		}
		if($('hName').value=='')
		{
			$('hName').focus(); 
			alert("Please, enter your hotel.");
			return false;
		}
	$('cartForm').submit();
}

function validarCart3()
	{
		if($('CCfName').value=='')
		{
			$('CCfName').focus(); 
			alert("Please, enter the credit card owner name.");
			return false;
		}
		if($('CClName').value=='')
		{
			$('CClName').focus(); 
			alert("Please, enter the credit card owner last name.");
			return false;
		}
		if($('card_accountNumber').value=='')
		{
			$('card_accountNumber').focus(); 
			alert("Please, enter your credit card number.");
			return false;
		}
		if( isNaN($('card_accountNumber').value) ) {
			$('card_accountNumber').focus(); 
			alert("Please, enter only numbers.");
		  	return false;
		}
		if($('card_security').value=='')
		{
			$('card_security').focus(); 
			alert("Please, enter your credit card security number.");
			return false;
		}
		if( isNaN($('card_security').value) ) {
			$('card_security').focus(); 
			alert("Please, enter only numbers.");
		  	return false;
		}
		if($('address').value=='')
		{
			$('address').focus(); 
			alert("Please, enter your address.");
			return false;
		}
		if($('city').value=='')
		{
			$('city').focus(); 
			alert("Please, enter your city.");
			return false;
		}
		if($('zip').value=='')
		{
			$('zip').focus(); 
			alert("Please, enter your zip code.");
			return false;
		}
		if($('state').value=='')
		{
			$('state').focus(); 
			alert("Please, enter your state.");
			return false;
		}
	$('cartForm').submit();
}

function validarContact()
	{
		if($('firstName').value=='')
		{
			$('firstName').focus(); 
			alert("Please, enter your first name.");
			return false;
		}
		if($('lastName').value=='')
		{
			$('lastName').focus(); 
			alert("Please, enter your last name.");
			return false;
		}
		if($('mail').value=='')
		{
			$('mail').focus(); 
			alert("Please, enter your e-mail.");
			return false;
		}
		if(-1 == $('mail').value.indexOf("@"))
		{ 
			$('mail').focus(); 
			alert("Your e-mail must have an '@' ."); 
			return false; 
		}
		if(-1 != $('mail').value.indexOf(","))
		{ 
			$('mail').focus(); 
			alert("Your e-mail must not have ',' ."); 
			return false; 
		}
		if(-1 != $('mail').value.indexOf("#"))
		{ 
			$('mail').focus(); 
			alert("Your e-mail must not have '#' ." ); 
			return false; 
		}
		if(-1 != $('mail').value.indexOf("!"))
		{ 
			$('mail').focus(); 
			alert("Your e-mail must not have  '!' ." ); 
			return false; 
		}
		if(-1 != $('mail').value.indexOf(" "))
		{ 
			$('mail').focus(); 
			alert("Your e-mail must not have spaces." ); 
			return false; 
		}
		if($('mail').value.length == ($('mail').value.indexOf("@")+1) )
		{
			$('mail').focus();
			alert("Your e-mail must have a domain after the '@'.");
			return false;
		}
		if($('mail').value.length == 0)
		{ 
			$('mail').focus(); 
			alert("Please enter your email."); 
			return false; 
		}
	$('contactForm').submit();
}
function validarTellAFriend()
	{
		if($('yourName').value=='')
		{
			$('yourName').focus(); 
			alert("Please, enter your name.");
			return false;
		}
		if($('yourFriendName').value=='')
		{
			$('yourFriendName').focus(); 
			alert("Please, enter your friend's name.");
			return false;
		}
		if($('yourEmail').value=='')
		{
			$('yourEmail').focus(); 
			alert("Please, enter your e-mail.");
			return false;
		}
		if(-1 == $('yourEmail').value.indexOf("@"))
		{ 
			$('yourEmail').focus(); 
			alert("Your e-mail must have '@' ."); 
			return false; 
		}
		if(-1 != $('yourEmail').value.indexOf(","))
		{ 
			$('yourEmail').focus(); 
			alert("Your e-mail must not have ',' ."); 
			return false; 
		}
		if(-1 != $('yourEmail').value.indexOf("#"))
		{ 
			$('yourEmail').focus(); 
			alert("Your e-mail must not have '#' ." ); 
			return false; 
		}
		if(-1 != $('yourEmail').value.indexOf("!"))
		{ 
			$('yourEmail').focus(); 
			alert("Your e-mail must not have '!' ." ); 
			return false; 
		}
		if(-1 != $('yourEmail').value.indexOf(" "))
		{ 
			$('yourEmail').focus(); 
			alert("Your e-mail must not have spaces." ); 
			return false; 
		}
		if($('yourEmail').value.length == ($('yourEmail').value.indexOf("@")+1) )
		{
			$('yourEmail').focus();
			alert("Your e-mail must have a domain after the '@'.");
			return false;
		}
		if($('yourEmail').value.length == 0)
		{ 
			$('yourEmail').focus(); 
			alert("Please enter your email."); 
			return false; 
		}
		if($('yourFriendEmail').value=='')
		{
			$('yourFriendEmail').focus(); 
			alert("Please, enter your frind's e-mail.");
			return false;
		}
		if(-1 == $('yourFriendEmail').value.indexOf("@"))
		{ 
			$('yourFriendEmail').focus(); 
			alert("Your frind's e-mail must have a '@' ."); 
			return false; 
		}
		if(-1 != $('yourFriendEmail').value.indexOf(","))
		{ 
			$('yourFriendEmail').focus(); 
			alert("Your frind's e-mail must not have ',' ."); 
			return false; 
		}
		if(-1 != $('yourFriendEmail').value.indexOf("#"))
		{ 
			$('yourFriendEmail').focus(); 
			alert("Your frind's e-mail must not have '#' ." ); 
			return false; 
		}
		if(-1 != $('yourFriendEmail').value.indexOf("!"))
		{ 
			$('yourFriendEmail').focus(); 
			alert("Your frind's e-mail must not have '!' ." ); 
			return false; 
		}
		if(-1 != $('yourFriendEmail').value.indexOf(" "))
		{ 
			$('yourFriendEmail').focus(); 
			alert("Your frind's e-mail must not have spaces." ); 
			return false; 
		}
		if($('yourFriendEmail').value.length == ($('yourFriendEmail').value.indexOf("@")+1) )
		{
			$('yourFriendEmail').focus();
			alert("Your frind's e-mail must have a domain after the '@'.");
			return false;
		}
		if($('yourFriendEmail').value.length == 0)
		{ 
			$('yourFriendEmail').focus(); 
			alert("Please enter your friend email."); 
			return false; 
		}
	$('contactForm').submit();
}

function validarAgree()
	{
		if($('agree').checked == false)
		{ 
			alert('Please check the box when you have read the Terms and Conditions.');
			return false; 
		}
	$('cartForm').submit();
}

function validarNewAgent()
	{
		if($('Legal').value=='')
		{
			$('Legal').focus(); 
			alert("Please enter your legal name.");
			return false;
		}
		if($('Agency').value=='')
		{
			$('Agency').focus(); 
			alert("Please enter your comercial name.");
			return false;
		}
		if($('Address').value=='')
		{
			$('Address').focus(); 
			alert("Please enter your main office address.");
			return false;
		}
		if($('City').value=='')
		{
			$('City').focus(); 
			alert("Please enter your main office city.");
			return false;
		}
		if($('Zip').value=='')
		{
			$('Zip').focus(); 
			alert("Please enter your main office address zip code.");
			return false;
		}
		if($('telefono').value=='')
		{
			$('telefono').focus(); 
			alert("Please enter your phone number.");
			return false;
		}
		if( isNaN($('telefono').value) ) {
			$('telefono').focus(); 
			alert("Please, enter only numbers.");
		  	return false;
		}
		if($('Fax').value=='')
		{
			$('Fax').focus(); 
			alert("Please enter your fax number.");
			return false;
		}
		if( isNaN($('Fax').value) ) {
			$('Fax').focus(); 
			alert("Please, enter only numbers.");
		  	return false;
		}
		if($('nombre').value=='')
		{
			$('nombre').focus(); 
			alert("Please enter your general manager.");
			return false;
		}
		if($('mail').value=='')
		{
			$('mail').focus(); 
			alert("Please enter your Manager's E-Mail.");
			return false;
		}
		if(-1 == $('mail').value.indexOf("@"))
		{ 
			$('mail').focus(); 
			alert("Your Manager's E-Mail must have '@' ."); 
			return false; 
		}
		if(-1 != $('mail').value.indexOf(","))
		{ 
			$('mail').focus(); 
			alert("Your Manager's E-Mail must not have ',' ."); 
			return false; 
		}
		if(-1 != $('mail').value.indexOf("#"))
		{ 
			$('mail').focus(); 
			alert("Your Manager's E-Mail must not have '#' ." ); 
			return false; 
		}
		if(-1 != $('mail').value.indexOf("!"))
		{ 
			$('mail').focus(); 
			alert("Your Manager's E-Mail must not have '!' ." ); 
			return false; 
		}
		if(-1 != $('mail').value.indexOf(" "))
		{ 
			$('mail').focus(); 
			alert("Your Manager's E-Mail must not have spaces." ); 
			return false; 
		}
		if($('mail').value.length == ($('mail').value.indexOf("@")+1) )
		{
			$('mail').focus();
			alert("Your Manager's E-Mail must have a domain after the '@'.");
			return false;
		}
		if($('ManagerPhone').value=='')
		{
			$('ManagerPhone').focus(); 
			alert("Please enter your Manager's phone number.");
			return false;
		}
		if( isNaN($('ManagerPhone').value) ) {
			$('ManagerPhone').focus(); 
			alert("Please, enter only numbers.");
		  	return false;
		}
		if($('Reservation').value=='')
		{
			$('Reservation').focus(); 
			alert("Please enter your Reservation Contact .");
			return false;
		}
		if($('mailReservation').value=='')
		{
			$('mailReservation').focus(); 
			alert("Please enter your Reservation E-Mail.");
			return false;
		}
		if(-1 == $('mailReservation').value.indexOf("@"))
		{ 
			$('mailReservation').focus(); 
			alert("The Reservation E-Mail must have '@' ."); 
			return false; 
		}
		if(-1 != $('mailReservation').value.indexOf(","))
		{ 
			$('mailReservation').focus(); 
			alert("The Reservation E-Mail must not have ',' ."); 
			return false; 
		}
		if(-1 != $('mailReservation').value.indexOf("#"))
		{ 
			$('mailReservation').focus(); 
			alert("The Reservation E-Mail must not have '#' ." ); 
			return false; 
		}
		if(-1 != $('mailReservation').value.indexOf("!"))
		{ 
			$('mailReservation').focus(); 
			alert("The Reservation E-Mail must not have '!' ." ); 
			return false; 
		}
		if(-1 != $('mailReservation').value.indexOf(" "))
		{ 
			$('mailReservation').focus(); 
			alert("The Reservation E-Mail must not have spaces." ); 
			return false; 
		}
		if($('mailReservation').value.length == ($('mailReservation').value.indexOf("@")+1) )
		{
			$('mailReservation').focus();
			alert("The Reservation E-Mail must have a domain after the '@'.");
			return false;
		}
		if($('ReservationPhone').value=='')
		{
			$('ReservationPhone').focus(); 
			alert("Please enter your Reservation Phone.");
			return false;
		}
		if( isNaN($('ReservationPhone').value) ) {
			$('ReservationPhone').focus(); 
			alert("Please, enter only numbers.");
		  	return false;
		}
		if($('Payments').value=='')
		{
			$('Payments').focus(); 
			alert("Please enter your Accounting Contact.");
			return false;
		}
		if($('mailPayments').value=='')
		{
			$('mailPayments').focus(); 
			alert("Please enter your Accounting E-Mail.");
			return false;
		}
		if(-1 == $('mailPayments').value.indexOf("@"))
		{ 
			$('mailPayments').focus(); 
			alert("The Accounting E-Mail must have '@' ."); 
			return false; 
		}
		if(-1 != $('mailPayments').value.indexOf(","))
		{ 
			$('mailPayments').focus(); 
			alert("The Accounting E-Mail must not have ',' ."); 
			return false; 
		}
		if(-1 != $('mailPayments').value.indexOf("#"))
		{ 
			$('mailPayments').focus(); 
			alert("The Accounting E-Mail must not have '#' ." ); 
			return false; 
		}
		if(-1 != $('mailPayments').value.indexOf("!"))
		{ 
			$('mailPayments').focus(); 
			alert("The Accounting E-Mail must not have '!' ." ); 
			return false; 
		}
		if(-1 != $('mailPayments').value.indexOf(" "))
		{ 
			$('mailPayments').focus(); 
			alert("The Accounting E-Mail must not have spaces." ); 
			return false; 
		}
		if($('mailPayments').value.length == ($('mailPayments').value.indexOf("@")+1) )
		{
			$('mailPayments').focus();
			alert("The Accounting E-Mail must have a domain after the '@'.");
			return false;
		}
		if($('PaymentsPhone').value=='')
		{
			$('PaymentsPhone').focus(); 
			alert("Please enter your Accounting Phone.");
			return false;
		}
		if( isNaN($('ReservationPhone').value) ) {
			$('ReservationPhone').focus(); 
			alert("Please, enter only numbers.");
		  	return false;
		}
		if($('Website').value=='')
		{
			$('Website').focus(); 
			alert("Please enter your web site.");
			return false;
		}
	$('formSearch').submit();
}

function validaraaa()
{
	if($('number').value=='')
	{
		$('number').focus(); 
		alert("Please, enter your card number.");
		return false;
	}
	if( isNaN($('number').value) ) {
		$('number').focus(); 
		alert("Please, enter only numbers, without spaces.");
		return false;
	}
	$('aaaForm').submit();
}

function validarCartNew(ad,ch,inf,validateTransfer)
{
		var a=1;
		for(a=1;a<ad;a++)
		{
			var name = 'adultName'+a;
			if($(name).value=='')
			{
				$(name).focus(); 
				alert("Please enter the names of all passengers.");
				return false;
			}
		}
		var c=0;
		for(c=0;c<ch;c++)
		{
			var name = 'childName'+c;
			if($(name).value=='')
			{
				$(name).focus(); 
				alert("Please enter the names of all passengers.");
				return false;
			}
		}
		var i=0;
		for(i=0;i<inf;i++)
		{
			var name = 'infantName'+i;
			if($(name).value=='')
			{
				$(name).focus(); 
				alert("Please enter the names of all passengers.");
				return false;
			}
		}

		if($('fName').value=='')
		{
			$('fName').focus(); 
			alert("Please, enter your name.");
			return false;
		}
		if($('lName').value=='')
		{
			$('lName').focus(); 
			alert("Please, enter your last name.");
			return false;
		}
		if($('email').value=='')
		{
			$('email').focus(); 
			alert("Please, enter your e-mail.");
			return false;
		}
		if($('email').value!=$('emailAgain').value)
		{
			$('email').focus(); 
			alert("Please, confirm your e-mail correctly.");
			return false;
		}
		
		if(-1 == $('email').value.indexOf("@"))
		{ 
			$('email').focus(); 
			alert("Your e-mail must have '@' ."); 
			return false; 
		}
		if(-1 != $('email').value.indexOf(","))
		{ 
			$('email').focus(); 
			alert("Your e-mail must not have ',' ."); 
			return false; 
		}
		if(-1 != $('email').value.indexOf("#"))
		{ 
			$('email').focus(); 
			alert("Your e-mail must not have '#' ." ); 
			return false; 
		}
		if(-1 != $('email').value.indexOf("!"))
		{ 
			$('email').focus(); 
			alert("Your e-mail must not have '!' ." ); 
			return false; 
		}
		if(-1 != $('email').value.indexOf(" "))
		{ 
			$('email').focus(); 
			alert("Your e-mail must not have spaces." ); 
			return false; 
		}
		if($('email').value.length == ($('email').value.indexOf("@")+1) )
		{
			$('email').focus();
			alert("Your e-mail must have a domain after the '@'.");
			return false;
		}
		if($('email').value.length == 0)
		{ 
			$('email').focus(); 
			alert("Please enter your email."); 
			return false; 
		}
		if($('mNumber').value=='')
		{
			$('mNumber').focus(); 
			alert("Please, enter your cell phone number.");
			return false;
		}
		if( isNaN($('mNumber').value) ) {
			$('mNumber').focus(); 
			alert("Please, enter only numbers in your cell phone number.");
		  	return false;
		}
		if($('hName').value=='')
		{
			$('hName').focus(); 
			alert("Please, enter your hotel.");
			return false;
		}
		if($('CCfName').value=='')
		{
			$('CCfName').focus(); 
			alert("Please, enter the credit card owner name.");
			return false;
		}
		if($('CClName').value=='')
		{
			$('CClName').focus(); 
			alert("Please, enter the credit card owner last name.");
			return false;
		}
		if($('card_accountNumber').value=='')
		{
			$('card_accountNumber').focus(); 
			alert("Please, enter your credit card number.");
			return false;
		}
		if( isNaN($('card_accountNumber').value) ) {
			$('card_accountNumber').focus(); 
			alert("Please, enter only numbers in your credit card number.");
		  	return false;
		}
		if($('card_security').value=='')
		{
			$('card_security').focus(); 
			alert("Please, enter your credit card security number.");
			return false;
		}
		if( isNaN($('card_security').value) ) {
			$('card_security').focus(); 
			alert("Please, enter only numbers in your credit card security number.");
		  	return false;
		}
		if($('address').value=='')
		{
			$('address').focus(); 
			alert("Please, enter your address.");
			return false;
		}
		if($('city').value=='')
		{
			$('city').focus(); 
			alert("Please, enter your city.");
			return false;
		}
		if($('zip').value=='')
		{
			$('zip').focus(); 
			alert("Please, enter your zip code.");
			return false;
		}
		if($('state').value=='')
		{
			$('state').focus(); 
			alert("Please, enter your state.");
			return false;
		}
		if(validateTransfer==1)
		{
			if($('fAirline').value=='')
			{
				$('fAirline').focus(); 
				alert("Please, enter the airline.");
				return false;
			}
			if($('fNumber').value=='')
			{
				$('fNumber').focus(); 
				alert("Please, enter the flight number.");
				return false;
			}
			if($('fArrivalTime').value=='')
			{
				$('fArrivalTime').focus(); 
				alert("Please, enter the arrival time.");
				return false;
			}
		}
	$('cartForm').submit();
}
