
	function include(filename) {
		var head = document.getElementsByTagName('head')[0];
		
		script = document.createElement('script');
		script.src = filename;
		script.type = 'text/javascript';
		
		head.appendChild(script)
	}
						
	function isFieldEmailAddress(poField, psCaption) {
		re = /.+@.+\..+/ ;

		if (!re.test(poField.value)) {
			alert(psCaption);
			poField.focus();
			return false;
		} else
			return true;
	}

	function isFieldEmpty(psCaption, pField) {
		if (pField.value=="") {
			alert(psCaption + " "+lang["need_to_have_a_value"]);
			pField.focus();
			return false;
		} else
			return true;
	}

	function isFieldNumeric(psCaption, pField) {
	if (isNaN(pField.value)) {
		alert(psCaption);
		pField.focus();
		return false;
	} else
		return true;
  }

  function isMyDDSelected(psCaption, poField) {
  if ( poField.selectedIndex == 0 ) {
			alert(psCaption);
			poField.focus();
    return false;
		} else
			return true;
  }

  function isOptSelected(psCaption, pOpt) {
  	bSelected = false;

  	for (i=0;i<pOpt.length;i++){
  		if (pOpt[i].checked) {
  			bSelected = true;
  			break;
  		}
  	}
  	if (!bSelected) {
  		alert(psCaption);
  		pOpt[0].focus();
  		return false;
  	} else
  	  return true;
  }
	function isListSelected(psCaption, pList) {
		if ( pList.selectedIndex == 0 ) {
			alert(lang["please_select_an_option_from"]+" " + psCaption);
			pList.focus();
			return false;
		} else
			return true;
	}
	function isListSelected2(psCaption, pList) {
		if ( pList.selectedIndex == 0 ) {
			alert(psCaption);
			pList.focus();
			return false;
		} else
			return true;
	}
	
	function isCreditCard(psCaption, pField, ccType)
	{
		var tmp= pField.value;
		var type=get_cctype_value(ccType);
		//window.alert(type);
		if(type=="MASTERCARD" || type=="VISA")
		{
			if (tmp.length != 16)
			{
				alert(psCaption + " "+lang["value_is_incorrect"]);
				pField.focus();
				return false;
			} 
			else
			{
				return true;
			}
		}
		else
		{
			if (tmp.length != 15)
			{
				alert(psCaption + " "+lang["value_is_incorrect"]);
				pField.focus();
				return false;
			} 
			else
			{
				return true;
			}
		}
	}
	
	function get_cctype_value(ccType)
	{
		for (var i=0; i < ccType.length; i++)
   		{
   			if (ccType[i].checked)
      		{
      			return ccType[i].value;
      		}
   		}
	}

	

	function validateform(f)
	{
		
		b = true;
		if (document.getElementById("MM_Sent").value == "true") 
		{  
		b = b && isFieldEmpty(lang["persons_name"], f.name);
		//b = b && isListSelected("Number of Adults ", f.adults); 
		//b = b && isListSelected("Number of Children ", f.children); 
		b = b && isFieldEmpty(lang["email_address"], f.email);
		b = b && isFieldEmailAddress(f.email, lang["enter_valid_email"]);
		b = b && isListSelected2(lang["complete_expected_departure_date"], f.year);
		b = b && isListSelected2(lang["complete_expected_departure_date"], f.month);
		b = b && isListSelected2(lang["complete_expected_departure_date"], f.day);
		b = b && isListSelected(lang["type_of_tour"], f.type); 
		b = b && isFieldEmpty(lang["credit_card_holder_name"], f.ccName);
		b = b && isOptSelected(lang["choose_credit_card_type"], f.ccType);
		b = b && isFieldEmpty(lang["credit_card_holder_number"], f.ccNum);		
		b = b && isFieldNumeric(lang["credit_card_holder_number_must_be_numeric"], f.ccNum);
		b = b && isCreditCard(lang["credit_card_number"], f.ccNum, f.ccType);
		b = b && isMyDDSelected(lang["choose_experiration_month"], f.ccExpM);
		b = b && isMyDDSelected(lang["choose_experiration_year"], f.ccExpY);
		}
		else if (document.getElementById("MM_Sent").value == "disco")
		{  
		b = b && isFieldEmpty(lang["persons_name"], f.name);
		b = b && isListSelected(lang["number_of_adults"], f.adults); 		
		b = b && isFieldEmpty(lang["email_address"], f.email);
		b = b && isFieldEmailAddress(f.email, lang["enter_valid_email"]);
		b = b && isListSelected2(lang["complete_expected_departure_date"], f.year);
		b = b && isListSelected2(lang["complete_expected_departure_date"], f.month);
		b = b && isListSelected2(lang["complete_expected_departure_date"], f.day);
		b = b && isFieldEmpty(lang["credit_card_holder_name"], f.ccName);
		b = b && isOptSelected(lang["choose_credit_card_type"], f.ccType);
		b = b && isFieldEmpty(lang["credit_card_holder_number"], f.ccNum);		
		b = b && isFieldNumeric(lang["credit_card_holder_number_must_be_numeric"], f.ccNum);
		b = b && isCreditCard(lang["credit_card_number"], f.ccNum, f.ccType);
		b = b && isMyDDSelected(lang["choose_experiration_month"], f.ccExpM);
		b = b && isMyDDSelected(lang["choose_experiration_year"], f.ccExpY);
		}
		else if (document.getElementById("MM_Sent").value == "contact" || document.getElementById("MM_Sent").value == "contactd")
		{
			b = b && isFieldEmpty(lang["persons_name"], f.fname); 
			b = b && isFieldEmpty(lang["last_name"], f.lname); 		
			b = b && isFieldEmpty(lang["city"], f.city);
			b = b && isListSelected(lang["country"], f.country);
			b = b && isFieldEmpty(lang["phone"], f.phone);
			b = b && isFieldEmpty(lang["email_address"], f.email);
			b = b && isFieldEmailAddress(f.email, lang["enter_valid_email"]);
		}
		else
		{
			b = b && isListSelected(lang["number_of_adults"]+" ", f.adults);
			b = b && isListSelected(lang["number_of_children"]+" ", f.children);		
			b = b && isListSelected(lang["type_of_tour"], f.type);
		}		
		return b;		
	}


// Funcion Original del Site
function calculate(){
	var totalamount = 0;
	var adultprice = 0;
	var childrenprice = 0;
	var tempadultprice = 0;
	var tempchildrenprice = 0;
	if (document.frmReservations.type.selectedIndex > 0){
		//get price from type of reservation
		if (document.frmReservations.type.selectedIndex==1){
		  adultprice = 155; 
		  childrenprice = 65;
		}       
		if (document.frmReservations.type.selectedIndex==2){
		  adultprice = 105; 
		  childrenprice = 55;
		}       
        //calculate the total amount
        if(document.frmReservations.adults.selectedIndex>0){
          totalamount = totalamount + adultprice*document.frmReservations.adults.options[document.frmReservations.adults.selectedIndex].value; 
          tempadultprice = adultprice*document.frmReservations.adults.options[document.frmReservations.adults.selectedIndex].value; 
        }else{
          totalamount -= tempadultprice;
        }      
        if(document.frmReservations.children.selectedIndex>0){
          totalamount = totalamount + childrenprice*document.frmReservations.children.options[document.frmReservations.children.selectedIndex].value; 
          tempchildrenprice = childrenprice*document.frmReservations.children.options[document.frmReservations.children.selectedIndex].value; 
        }else{
          totalamount -= tempchildrenprice;
        }  
                  
	}else{
	  totalamount = 0;
	} 
    //update amount value
      document.frmReservations.amountt.value = totalamount.toFixed(2);	 
}

///klsdkldkldskl
function populateMonth(objForm, SelectedIndex) 
{
   currentProyect = objForm.year.options[objForm.year.selectedIndex].value;
   var amodelos = [['2010',lang["month"],'0'],['2010',lang["february"],'2010-02'],['2010',lang["march"],'2010-03'],['2011',lang["month"],'0'],['2011',lang["may"],'2011-05'],['2011',lang["july"],'2011-07'],['2011',lang["august"],'2011-08']];

      blankselect(document.frmReservations.month);
	  blankselect(document.frmReservations.day);
      counter = 0;
      for (var i = 0; i < amodelos.length; i++) 
	  {
		if (currentProyect == amodelos[i][0])
		{
      		document.frmReservations.month.options[counter] = new Option(amodelos[i][1]);
	  		document.frmReservations.month.options[counter].value = amodelos[i][2];
	  		counter = counter + 1;
		}
      }
  }
function populateDay(objForm, SelectedIndex) 
{
   currentProyect = objForm.month.options[objForm.month.selectedIndex].value;
   var amodelos = [['2010-02',lang["day"]],['2010-02','9'],['2010-03',lang["day"]],['2010-03','16'],['2011-05',lang["day"]],['2011-05','26'],['2011-07',lang["day"]],['2011-07','26'],['2011-08',lang["day"]],['2011-08','30']];

      blankselect(document.frmReservations.day);
      counter = 0;
      for (var i = 0; i < amodelos.length; i++) 
	  {
		if (currentProyect == amodelos[i][0])
		{
      		document.frmReservations.day.options[counter] = new Option(amodelos[i][1]);
	  		document.frmReservations.day.options[counter].value = amodelos[i][2];
	  		counter = counter + 1;
		}
      }	  
  }
 
function calculate2()
 {	
	var totalamount = 0;	
	if (document.frmReservations.year.selectedIndex != 0 && document.frmReservations.month.selectedIndex != 0 && document.frmReservations.day.selectedIndex != 0 && document.frmReservations.adults.selectedIndex != 0 && document.frmReservations.cabin_category.selectedIndex != 0) 
	{			
			var mestext = document.frmReservations.month.options[document.frmReservations.month.selectedIndex].text;
			var mesnum
			switch (mestext)
			{
				case lang["january"]:
					mesnum= 0;
					break
				case lang["february"]:
					mesnum= 1;
					break
				case lang["march"]:
					mesnum= 2;
					break
				case lang["april"]:
					mesnum= 3;
					break
				case lang["may"]:
					mesnum= 4;
					break
				case lang["june"]:
					mesnum= 5;
					break
				case lang["july"]:
					mesnum= 6;
					break
				case lang["august"]:
					mesnum= 7;
					break
				default:
					mesnum= 11;
			}
			var reservdate=new Date();
  			var today = new Date();
  			var todayplus = new Date();
			var cabin_category = document.frmReservations.cabin_category.selectedIndex;
  			var adultprice = 0;
			reservdate.setFullYear(parseInt(document.frmReservations.year.options[document.frmReservations.year.selectedIndex].text),mesnum,parseInt(document.frmReservations.day.options[document.frmReservations.day.selectedIndex].text))					
			todayplus.setDate(todayplus.getDate()+180)
			var ONE_DAY = 1000 * 60 * 60 * 24;
			
			if (reservdate>todayplus && cabin_category==1)
			{  				
				var discount = 250.00;
				timebefore = (180 + Math.round((reservdate.getTime()-todayplus.getTime())/ONE_DAY)) + " "+lang["days_apply_for_discount"];
				//alert(timebefore);				
				adultprice = 3450 - discount;
			}
			if (reservdate<=todayplus && cabin_category==1)
			{
  				timebefore = (180 + Math.round((reservdate.getTime()-todayplus.getTime())/ONE_DAY)) + " "+lang["days_dont_apply_for_discount"];
				//alert(timebefore);
				adultprice = 3450;				
			}
			if (reservdate>todayplus && cabin_category==2)
			{  				
				var discount = 250.00;
				timebefore = (180 + Math.round((reservdate.getTime()-todayplus.getTime())/ONE_DAY)) + " "+lang["days_apply_for_discount"];
				//alert(timebefore);				
				adultprice = 3700 - discount;
			}
			if (reservdate<=todayplus && cabin_category==2)
			{
  				timebefore = (180 + Math.round((reservdate.getTime()-todayplus.getTime())/ONE_DAY)) + " "+lang["days_dont_apply_for_discount"];
				//alert(timebefore);
				adultprice = 3700;				
			}
			 document.frmReservations.apply.value = timebefore;
			 document.frmReservations.today.value = today;
			 totalamount = adultprice*document.frmReservations.adults.options[document.frmReservations.adults.selectedIndex].value;
		}
		else
		{
  				totalamount = 0;				
		}
		document.frmReservations.price.value = adultprice.toFixed(2);
		document.frmReservations.amountt.value = totalamount.toFixed(2);
  } 

  function populateYearPacific(objForm, SelectedIndex) 
{
   currentProyect = objForm.type.options[objForm.type.selectedIndex].value;
   var amodelos = [['Full Transit Tour - $165 Adults and $75 Children',lang["year"], '0'], ['Full Transit Tour - $165 Adults and $75 Children','2010', '2010'],['Full Transit Tour - $165 Adults and $75 Children','2011', '2011'], ['Partial Transit Tour - $115 Adults and $65 Children',lang["year"], '0'], ['Partial Transit Tour - $115 Adults and $65 Children','2010', '2010'], ['Partial Transit Tour - $115 Adults and $65 Children','2011', '2011']];   

      blankselect(document.frmReservations.year);
	  blankselect(document.frmReservations.month);
	  blankselect(document.frmReservations.day);
      counter = 0;
	  if (document.frmReservations.type.selectedIndex > 0) {
		  document.getElementById("fecha").style.visibility = "visible";
		  document.getElementById("year").style.visibility = "visible";		  
	  }
	  else {
		  document.getElementById("fecha").style.visibility = "hidden";
		  document.getElementById("year").style.visibility = "hidden";
		  document.getElementById("month").style.visibility = "hidden";
		  document.getElementById("day").style.visibility = "hidden";
	  }
      for (var i = 0; i < amodelos.length; i++) 
	  {
		if (currentProyect == amodelos[i][0])
		{
      		document.frmReservations.year.options[counter] = new Option(amodelos[i][1]);
	  		document.frmReservations.year.options[counter].value = amodelos[i][2];
	  		counter = counter + 1;
		}
      }
  }
  
  function populateMonthPacific(objForm, SelectedIndex) 
{
	currentProyect = objForm.year.options[objForm.year.selectedIndex].value;
	var amodelos = [['2010',lang["month"], '0'],['2010',lang["july"],'2010-07'],['2010',lang["august"],'2010-08'],['2010',lang["september"],'2010-09'],['2010',lang["october"],'2010-10'],['2010',lang["november"],'2010-11'],['2010',lang["december"],'2010-12'], ['2011',lang["month"], '0'], ['2011',lang["january"],'2011-01'], ['2011',lang["february"],'2011-02'], ['2011',lang["march"],'2011-03'], ['2011',lang["april"],'2011-04'], ['2011',lang["may"],'2011-05'], ['2011',lang["june"],'2011-06'], ['2011',lang["july"],'2011-07'], ['2011',lang["august"],'2011-08'], ['2011',lang["september"],'2011-09'], ['2011',lang["october"],'2011-10'], ['2011',lang["november"],'2011-11'], ['2011',lang["december"],'2011-12']];
   if (document.frmReservations.type.selectedIndex == 1) /*FULL TRANSIT TOUR*/
   { amodelos = [['2010',lang["month"], '0'],['2010',lang["july"],'2010-07'],['2010',lang["august"],'2010-08'],['2010',lang["september"],'2010-09'],['2010',lang["october"],'2010-10'],['2010',lang["november"],'2010-11'],['2010',lang["december"],'2010-12'], ['2011',lang["month"], '0'], ['2011',lang["january"],'2011-01'], ['2011',lang["february"],'2011-02'], ['2011',lang["march"],'2011-03'], ['2011',lang["april"],'2011-04'], ['2011',lang["may"],'2011-05'], ['2011',lang["june"],'2011-06'], ['2011',lang["july"],'2011-07'], ['2011',lang["august"],'2011-08'], ['2011',lang["september"],'2011-09'], ['2011',lang["october"],'2011-10'], ['2011',lang["november"],'2011-11'], ['2011',lang["december"],'2011-12']];
   }

      blankselect(document.frmReservations.month);
	  blankselect(document.frmReservations.day);
      counter = 0;
	  if (document.frmReservations.year.selectedIndex > 0) {
		  document.getElementById("month").style.visibility = "visible";
	  }
	  else {
		  document.getElementById("month").style.visibility = "hidden";
	  }
      for (var i = 0; i < amodelos.length; i++)
	  {
		if (currentProyect == amodelos[i][0])
		{
      		document.frmReservations.month.options[counter] = new Option(amodelos[i][1]);
	  		document.frmReservations.month.options[counter].value = amodelos[i][2];
	  		counter = counter + 1;
		}
      }
  }
  function populateDayPacific(objForm, SelectedIndex) 
{
   currentProyect = objForm.month.options[objForm.month.selectedIndex].value;
   /* ///////////////////////////////////
   Full transit Tour
   */
   if (document.frmReservations.type.selectedIndex == 1) 
	{
   var amodelos = [['2010-07',lang["day"]],['2010-07','17'],['2010-08',lang["day"]],['2010-08','21'],['2010-09',lang["day"]],['2010-09','18'],['2010-10',lang["day"]],['2010-10','16'],['2010-11',lang["day"]],['2010-11','20'],['2010-12',lang["day"]],['2010-12','18'], ['2011-01',lang["day"]], ['2011-01','15'], ['2011-01','29'], ['2011-02',lang["day"]], ['2011-02','12'], ['2011-02','19'], ['2011-03',lang["day"]], ['2011-03','12'], ['2011-03','19'], ['2011-04',lang["day"]], ['2011-04','16'], ['2011-05',lang["day"]], ['2011-05','21'], ['2011-06',lang["day"]], ['2011-06','16'], ['2011-07',lang["day"]], ['2011-07','16'], ['2011-08',lang["day"]], ['2011-08','20'], ['2011-09',lang["day"]], ['2011-09','17'], ['2011-10',lang["day"]], ['2011-10','15'], ['2011-11',lang["day"]], ['2011-11','19'], ['2011-12',lang["day"]], ['2011-12','17']];
	}
   /* ///////////////////////////////////
   FECHAS DE Partial transit Tour
   */
   /*NOTE
   [1, day] = 2007 dates
   [11, days] = 2008 dates / Explanation: [2008-->1(1)<--enero, day], [2008-->1(2)<--febrero, day], [2008-->1(3)<--marzo, day]
   [201, days] = 2009 dates / Explanation: [2009-->2(01)<--enero, day], [2009-->2(02)<--febrero, day], [2009-->2(03)<--marzo, day]
   */
   else   
   {
	 var amodelos = [['2010-07',lang["day"]],['2010-07','3'],['2010-07','10'],['2010-07','17'],['2010-07','24'],['2010-07','31'],['2010-08',lang["day"]],['2010-08','7'],['2010-08','14'],['2010-08','21'],['2010-08','28'],['2010-09',lang["day"]],['2010-09','3'],['2010-09','11'],['2010-09','18'],['2010-09','25'],['2010-10',lang["day"]],['2010-10','2'],['2010-10','9'],['2010-10','16'],['2010-10','23'],['2010-10','30'],['2010-11',lang["day"]],['2010-11','6'],['2010-11','13'],['2010-11','20'],['2010-11','26'],['2010-11','27'],['2010-12',lang["day"]],['2010-12','3'],['2010-12','4'],['2010-12','10'],['2010-12','11'],['2010-12','18'],['2010-12','25'],['2010-12','26'], ['2011-01',lang["day"]], ['2011-01','1'], ['2011-01','2'],['2011-01','6'], ['2011-01','7'], ['2011-01','8'], ['2011-01','13'], ['2011-01','14'], ['2011-01','20'], ['2011-01','21'], ['2011-01','22'], ['2011-01','27'], ['2011-01','28'], ['2011-01','29'], ['2011-02',lang["day"]], ['2011-02','3'], ['2011-02','4'], ['2011-02','5'], ['2011-02','10'], ['2011-02','11'], ['2011-02','12'], ['2011-02','17'], ['2011-02','18'], ['2011-02','24'], ['2011-02','25'], ['2011-02','26'], ['2011-03',lang["day"]], ['2011-03','3'], ['2011-03','4'], ['2011-03','5'], ['2011-03','10'], ['2011-03','11'], ['2011-03','12'], ['2011-03','17'], ['2011-03','18'], ['2011-03','24'], ['2011-03','25'], ['2011-03','26'], ['2011-04',lang["day"]], ['2011-04','2'], ['2011-04','9'], ['2011-04','16'], ['2011-04','23'], ['2011-04','30'], ['2011-05',lang["day"]], ['2011-05','14'], ['2011-05','21'], ['2011-05','28'], ['2011-06',lang["day"]], ['2011-06','4'], ['2011-06','11'], ['2011-06','16'], ['2011-06','25'], ['2011-07',lang["day"]], ['2011-07','2'], ['2011-07','9'], ['2011-07','16'], ['2011-07','23'], ['2011-07','30'], ['2011-08',lang["day"]], ['2011-08','6'], ['2011-08','13'], ['2011-08','20'], ['2011-08','27'], ['2011-09',lang["day"]], ['2011-09','3'], ['2011-09','10'], ['2011-09','17'], ['2011-09','24'], ['2011-10',lang["day"]], ['2011-10','1'], ['2011-10','8'], ['2011-10','15'], ['2011-10','22'], ['2011-10','29'], ['2011-11',lang["day"]], ['2011-11','5'], ['2011-11','12'], ['2011-11','19'], ['2011-11','25'], ['2011-11','26'], ['2011-12',lang["day"]], ['2011-12','2'], ['2011-12','3'], ['2011-12','9'], ['2011-12','10'], ['2011-12','17'], ['2011-12','23'], ['2011-12','24'], ['2011-12','30'], ['2011-12','31']];  
   }

      blankselect(document.frmReservations.day);
      counter = 0;
	  if (document.frmReservations.month.selectedIndex > 0) {
		  document.getElementById("day").style.visibility = "visible";
	  }
	  else {
		  document.getElementById("day").style.visibility = "hidden";
	  }
      for (var i = 0; i < amodelos.length; i++) 
	  {
		if (currentProyect == amodelos[i][0])
		{
      		document.frmReservations.day.options[counter] = new Option(amodelos[i][1]);
	  		document.frmReservations.day.options[counter].value = amodelos[i][2];
	  		counter = counter + 1;
		}
      }	  
  }

 function calculatePacific()
 {	
	var totalamount = 0;
	var adultsprice = 0;
	var childrenprice = 0;
	var tour = "";
	var season = "";	
	if (document.frmReservations.year.selectedIndex > 0 && document.frmReservations.month.selectedIndex > 0 && document.frmReservations.day.selectedIndex > 0 && document.frmReservations.adults.selectedIndex >= 0 && document.frmReservations.children.selectedIndex >= 0 && document.frmReservations.type.selectedIndex > 0 ) 
	{			
			//alert (document.frmReservations.day.selectedIndex);
			var mestext = document.frmReservations.month.options[document.frmReservations.month.selectedIndex].text;
			var fulladultbaja = 165;
			var fulladultalta = 165;
			var partialadultbaja = 115;
			var partialadultalta = 115;
			var fullchildrenalta = 75;
			var fullchildrenbaja = 65;
			var partialchildrenalta = fullchildrenbaja;
			var partialchildrenbaja = 65;
			// Esto es producto de el cambio en precios a partir de junio 2008
			var mesnum
			switch (mestext)
			{
				case lang["january"]:
					mesnum= 0;
					break
				case lang["february"]:
					mesnum= 1;
					break
				case lang["march"]:
					mesnum= 2;
					break
				case lang["april"]:
					mesnum= 3;
					break
				case lang["may"]:
					mesnum= 4;
					break
				case lang["june"]:
					mesnum= 5;
					break
				case lang["july"]:
					mesnum= 6;
					break
				case lang["august"]:
					mesnum= 7;
					break
				case lang["september"]:
					mesnum= 8;
					break
				case lang["october"]:
					mesnum= 9;
					break
				case lang["november"]:
					mesnum= 10;
					break
				case lang["december"]:
					mesnum= 11;
					break				
			}
			if (mesnum > 4 && document.frmReservations.edyear.value >= 2008)
			{
				fullchildrenalta = 75;
				fullchildrenbaja = 75;
				partialchildrenalta = 65;
				partialchildrenbaja = 65;				
			}
			else
			{
				if (document.frmReservations.edyear.value > 2008)
				{
					fullchildrenalta = 75;
					fullchildrenbaja = 75;
					partialchildrenalta = 65;
					partialchildrenbaja = 65;
				}				
			}
			// Temporada Alta							
			if (mestext == lang["january"] || mestext == lang["february"] || mestext == lang["march"])
				{				
					season = " ";
					// Temporada Alta Full Tour
					if (document.frmReservations.type.selectedIndex == 1) 
						{
							adultsprice = fulladultalta;							
							childrenprice = fullchildrenalta;
							tour = "Full Transit Tour - $" + adultsprice + " Adults and $" + childrenprice + season;
						}
					// Temporada Alta Partial
					else
						{
							adultsprice = partialadultalta;
							childrenprice = partialchildrenalta;
							tour = "Partial Transit Tour - $" + adultsprice + " Adults and $" + childrenprice + season;
						}
				}
				// Temporada Baja
			else 
				{
					//season = " - on Low Season";
					season = " ";
					// Temporada Baja Full
					if (document.frmReservations.type.selectedIndex == 1) 
						{
							adultsprice = fulladultbaja;
							childrenprice = fullchildrenbaja;
							tour = "Full Transit Tour - $" + adultsprice + " Adults and $" + childrenprice + season;
						}
					// Temporada Baja Partial
					else
						{
							adultsprice = partialadultbaja;
							childrenprice = partialchildrenbaja;
							tour = "Partial Transit Tour - $" + adultsprice + " Adults and $" + childrenprice + season;
						}
				}
			 totalamount = (adultsprice * document.frmReservations.adults.options[document.frmReservations.adults.selectedIndex].value) + (childrenprice * document.frmReservations.children.options[document.frmReservations.children.selectedIndex].value);
		}
		else
		{
  				totalamount = 0;
				adultsprice = 0;
				childrenprice = 0;
		}
		document.frmReservations.price.value = adultsprice.toFixed(2);
		if (document.frmReservations.children.options[document.frmReservations.children.selectedIndex].value > 0) 
		{
			document.frmReservations.price2.value = childrenprice.toFixed(2); 
		}
		else {
			document.frmReservations.price2.value = "0.00";
		}
		document.frmReservations.amountt.value = totalamount.toFixed(2);
		document.frmReservations.ttour.value = tour;
  } 


     function blankselect(selectobject){

       selectlen = selectobject.length;

       for (var i = 0; i < selectlen; i++) {

         selectobject.options[0] = null;

	}

      }
//jkjkfdjkfdjkfdjkfdjk

function selectedtext(m) 
{
	var x=document.getElementById(m) 	
	if (m == "adults") {
    document.getElementById("tadults").value =  x.options[x.selectedIndex].value	
	}
	if (m == "children") {
    document.getElementById("tchildren").value =  x.options[x.selectedIndex].value
	}
	if (m == "cabin_category") {
    document.getElementById("edcabin_category").value =  x.options[x.selectedIndex].value
	}
	if (m == "country") {
    document.getElementById("tcountry").value =  x.options[x.selectedIndex].value
	}
	if (m == "year") {
    document.getElementById("edyear").value =  x.options[x.selectedIndex].text
	}
	if (m == "month") {
    document.getElementById("edmonth").value =  x.options[x.selectedIndex].text
	}
	if (m == "day") {
    document.getElementById("edday").value =  x.options[x.selectedIndex].text
	}
	/*if (m == "type") {
    document.getElementById("ttour").value =  x.options[x.selectedIndex].value	
	}*/
	if (m == "ccExpM") {
    document.getElementById("exmonth").value =  x.options[x.selectedIndex].value	
	}
	if (m == "ccExpY") {
    document.getElementById("exyear").value =  x.options[x.selectedIndex].value
	}	
	document.getElementById("qq").value =  document.frmReservations.amountt.value
	//alert (/* document.getElementById("tadults").value*/ "Coño")	
	//conocer (m);										  	
}

function conocer(m)
{
//alert(document.getElementById("country").length);
var x=document.getElementById(m)
 x= x.options[x.selectedIndex].id
 if (typeof document.frmReservations.elements["Sender"]!="undefined") {
	if (m == "adults") {
    document.getElementById("tadults").value =  x	
	}
	if (m == "children") {
    document.getElementById("tchildren").value =  x
	}
	if (m == "country") {
    document.getElementById("tcountry").value =  x
	}
	if (m == "year") {
    document.getElementById("edyear").value =  x
	}
	if (m == "month") {
    document.getElementById("edmonth").value =  x
	}
	if (m == "day") {
    document.getElementById("edday").value =  x
	}
	if (m == "type") {
    document.getElementById("ttour").value =  x	
	}
 
// alert(document.getElementById("tadults").value);  
 }
}
