var errorsHeader = 'Please correct the following.\n\n';
var iD = "CONTROLGROUPAVAILABILITYSEARCHINPUT_AVAILABILITYSEARCHINPUT_DropDownListPassengerType_";
var iDPromo = "AVAILABILITYSEARCHINPUT_DropDownListPassengerType_";
var band = false;

function Validate(form, controlID, errorsHeader)
{
	// set up properties
	this.form = form;
	this.namespace = controlID;
	this.errors = '';
	this.setfocus = null;
	this.errorsHeader = errorsHeader;
	// set up attributes
	this.requiredAttribute = 'required';
	this.requiredEmptyAttribute = 'requiredEmpty';
	this.validationTypeAttribute = 'validationtype';
	this.regexAttribute = 'regex';
	this.minLengthAttribute = 'minlength';
	this.numericMinLengthAttribute = 'numericminlength';
	this.maxLengthAttribute = 'maxlength';
	this.numericMaxLengthAttribute = 'numericmaxlength';
	this.minValueAttribute = 'minvalue';
	this.maxValueAttribute = 'maxvalue';
	this.equalsAttribute = 'equals';
	// set up error handling attributes
	this.defaultErrorAttribute = 'error';
	this.requiredErrorAttribute = 'requirederror';
	this.validationTypeErrorAttribute = 'validationtypeerror';
	this.regexErrorAttribute = 'regexerror';
	this.minLengthErrorAttribute = 'minlengtherror';
	this.maxLengthErrorAttribute = 'maxlengtherror';
	this.minValueErrorAttribute = 'minvalueerror';
	this.maxValueErrorAttribute = 'maxvalueerror';
	this.equalsErrorAttribute = 'equalserror';
	// set up error handling default errors
	this.defaultError = '{name} es invalido.'
	this.defaultRequiredError = '{name} es obligatorio.';
	this.defaultValidationTypeError = '{name} es invalido.';
	this.defaultRegexError = '{name} es invalido.';
	this.defaultMinLengthError = '{name} es muy corto en longitud.';
	this.defaultMaxLengthError = '{name} es muy largo en longitud.';
	this.defaultMinValueError = '{name} debe ser mayor que {minValue}.';
	this.defaultMaxValueError = '{name} debe ser menor que {maxValue}.';
	this.defaultEqualsError = '{name} no es igual a {equals}';
	this.defaultNotEqualsError = '{name} no puede ser igual a {equals}';
	// add methods to object
	this.run = run;
	this.validateSingleElement = validateSingleElement;
	this.outputErrors = outputErrors;
	this.checkFocus = checkFocus;
	this.setError = setError;
	this.cleanAttributeForErrorDisplay = cleanAttributeForErrorDisplay;
	this.validateRequired = validateRequired;
	this.validateType = validateType;
	this.validateRegex = validateRegex;
	this.validateMinLength = validateMinLength;
	this.validateMaxLength = validateMaxLength;
	this.validateMinValue = validateMinValue;
	this.validateMaxValue = validateMaxValue;
	this.validateEquals = validateEquals;
	// add validation type methods
	this.setValidateTypeError = setValidateTypeError;
	this.validateAmount = validateAmount;
	this.validateDate = validateDate;
	this.validateMod10 = validateMod10;
	this.validateNumeric = validateNumeric;
	//this.nonePattern = '^\.*$';
	this.stringPattern = '^.+$';	
	this.upperCaseStringPattern = '^[A-Z]([A-Z)|\s)*$';
	this.numericPattern = '^\\d+$';
	this.numericStripper = /\D/g;
	this.alphaNumericPattern = '^\\w+$';
	var amountSeparators = '(\\.|,)';
	this.amountPattern = '^(\\d+(' + amountSeparators + '\\d+)*)$';
	this.dateYearPattern = '^\\d{4}$';
	this.dateMonthPattern = '^\\d{2}$';
	this.dateDayPattern = '^\\d{2}$';
	
	var validEmailChars = '[^\:\,\;\#$\%\&\(\)\+\=\/]+';
	this.emailPattern = '^' + validEmailChars + '(\\.' + validEmailChars + ')?@' + validEmailChars + '(\\.' + validEmailChars + ')+$';
}

function run()
{
	// run validation on the form elements
	for (var i = 0; i < this.form.length; i++)
	{
		var e = this.form.elements[i];
		
		if (e.id.indexOf(this.namespace) == 0)
		{
			this.validateSingleElement(e);
		}
	}
	return this.outputErrors();
}
function outputErrors()
{
	// if there is an error output it
	if(this.errors)
	{
		alert(this.errorsHeader + this.errors);
		
		if (this.setfocus)
		{
			this.setfocus.focus();
		}
		
		return false;
	}
	return true;
}
function validateSingleElement(e)
{
	this.validateRequired(e);
	// only validate the rest if they actually have something
	if (0 < e.value.length)
	{
		this.validateType(e);
		this.validateRegex(e);
		this.validateMinLength(e);
		this.validateMaxLength(e);
		this.validateMinValue(e);
		this.validateMaxValue(e);
		this.validateEquals(e);
	}
}
function checkFocus(e)
{
	if (!this.setfocus)
	{
		this.setfocus = e;
	}
}
function validateRequired(e)
{
	if((e.getAttribute(this.requiredAttribute) == 'true') && ((e.value.length < 1) || (e.value == e.getAttribute(this.requiredEmptyAttribute))))
	{
		this.setError(e, this.requiredErrorAttribute, this.defaultRequiredError);
	}
}
function validateType(e)
{
	var type = e.getAttribute(this.validationTypeAttribute);
	var value = e.value;
	
	if (type) 
	{
		if ((type == 'Address') && (!value.match(this.stringPattern)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type == 'AlphaNumeric') && (!value.match(this.alphaNumericPattern)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type == 'Amount') && (!this.validateAmount(value)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type == 'Country') && (!value.match(this.stringPattern)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type == 'Email') && (!value.match(this.emailPattern)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type == 'Mod10') && (!this.validateMod10(value)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type == 'Name') && (!value.match(this.stringPattern)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type == 'Numeric') && (!this.validateNumeric(value)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type.indexOf('Date') == 0) && (!this.validateDate(e, type, value)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type == 'State') && (!value.match(this.stringPattern)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type == 'String') && (!value.match(this.stringPattern)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type == 'UpperCaseString') && (!value.match(this.upperCaseStringPattern)))
		{
			this.setValidateTypeError(e);
		}
		else if ((type == 'Zip') && (!value.match(this.stringPattern)))
		{
			this.setValidateTypeError(e);
		}
		
	}
}
function validateRegex(e)
{
	var regex = e.getAttribute(this.regexAttribute);
	
	if ((regex) && (!e.value.match(regex)))
	{
		this.setError(e, this.regexErrorAttribute, this.defaultRegexError);
	}
}
function validateMinLength(e)
{
	var length = e.getAttribute(this.minLengthAttribute);
	var numericLength = e.getAttribute(this.numericMinLengthAttribute);
	
	if ((0 < length) && (e.value.length < length))
	{
		this.setError(e, this.minLengthErrorAttribute, this.defaultMinLengthError);
	}
	else if ((0 < numericLength)  && (0 < e.value.length) && (e.value.replace(this.numericStripper, '').length < numericLength))
	{
		this.setError(e, this.minLengthErrorAttribute, this.defaultMinLengthError);
	}
}
function validateMaxLength(e)
{
	var length = e.getAttribute(this.maxLengthAttribute);
	var numericLength = e.getAttribute(this.numericMaxLengthAttribute);
				
	if ((0 < length) && (length < e.value.length))
	{
		this.setError(e, this.maxLengthErrorAttribute, this.defaultMaxLengthError);
	}
	else if ((0 < numericLength)  && (0 < e.value.length) && (numericLength < e.value.replace(this.numericStripper, '').length))
	{
		this.setError(e, this.maxLengthErrorAttribute, this.defaultMaxLengthError);
	} 
}
function validateMinValue(e)
{
	var min = e.getAttribute(this.minValueAttribute);
	
	if ((min != null) && (0 < min.length))
	{
		if ((5 < min.length) && (min.substring(0, 5) == '&gt;='))
		{
			if (e.value < parseFloat(min.substring(5, min.length)))
			{
				this.setError(e, this.minValueErrorAttribute, this.defaultMinValueError);
			}
		}
		else if ((4 < min.length) && (min.substring(0, 4) == '&gt;'))
		{
			if (e.value <= parseFloat(min.substring(4, min.length)))
			{
				this.setError(e, this.minValueErrorAttribute, this.defaultMinValueError);
			}
		}
		else if (e.value < parseFloat(min))
		{
			this.setError(e, this.minValueErrorAttribute, this.defaultMinValueError);
		}
	}
}
function validateMaxValue(e)
{
	var max = e.getAttribute(this.maxValueAttribute);
	
	if ((max != null) && (0 < max.length))
	{
		if ((5 < max.length) && (max.substring(0, 5) == '&lt;='))
		{
			if (e.value > parseFloat(max.substring(5, max.length)))
			{
				this.setError(e, this.maxValueErrorAttribute, this.defaultMaxValueError);
			}
		}
		else if ((4 < max.length) && (max.substring(0, 4) == '&lt;'))
		{
			if (e.value >= parseFloat(max.substring(4, max.length)))
			{
				this.setError(e, this.maxValueErrorAttribute, this.defaultMaxValueError);
			}
		}
		else if (parseFloat(e.value) > max)
		{
			this.setError(e, this.maxValueErrorAttribute, this.defaultMaxValueError);
		}
	}
}
function validateEquals(e)
{
	// eventually this should be equipped to do string
	// comparison as well as other element comparisons
	var equal = e.getAttribute(this.equalsAttribute);
	
	if ((equal != null) && (0 < equal.length))
	{
		if ((2 < equal.length) && (equal.substring(0, 2) == '!='))
		{
			if (e.value == equal.substring(2, equal.length))
			{
				this.setError(e, this.equalsErrorAttribute, this.defaultEqualsError);
			}
		}
		else if ((2 < equal.length) && (equal.substring(0, 2) == '=='))
		{
			if (e.value != equal.substring(2, equal.length))
			{
				this.setError(e, this.equalsErrorAttribute, this.defaultEqualsError);
			}
		}
		else if (equal.charAt(0) == '=')
		{
			if (e.value != equal.substring(1, equal.length))
			{
				this.setError(e, this.equalsErrorAttribute, this.defaultEqualsError);
			}
		}
		else if (e.value != equal)
		{
			this.setError(e, this.equalsErrorAttribute, this.defaultEqualsError);
		}
	}
}
function setValidateTypeError(e)
{
	this.setError(e, this.validationTypeErrorAttribute, this.defaultValidationTypeError);
}
function setError(e, errorAttribute, defaultTypeError)
{
	var error = e.getAttribute(errorAttribute);
	if (!error)
	{
		if (e.getAttribute(this.defaultErrorAttribute))
		{
			error = e.getAttribute(this.defaultErrorAttribute);
		}
		else if (defaultTypeError)
		{
			error = defaultTypeError;
		}
		else
		{
			error = this.defaultError;
		}
	}
	// this would make more sense but it doesn't work
	// so i'll do each explicitly while i make this work
	var results = error.match(/{\s*(\w+)\s*}/g);
	if (results)
	{
		for (var i = 0; i < results.length; i++)
		{
			var dollarOne = results[i].replace(/{\s*(\w+)\s*}/, '$1');
			error = error.replace(/{\s*\w+\s*}/, this.cleanAttributeForErrorDisplay(e, dollarOne));
		}
	}
	
	this.errors += error + '\n';
	this.checkFocus(e);	
}
function cleanAttributeForErrorDisplay(e, attributeName)
{
	var attribute = e.getAttribute(attributeName.toLowerCase());
	
	if (attribute == null)
	{
		return attributeName;
	}
	
	if (attributeName.match(/^(minvalue|maxvalue)$/i))
	{
		return attribute.replace(/[^\d.,]/g, '');
	}
	
	return attribute;
}
function validateAmount(amount)
{
	if ((!amount.match(this.amountPattern)) || (amount == 0))
	{
		return false;
	}
	return true;
}

function validateDate(e, type, value)
{
	var today = new Date();
	
	if ((type == 'DateYear') && ((value < today.getYear()) || (!value.match(this.dateYearPattern))))
	{
		return false;
	}
	//just make sure it is two digits for now
	else if ((type == 'DateMonth') && (!value.match(this.dateMonthPattern)))
	{
		return false;
	}
	//just make sure it is two digits for now
	else if ((type == 'DateDay') && (!value.match(this.DateDayPattern)))
	{
		return false;
	}
	return true;
}
function validateMod10(cardNumber)
{
	var isValid = false;
	var ccCheckRegExp = /\D/;
	var prefixLengthIsValid = false;
	var cardNumbersOnly = cardNumber.replace(/ /g, "");
		
	if (!ccCheckRegExp.test(cardNumbersOnly))
	{
		var prefixRegExp = /^$/;

		switch(cardNumbersOnly.charAt(0))
		{
			case "6":
				//DISCOVER
				prefixRegExp = /^6011\d{12}$/;
				break;
			case "5":
				//MASTERCARD DINERS COMBINED
				prefixRegExp = /^((5[1-5]\d{14})|(3((0[0-5])\d{11}|6\d{12}|8\d{12})))$/;
				break;
			case "4":
				//VISA
				prefixRegExp = /^4(\d{12}|\d{15})$/;
				break;
			case "3":
				if (cardNumbersOnly.length == 14)
				{
					//MASTERCARD DINERS COMBINED
					prefixRegExp = /^(3((0[0-5])\d{11}|6\d{12}|8\d{12}))$/;
				}
				else
				{
					//AMEX
					prefixRegExp = /^3(4|7)\d{13}$/;
				}
				break;
		}
		prefixLengthIsValid = prefixRegExp.test(cardNumbersOnly);
	}

	if (prefixLengthIsValid)
	{
		var numberProduct;
		var checkSumTotal = 0;
		
		while (cardNumbersOnly.length < 16)
		{
			cardNumbersOnly = '0' + cardNumbersOnly;
		}

		for (digitCounter = cardNumbersOnly.length - 1; 0 <= digitCounter; digitCounter -= 2)
		{
			checkSumTotal += parseInt (cardNumbersOnly.charAt(digitCounter));
			numberProduct = String((cardNumbersOnly.charAt(digitCounter - 1) * 2));
			for (var productDigitCounter = 0; productDigitCounter < numberProduct.length; productDigitCounter++)
			{
				checkSumTotal += parseInt(numberProduct.charAt(productDigitCounter));
			}
		}

		return (checkSumTotal % 10 == 0);
	}

	return false;
}
function validateNumeric(number)
{
	number = number.replace(/\s/g, '');
	
	if (!number.match(this.numericPattern))
	{
		return false;
	}
	
	return true;
}
function validate(controlID, elementName)
{
	//make sure we can run this javascript
 	if (document.getElementById && document.createTextNode)
	{
		var validate = new Validate(document['SkySales'], controlID + '_', errorsHeader);
		
		if (elementName)
		{
			validate.validateSingleElement(document.getElementById(controlID + "_" + elementName));
			return validate.outputErrors();
		}
		
		return validate.run();
	}
  	// could not use javascript rely on server validation
  	return true;
}
function balanceHeight(idContainer, idLeft, idRight)
{
	setInterval('loopBalance()', 1000);	
}

function loopBalance() {
	if (document.getElementById)
	{
			hLeft 	= document.getElementById('left').offsetHeight;
			hRight  = document.getElementById('right').offsetHeight;

			if (hLeft > hRight)
			{
				document.getElementById('wrapper').height = hLeft + "px";
				document.getElementById('right').style.height = hLeft + "px";
			}
			else {
				document.getElementById('wrapper').style.height = hRight + "px";	
				document.getElementById('left').style.height = hRight + "px";
			}
	}
}
function avisoAMEX() { 

var specs = "width=550, height=200, top=5, right=5, resizable=no,scrollbars=no";
	nada = window.open('AvisoAMEX.html', "codSeg", specs);
}
function codSeguridad()
{
	var specs = "width=600, height=250, top=5, right=5, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Ingrese c?digo de organizaci?n</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
		
	secCod = window.open("Detalles.html","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
function codSeguridad1()
{
	var specs = "width=365, height=40, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Ingrese c?digo de organizaci?n</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	secCod = window.open("Detalles1.html","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
/**********INICIO DE FUNCIONES DE EMPRESAJET**********/
function InformeEmpresaJet()
{
	var specs = "width=696, height=662, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	secCod = window.open("TerminosdeEmpresaJet.html","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
/**********FIN DE FUNCIONES DE EMPRESAJET**********/
/**********INICIO DE FUNCIONES DE Agencia Jet**********/
function InformeAgenciaJet()
{
	var specs = "width=696, height=662, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	secCod = window.open("TerminosdeAgenciaJet.html","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
/**********FIN DE FUNCIONES DE Agencia Jet**********/
function popUpGenerico(Nombre, Ancho, Alto)
{
	var specs = "width=" + Ancho + ", height=" + Alto + ", top=5, right=5, resizable=no,scrollbars=yes";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	secCod = window.open(Nombre,"codSeg",specs);	
	secCod.focus();
	secCod.document.close();
}
function Formato()
{
	var specs = "width=950, height=1250, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	secCod = window.open("Menor 12 a 18.htm","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
function Formato2()
{
	var specs = "width=650, height=1800, top=5, right=10, resizable=no,scrollbars=yes";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
		secCod = window.open("Carta2.html","codSeg",specs);	
		secCod.focus();	secCod.document.close();
}
function codSeguridad2()
{
	var winLeft = (screen.width-450)/2; 
	var winTop = (screen.height-(335+110))/2; 
	var specs = "width=450, height=335, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";

secCod = window.open("Detalles3.html","codSeg",specs);	
}
function codSeguridad4()
{
	var winLeft = (screen.width-450)/2; 
	var winTop = (screen.height-(335+110))/2; 
	var specs = "width=450, height=335, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("http://www.intertours.com.mx","mensaje","");	
}
// JScript source code
function setCuartos(Obj)
{
   var strNumAdultos = "", strMI = "";
   var cTabla="";
		   for(var n = 1; n <= 4; n++)
		     strNumAdultos += "<OPTION VALUE='" +  n + "' >" +  n + " </OPTION>";
			
		   for (var j=0; j <= 3; j++)
    	     strMI += "<option value="+ j +">"+ j +"</option>";
               for(var i=1; i <= Obj; i++)
              {
           		cTabla += "<table><tr><td>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;   adulto &nbsp;&nbsp;<br/>&nbsp;</td><td>&nbsp;&nbsp;menor<br/><font size='-2'><b>(2-12 años)</b></font>&nbsp;&nbsp;</td><td align=center>infante<br/><font size='-2'><b>(0-23 meses)</b></font></td></tr></table>";
	            cTabla += "<table><tr><td colspan=3>" + "habitaci&#243;n " + i + ":" + "</td>";               
                cTabla += "<td align='center'><SELECT NAME=Adultos" + i +" ID=Adultos" + i  +" onChange='validaPerson(this," + i + " )'>" + strNumAdultos + "</SELECT></td>";
                cTabla += "<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SELECT NAME=c"+ i + "Ninos " + " ID=c"+ i + "Ninos" + "  onChange='validaPerson(this," + i + " ); setEdades(this," + i + " )' > ";
				cTabla += strMI + "</SELECT></td>";
				cTabla += "<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SELECT NAME='infante"+ i + "' " + " ID='infante"+ i + "'" + " onChange='setInfante()'> ";
				cTabla += strMI + "</SELECT></td></tr>";
                cTabla += "</table><br/>";
				cTabla+="<div id='DIV" + i + "'> "  +  "</DIV>";
			 	  }
       document.getElementById(iD+'ADT').value = Obj;
	   document.getElementById(iD+'CHD').value = document.getElementById(iD+'INFANT').value = 0;
       document.getElementById("Tarifas").innerHTML = cTabla;
}
function setInfante()
{
	var infantes = 0;
	var Iselect = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT');
	for(var j=1; j <= document.getElementById('HAB').selectedIndex + 1; j++)
		 infantes = infantes + parseInt(document.getElementById("infante"+j).value);
	Iselect.value = infantes;
}

function validaPerson(Oselect, otraJ)
{
	var Aselect = document.getElementById(iD+'ADT');
	var Mselect = document.getElementById(iD+'CHD');
	var msjEr = ""; 
	var bool = true;
	var adultos = 0;
	for(var j=1; j <= document.getElementById('HAB').selectedIndex + 1; j++)
		 adultos = adultos + parseInt(document.getElementById("Adultos"+j).value);
	var ninos_x = 0;
	var CantidadMax;
	for(var j=1; j <= document.getElementById('HAB').selectedIndex + 1; j++)
		 ninos_x = ninos_x + parseInt(document.getElementById("c"+ j +"Ninos").value);
	if ((ninos_x+adultos)>9) 
	{
	alert("el número de personas en el paquete no puede exceder de: 9");
		if (Oselect.id.substring(0,4)=="Adul")
			{
				Aselect.value=adultos-Oselect.value+1;
				Oselect.value=1;
			}
		else
			{
				Mselect.value=ninos_x-Oselect.value;
				Oselect.value=0;
			}
		return;
	}
	else
	{
	CantidadMax=parseInt(document.getElementById("c"+ otraJ +"Ninos").value) + parseInt(document.getElementById("Adultos"+otraJ).value);
	if (CantidadMax>8) 
		{
		alert("el número de personas en la habitación no puede exceder de: 8");
			if (Oselect.id.substring(0,4)=="Adul")
				{
					Aselect.value=adultos-Oselect.value+1;
					Oselect.value=1;
				}
			else
				{
					Mselect.value=ninos_x-Oselect.value;
					Oselect.value=0;
				}
			return;
		}
			else
			{
				Mselect.value=ninos_x;
				Aselect.value=adultos;
			}
	}
}
function setEdades(selN,k)
{      /* 
   	var cEdades = "";
   	var tNino = "";
	var k1 = k-1;
	var Mselect = document.getElementById(iD+'CHD');
	
	  if (parseInt(selN.value) > 0)
      {
      		tNino = "<table><tr>";
			cEdades = "<tr>";
      		
          	for(var i=1; i<=selN.value; i++) 
          	{                             
               tNino+= "<td>&nbsp;&nbsp;niño " + i + "<br/>&nbsp;&nbsp;edad</td>";
              cEdades += "<td><select name='edadC" +k+i+ "' id='edadC" +k+i+ "' >";
              cEdades += "<option value='-1'>-?-</option>";
			  for (var j=2; j <= 11; j++)
              	cEdades += "<option value="+ j +">"+ j +"</option>";
              cEdades += "</select></td>";
      		}
       	tNino += "</tr>";
       	cEdades = tNino + cEdades + "</tr></table>";
      }
      document.getElementById('DIV' + k).innerHTML = cEdades;*/
}
function verificaDatos( )
{/*
	var msjEr = ""; 
	var bool = true;

for(var j=1; j <= document.getElementById('HAB').selectedIndex + 1; j++)
	 for( var k=1; k <= document.getElementById("c"+j+"Ninos").selectedIndex; k++)
		 if ( document.getElementById("edadC"+j+k).value == '-1' )
			 msjEr += "- Habitación " + j + " para el niño " + k +"\n";
		 if ( msjEr != "")
		 {
			 msjEr = "Ingrese la edad del niño:\n\n" + msjEr;
			 alert(msjEr);
			 return false;
		 }*/
}
// Formatea la Suma
function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
	if(isNaN(num))
		num = "0";
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();
	if(cents<10)
		cents = "0" + cents;
	for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
		num = num.substring(0,num.length-(4*i+3))+','+
	num.substring(num.length-(4*i+3));
	
	return (((sign)?'':'-') + '$' + num + '.' + cents);
}
function fPagina(valor){
  document.getElementById("Evento").value = 'Paginar'	
  document.getElementById("Pagina").value = valor; 
  document.forms[0].submit();
}
function imprimeDet()
{
	var specs = "width=590, height=650, top=5, left=5, resizable=yes, scrollbars=yes";
	var tablaIni = "<table align='center'><tr><td>";
	var tablaFin = "</td></tr></table>";
	var datosHtml = document.getElementById('mainBody').innerHTML;
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Interjet: resumen de paquete</title><STYLE type=text/css media=print>@import 'printer.css';</STYLE><LINK href='css/InterJet/common.css' type=text/css rel=stylesheet xmlns:myXsltExtension='urn:XsltExtension'></head><body bgcolor=white topmargin=2 leftmargin=2>";
	contenido += "<DIV id=right>";
	var jScript = "<script>document.getElementById('BtImprimir1').innerHTML=''; if(document.getElementById('BtImprimir2')) document.getElementById('BtImprimir2').innerHTML='';</script>"
	contenido += tablaIni +"<input type='button' name='Imprimir' value='Imprimir' onClick='javascript:window.print()'/>"+ tablaFin + datosHtml + tablaIni +"<input type='button' name='Imprimir' value='Imprimir' onClick='javascript:window.print()'/>"+ tablaFin +"</div></div>"+ jScript +"</body></html>";
	
	resPaq = window.open("InterJet.htm","resPaq",specs);
	resPaq.document.write(contenido);
    resPaq.focus();
	resPaq.document.close();
}
function valNombre()
{
	var nombre = document.getElementById('CONTROLGROUPCONTACT_CONTACTINPUT_TextBoxFirstName').value;
	var apellido = document.getElementById('CONTROLGROUPCONTACT_CONTACTINPUT_TextBoxLastName').value;
	
	if ( nombre == 'nombre' )
		alert('favor de introducir su nombre');
	else
	if ( apellido == 'apellido' )
		alert('favor de introducir su apellido');
	return nombre != 'nombre' && apellido != 'apellido';
}
function onlyLetters(e)
{
	  var key; var keychar;
	  if (window.event)
		key = window.event.keyCode;
	  else if (e) key = e.which;
	  else return true;
	  keychar = String.fromCharCode(key);
	  // control keys
	  if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) )
	  return true;
	  //numbers
	  else if ((("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ").indexOf(keychar) > -1)) return true;
	  // decimal point jump
	  else return false;
}
function onlyNumbers(e)
{
	  var key; var keychar;
	  if (window.event)
		key = window.event.keyCode;
	  else if (e) key = e.which;
	  else return true;
	  keychar = String.fromCharCode(key);
	  // control keys
	  if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) )
	  return true;
	  //numbers
	  else if ((("0123456789").indexOf(keychar) > -1)) return true;
	  // decimal point jump
	  else return false;
}

function validaDatos()
{
	var msj = '', mand = ' es obligatorio.\n';
	band = false;
	//Validar Tarjeta, PaymentMethodCode, AMT, ACCTNO, VerificationCode, EXPDAT_Month, EXPDAT_Year, HolderName

	if (document.getElementById("CHK1")){
	
	if (document.getElementById("CHK1").checked){
	    return true;
		
	
	}
	}
	if (document.getElementById('PaymentMethodCode').value == 'VISA'){
		
    	if (document.getElementById('ACCTNO').value.length < 13 || document.getElementById('ACCTNO').value.length > 16 ){
			 msj += 'El número de tarjeta es invalido (El número de tarjeta debe ser de (13-16 dígitos)\n';
		}
		if (document.getElementById('VerificationCode').value.length != 3){          
			 msj += 'Código de seguridad invalido (El código de seguridad debe ser 3 dígitos)\n';
		} 	
		if (document.getElementById('cc_bank').value == 'No Requerido'){          
			 msj += 'Ingrese el Banco Emisor\n';
		} 			
	}  
		if (document.getElementById('PaymentMethodCode').value == 'MC'){
		if (document.getElementById('ACCTNO').value.length < 14 || document.getElementById('ACCTNO').value.length > 16 ){
			 msj += 'El número de tarjeta es invalido (El número de tarjeta debe ser de (14-16 dígitos)\n';
		}
		if (document.getElementById('VerificationCode').value.length != 3){          
			 msj += 'Código de seguridad invalido (El código de seguridad debe ser 3 dígitos)\n';
		} 			
		if (document.getElementById('cc_bank').value == 'No Requerido'){          
			 msj += 'Ingrese el Banco Emisor\n';
		} 			
	}  
		if (document.getElementById('PaymentMethodCode').value == 'AMEX'){

		if (document.getElementById('ACCTNO').value.length != 15){
                         msj += 'verifica el tipo de tarjeta de credito\n';
			 msj += 'El número de tarjeta es invalido (El número de tarjeta debe ser de 15 dígitos)\n';
		}
		if (document.getElementById('VerificationCode').value.length != 4){          
			 msj += 'Código de seguridad invalido (El código de seguridad debe ser 4 dígitos)\n';
		} 						
	}  
	if (validateMod10(document.getElementById('ACCTNO').value) == false){		
      	 msj += 'El número de tarjeta es invalido favor de verificar\n';


	
		
	}


	if (document.getElementById('EXPDAT_Month').value=='')
		msj +='ingresa mes de expiracion tarjeta \n';

	if(document.getElementById('EXPDAT_Year').value=='')
		msj +='ingresa año de expiracion tarjeta \n';


	if (document.getElementById('PAYMENTDISPLAY_TextBoxSecurity')){
		
		if (document.getElementById('PAYMENTDISPLAY_TextBoxSecurity').value == ''){
			msj += 'Ingrese el Texto de Seguridad \n';		
		}
	}
	msj += ( esVacio(document.getElementById('direccionTarjeta_1')) )? 'La direcci'+ unescape('%F3') +'n del tarjetahabiente' + mand : '';
	msj += ( esVacio(document.getElementById('codigoPostal')) )? 'El c'+ unescape('%F3') +'digo postal del tarjetahabiente' + mand : '';
	msj += ( esVacio(document.getElementById('ciudadTarjeta')) )? 'La ciudad donde reside el tarjetahabiente' + mand : '';
	msj += ( esValido(document.getElementById('estadosTarjeta')) )? 'El estado donde reside el tarjetahabiente' + mand : '';
	msj += ( esValido(document.getElementById('paisTarjeta')) )? 'El pa'+ unescape('%ED') +'s del tarjetahabiente' + mand : '';
	msj += ( esVacio(document.getElementById('telTarjeta')) )? 'El tel'+ unescape('%E9') +'fono del tarjetahabiente' + mand : '';
	if( msj != '' )
	{
		msj = 'Favor de corregir lo siguiente:\n\n' + msj;
		alert( msj );
	}
	else
	if( document.getElementById('estadosTarjeta').value.split('|')[0] != document.getElementById('paisTarjeta').value )
		alert(msj='Favor de verificar que la informaci'+ unescape('%F3') +'n de estado y pa'+ unescape('%ED') +'s correspondan uno al otro.');
return msj == '';
}
function esVacio(objeto)
{
	var i = 0;
	var cad = objeto.value;
	while (i < cad.length && cad.charAt(i) == " ")
	i++;
	if( i == cad.length && !band )
	{
		objeto.focus();
		band = true;
	}
	
	return i == cad.length;
}
function esValido(objeto)
{
	if ( objeto.value == '???' && !band )
	{
		objeto.focus();
		band = true;
	}
	
	return objeto.value == '???';
}
function setPais(objeto)
{	
	document.getElementById('paisTarjeta').value = objeto.value.split('|')[0];
}
function flotante() {
     //la variable limite, nos indica hasta que punto se puede mover la imagen en cuestion, con respecto al moviemiento del scroll
     var limite = document.getElementById('wrapper').offsetHeight - document.getElementById('left').offsetHeight;
     //variable que obtiene la position superior del scroll
     var scrollTop = document.documentElement.scrollTop;
     
     if (document.getElementById) {

          //Se evalua si el scroll ha sobrepasado a altura de 200px (al parecer son pixeles) y que apartir de ahi la imagen o animacion        //se muevan
          if(scrollTop > 200) {

                if(scrollTop < limite) {
                     document.getElementById('flotante').style.top = scrollTop - 200 + "px";
                }
          }
     }    
}
function init() {
     if (document.getElementById) {
          window.onscroll = flotante; //<<---Es sentencia indica que en el evento onscroll, este sera manejado por la funcion flotante
     }
}
function adultos_default () 
{
	var i = 0;
          	for(var i=1; i<=9; i++) 
          	{                             
			
            if (document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_TextBoxFirstName_' + i)) 
				document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_TextBoxFirstName_' + i).readOnly = false;
		    if (document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_TextBoxLastName_' + i)) 
				document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_TextBoxLastName_' + i).readOnly = false;
			 if (document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListTitle_' + i)) 
				document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListTitle_' + i).disabled = false;
			 if (document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListTitle_' + i)) 
				document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListTitle_' + i).disabled = false;
			 if (document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListSuffix_' + i)) 
				document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListSuffix_' + i).disabled = false;
      		}
}
function fNombres_Deshabilitados () 
{
	var i = 0;
          	for(var i=0; i<=9; i++) 
          	{                             
	         if (document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_TextBoxFirstName_' + i)) 
				document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_TextBoxFirstName_' + i).readOnly = true;
		     if (document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_TextBoxLastName_' + i)) 
				document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_TextBoxLastName_' + i).readOnly = true;
			 if (document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListTitle_' + i)) 
				document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListTitle_' + i).disabled = true;
			 if (document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListTitle_' + i)) 
				document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListTitle_' + i).disabled = true;
			 if (document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListSuffix_' + i)) 
				document.getElementById('CONTROLGROUPCHANGEPASSENGER_PASSENGERINPUT_DropDownListSuffix_' + i).disabled = true;
      		}
}
function fValidaLetras(e) {

           var key; var keychar;
          if (window.event)
            key = window.event.keyCode;
          else if (e) key = e.which;
          else return true;
          keychar = String.fromCharCode(key);
		// control keys
          if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) )
          return true;
          //numbers
          /* aqui marca error else if ((("ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz 0123456789#-_.@áéíóúÁÉÍÓÚ").indexOf(keychar) > -1)) return true; */
          // decimal point jump
          //else return false;
  	}
function fDibujarPromo(){

	var Ban;
	var MetodoPago;
	var NumCuenta;
	
	if (document.getElementById('PAYMENTINPUT_DropDownListPaymentMethodCode')){
	
           MetodoPago =	document.getElementById('PAYMENTINPUT_DropDownListPaymentMethodCode').value;
           NumCuenta = document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value;

   if (MetodoPago == 'ExternalAccount:A3'){
      if(document.getElementById('Promocional1')){  
        document.getElementById('Promocional1').style.display = 'block';
        document.getElementById('Promocional1').style.visibility = 'visible';
        }
     if(document.getElementById('Promocional2')){  
        document.getElementById('Promocional2').style.display = 'block';
        document.getElementById('Promocional2').style.visibility = 'visible';
        }
     if(document.getElementById('Promocional3')){
        document.getElementById('Promocional3').style.display = 'block';
        document.getElementById('Promocional3').style.visibility = 'visible';
        }
     if(document.getElementById('Promocional4')){   	  
        document.getElementById('Promocional4').style.display = 'block';
        document.getElementById('Promocional4').style.visibility = 'visible';
        }
     if(document.getElementById('Promocional5')){
        document.getElementById('Promocional5').style.display = 'block';
        document.getElementById('Promocional5').style.visibility = 'visible';
        }
     if(document.getElementById('Promocional6')){   	  
        document.getElementById('Promocional6').style.display = 'block';
        document.getElementById('Promocional6').style.visibility = 'visible';
       }
   } 
    if (MetodoPago == 'ExternalAccount:VI' || MetodoPago == 'ExternalAccount:MC')
	{     
	
		/* Funcion para promocion Banorte  */	
				
				if (PromoBanorte())
				{
			
			
			
			if(document.getElementById('BPromocional1')){  
        	document.getElementById('BPromocional1').style.display = 'block';
        	document.getElementById('BPromocional1').style.visibility = 'visible';
     	    }
   	  		if(document.getElementById('BPromocional2')){  
			document.getElementById('BPromocional2').style.display = 'block';
			document.getElementById('BPromocional2').style.visibility = 'visible';
			}
 		    if(document.getElementById('BPromocional3')){
			document.getElementById('BPromocional3').style.display = 'block';
			document.getElementById('BPromocional3').style.visibility = 'visible';
			}
   		    if(document.getElementById('BPromocional4')){   	  
			document.getElementById('BPromocional4').style.display = 'block';
			document.getElementById('BPromocional4').style.visibility = 'visible';
			}
	        if(document.getElementById('BPromocional5')){
      	    document.getElementById('BPromocional5').style.display = 'block';
            document.getElementById('BPromocional5').style.visibility = 'visible';
            }
		   		  /*  if(document.getElementById('BPromocional6')){   	  
        	document.getElementById('BPromocional6').style.display = 'block';
	        document.getElementById('BPromocional6').style.visibility = 'visible';
    	   }
		   
			if(document.getElementById('BPromocional7')){   	  
        	document.getElementById('BPromocional7').style.display = 'block';
	        document.getElementById('BPromocional7').style.visibility = 'visible';
    	   }*/
			
				}
				else
				{
					
					if(document.getElementById('BPromocional1')){
			document.getElementById('BPromocional1').style.display    = 'none';
			document.getElementById('BPromocional1').style.visibility = 'hidden';
     		}
		    if(document.getElementById('BPromocional2')){
 			document.getElementById('BPromocional2').style.display    = 'none';
	        document.getElementById('BPromocional2').style.visibility = 'hidden';
    		}
	       if(document.getElementById('BPromocional3')){   	  
		   document.getElementById('BPromocional3').style.display    = 'none';
           document.getElementById('BPromocional3').style.visibility = 'hidden';
      		}
		   if(document.getElementById('BPromocional4')){  	  
		   document.getElementById('BPromocional4').style.display    = 'none';
           document.getElementById('BPromocional4').style.visibility = 'hidden';
      	   }
		  if(document.getElementById('BPromocional5')){  	  
	      document.getElementById('BPromocional5').style.display    = 'none';
          document.getElementById('BPromocional5').style.visibility = 'hidden';
      	   }   	  
	   	  if(document.getElementById('BPromocional6')){  	  
		  document.getElementById('BPromocional6').style.display    = 'none';
          document.getElementById('BPromocional6').style.visibility = 'hidden';
      	 }
		 
		  if(document.getElementById('BPromocional7')){  	  
		  document.getElementById('BPromocional7').style.display    = 'none';
          document.getElementById('BPromocional7').style.visibility = 'hidden';
      	 }
     }
					
				
			 		
		/* Funcion para promocion Banorte  */
			
	
    	  if (fValidaCuentaBanamex2(MetodoPago,NumCuenta))
	  	{
	 		if(document.getElementById('Promocional1')){  
        	document.getElementById('Promocional1').style.display = 'block';
        	document.getElementById('Promocional1').style.visibility = 'visible';
     	    }
   	  		if(document.getElementById('Promocional2')){  
			document.getElementById('Promocional2').style.display = 'block';
			document.getElementById('Promocional2').style.visibility = 'visible';
			}
 		    if(document.getElementById('Promocional3')){
			document.getElementById('Promocional3').style.display = 'block';
			document.getElementById('Promocional3').style.visibility = 'visible';
			}
   		    if(document.getElementById('Promocional4')){   	  
			document.getElementById('Promocional4').style.display = 'block';
			document.getElementById('Promocional4').style.visibility = 'visible';
			}
	        if(document.getElementById('Promocional5')){
      	    document.getElementById('Promocional5').style.display = 'block';
            document.getElementById('Promocional5').style.visibility = 'visible';
            }
		    if(document.getElementById('Promocional6')){   	  
        	document.getElementById('Promocional6').style.display = 'block';
	        document.getElementById('Promocional6').style.visibility = 'visible';
    	   }
       } 
	  
	  	else
	  {
			if(document.getElementById('Promocional1')){
			document.getElementById('Promocional1').style.display    = 'none';
			document.getElementById('Promocional1').style.visibility = 'hidden';
     		}
		    if(document.getElementById('Promocional2')){
 			document.getElementById('Promocional2').style.display    = 'none';
	        document.getElementById('Promocional2').style.visibility = 'hidden';
    		}
	       if(document.getElementById('Promocional3')){   	  
		   document.getElementById('Promocional3').style.display    = 'none';
           document.getElementById('Promocional3').style.visibility = 'hidden';
      		}
		   if(document.getElementById('Promocional4')){  	  
		   document.getElementById('Promocional4').style.display    = 'none';
           document.getElementById('Promocional4').style.visibility = 'hidden';
      	   }
		  if(document.getElementById('Promocional5')){  	  
	      document.getElementById('Promocional5').style.display    = 'none';
          document.getElementById('Promocional5').style.visibility = 'hidden';
      	   }   	  
	   	  if(document.getElementById('Promocional6')){  	  
		  document.getElementById('Promocional6').style.display    = 'none';
          document.getElementById('Promocional6').style.visibility = 'hidden';
      	 }
     }
  }
 }
}



function PromoBanorte()
{

var cad;
var cad2;
var Bins = new Array(15);
var res;
var res2=new Array(1);

Bins [0]='491341';
Bins [1]='491366';
Bins [2]='491371';
Bins [3]='491375';
Bins [4]='491586';
Bins [5]='493157';
Bins [6]='493158';
Bins [7]='493172';
Bins [8]='493173';
Bins [9]='544548';
Bins [10]='544549';
Bins [11]='547050';
Bins [12]='547078';
Bins [13]='547079';
Bins [14]='547096';
Bins [15]='547097';




Array.prototype.find = function(searchStr) {
  var returnArray = false;
  for (i=0; i<this.length; i++) {
    if (typeof(searchStr) == 'function') {
      if (searchStr.Bins(this[i])) {
        if (!returnArray) { returnArray = [] }
        returnArray.push(i);
      }
    } else {
      if (this[i]===searchStr) {
        if (!returnArray) { returnArray = [] }
        returnArray.push(i);
      }
    }
  }
  return returnArray;
}

cad =document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value;

//alert(cad);

if(cad.length>5)
{
	res=Bins.find(cad.substring(0,6));
	//alert(res);
	if (parseInt(res[0])>=0 && parseInt(res[0])<=13)
		{
		//cad2=document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value;
		//alert('True');
		//document.getElementById('Promo').style.display = 'block';
		//document.getElementById('Promo').style.visibility = 'visible';	
			return true;
		}
	else
		{
		 //alert('Número de Tarjeta no Valida Para esta Promoción');
		 //document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value='';
		 //return false;
		}
}
}


function fDibujaPromoCupon(MetodoPago){

	var NumCuenta;
        NumCuenta = document.getElementById('NumTarjeta').value;
     var TipodePago;

     if (MetodoPago == 'VI') TipodePago='ExternalAccount:VI';
     if (MetodoPago == 'AX') TipodePago='ExternalAccount:AX';
     if (MetodoPago == 'MC') TipodePago='ExternalAccount:MC';
 
   if (MetodoPago == 'AX'){
	 if(document.getElementById('Banamex')){  
           document.getElementById('Banamex').style.display = 'none';
           document.getElementById('Banamex').style.visibility = 'hidden';
          }
	if(document.getElementById('AmericanExpress')){  
           document.getElementById('AmericanExpress').style.display = 'block';
           document.getElementById('AmericanExpress').style.visibility = 'visible';
          }
     } 
   if (MetodoPago != 'AX') {
	if(document.getElementById('AmericanExpress')){  
           document.getElementById('AmericanExpress').style.display    = 'none';
           document.getElementById('AmericanExpress').style.visibility = 'hidden';
          }
	 if (fValidaCuentaBanamex2(TipodePago,NumCuenta)){
	    if(document.getElementById('Banamex')){  
           document.getElementById('Banamex').style.display = 'block';
           document.getElementById('Banamex').style.visibility = 'visible';
          }
    	}
    }
 }
function fValidaCuentaBanamex2(tipo,field) {
 			var visaBins = new Array(24);
			var masterCardBins = new Array(40);
                     visaBins[0]  = '490176';              			
                        visaBins[1]  = '490178';                
                        visaBins[2]  = '493164';                
                        visaBins[3]  = '493165';                
                        visaBins[4]  = '405306';
                        visaBins[5]  = '407559';
                        visaBins[6]  = '420713';
                        visaBins[7]  = '407458';
                        visaBins[8]  = '408242';
                        visaBins[9]  = '410852';
                        visaBins[10] = '435741';
                        visaBins[11] = '454057';
                        visaBins[12] = '454069';
                        visaBins[13] = '491271';
                        visaBins[14] = '491502';
                        visaBins[15] = '408244';
                        visaBins[16] = '408245';
                        visaBins[17] = '455255';
                        visaBins[18] = '491272';
                        visaBins[19] = '491501';
                        visaBins[20] = '439120';
                        visaBins[21] = '454492';
                        visaBins[22] = '498460';
                        visaBins[23] = '441541';
    		          masterCardBins[0]  = '512823';		       
                       masterCardBins[1]  = '526489';
                       masterCardBins[2]  = '528866';
                       masterCardBins[3]  = '530756';
                       masterCardBins[4]  = '518853';
                       masterCardBins[5]  = '528804';
                       masterCardBins[6]  = '529088';
                       masterCardBins[7]  = '530056';
                       masterCardBins[8]  = '547075';
                       masterCardBins[9]  = '518004';
                       masterCardBins[10] = '520021';
                       masterCardBins[11] = '520608';
                       masterCardBins[12] = '525424';
                       masterCardBins[13] = '528805';
                       masterCardBins[14] = '528877';
                       masterCardBins[15] = '544925';
                       masterCardBins[16] = '545039';
                       masterCardBins[17] = '549631';
                       masterCardBins[18] = '549639';
                       masterCardBins[19] = '554625';
                       masterCardBins[20] = '559209';
                       masterCardBins[21] = '512709';
                       masterCardBins[22] = '512809';
                       masterCardBins[23] = '520213';
                       masterCardBins[24] = '522130';
                       masterCardBins[25] = '528843';
                       masterCardBins[26] = '528851';
                       masterCardBins[27] = '528875';
					   masterCardBins[28] = '529001';
					   masterCardBins[29] = '542537';
					   masterCardBins[30] = '544672';
					   masterCardBins[31] = '545631';
					   masterCardBins[32] = '512795';
					   masterCardBins[33] = '518899';
					   masterCardBins[34] = '529091';
					   masterCardBins[35] = '547093';
					   masterCardBins[36] = '547112';
					   masterCardBins[37] = '548234';
					   masterCardBins[38] = '548236';
					   masterCardBins[39] = '549138';

            var cadena =  field.substring(0,6);   
         
            if (tipo =='ExternalAccount:VI'){ 
				for (var x=0; x<24; x++) {
					 if (cadena == visaBins[x] ){
                          return true;  
					 }
				}
			}
		
            if (tipo =='ExternalAccount:MC'){ 

             for(var i = 0;  i < 40 ; i++){
					 if (cadena == masterCardBins[i]){
          			 return true;											  
					}
				 }
			}
			return false;
	}
	

function fValidarRadioBBanamex() {
			var textbox;
			textbox = document.getElementById('PAYMENTINPUT_TextBoxDIFPAY').value;
			
			if(textbox==''){
   	           alert('Selecciona la opci' + unescape('%F3') +'n de pagos diferidos ');
			   return false;
			} else  return true;
}
/**************CALENDARIO DE DISPONIBILIDAD *************************/
/* Funcion para cargar Imagenes */
function fCargaImagenCalendarioAdelante(NomDiv,NomImagen,RoundTrip){

	if (RoundTrip == 'IDA')
  	 document.getElementById(NomDiv).innerHTML = "<a  OnClick='return preventDoubleClick();' href='JavaScript:MesAdelante()'> <img src='" + NomImagen + "' ></img></a>"
	else
	 document.getElementById(NomDiv).innerHTML = "<a  OnClick='return preventDoubleClick();' href='JavaScript:MesAdelanteREGRESO()'> <img src='" + NomImagen + "' ></img></a>"
}
function fCargaImagenCalendarioAtras(NomDiv,NomImagen,RoundTrip){

	if (RoundTrip == 'IDA')
	   document.getElementById(NomDiv).innerHTML = "<div id='MesAtrasIda'><a OnClick='return preventDoubleClick();' href='JavaScript:MesAtras()' ><img src='" + NomImagen + "'></img></a><div>"
	else
  	  document.getElementById(NomDiv).innerHTML = "<a OnClick='return preventDoubleClick();'  href='JavaScript:MesAtrasREGRESO()' ><img src='" + NomImagen + "'></img></a>"
	   
}
function fCreaCampoHiddenIDA(Valor){
	
	var Campo;
      Campo = "<INPUT TYPE='HIDDEN' NAME='NumeroMesPaginaIDA' ID='NumeroMesPaginaIDA' VALUE='"  + Valor + "'>";
	  document.getElementById('CampoOcultoIDA').innerHTML = Campo;
}
function fCreaCampoHiddenREGRESO(Valor){
	
	var Campo;
      Campo = "<INPUT TYPE='HIDDEN' NAME='NumeroMesPaginaREGRESO' ID='NumeroMesPaginaREGRESO' VALUE='"  + Valor + "'>";
	  document.getElementById('CampoOcultoREGRESO').innerHTML = Campo;
}
function fCreaCampoFechaIDA(Valor){
	
	var Campo;
      Campo = "<INPUT TYPE='HIDDEN' maxlength='10' length='10' NAME='FechaIDA' ID='FechaIDA'  READONLY VALUE='"  + Valor + "'>";
	  document.getElementById('IDA').innerHTML = Campo;
}
function fCreaCampoFechaREGRESO(Valor){
	
	var Campo;
      Campo = "<INPUT TYPE='HIDDEN' maxlength='10' length='10' NAME='FechaREGRESO' ID='FechaREGRESO' READONLY VALUE='"  + Valor + "'>";	     document.getElementById('REGRESO').innerHTML = Campo;
}
/**IDA**/
function MesAdelante(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPag('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPag('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
		
}
function MesAtras(){
	 fSubmitSelectPag('&IDA=R');
}
/*************************************/
function MesAdelanteREGRESO(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPag('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPag('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function MesAtrasREGRESO(){

	fSubmitSelectPag('&VU=R');
}
function comparaColor(colorA, colorB) {

	if( (colorA.indexOf('#')   != -1 && colorB.indexOf('#')) ||  
		(colorA.indexOf('rgb') != -1 && colorB.indexOf('rgb') != -1 ) ) {

		return colorA.toLowerCase() == colorB.toLowerCase();
	}
	else {
		rgbColorA = colorA;
		rgbColorB = colorB;
		if(colorA.indexOf('#') != -1) rgbColorA = colorA.cambiaFormaRGB();
		if(colorB.indexOf('#') != -1) rgbColorB = colorB.cambiaFormaRGB();
		return rgbColorA.toLowerCase() == rgbColorB.toLowerCase();
	}
}
String.prototype.cambiaFormaRGB = function() {
	red   = parseInt(this.substring(1,3), 16);
	green = parseInt(this.substring(3,5), 16);
	blue  = parseInt(this.substring(5,7), 16);

	return 'rgb(' + red + ', ' + green + ', ' + blue + ')';
}
function fSeleccionaDiaCalendario(Obj,Tipo){
	if (Tipo == 'IDA'){
		document.getElementById(Obj).style.backgroundColor = '#f4cb8c';		
     	for (var i=1; i <= 31; i++ )
		{		 
			if (document.getElementById('IId_' + i)) {	 		    
				var colorA = document.getElementById('IId_' + i).style.backgroundColor;
				var colorB = '#f4cb8c';
				if(comparaColor(colorA, colorB))
					if (('IId_' + i) != Obj)
						document.getElementById('IId_' + i).style.backgroundColor = '#F0f5f9';
			}
	    }
    }
	
	if (Tipo == 'REGRESO'){
		document.getElementById(Obj).style.backgroundColor = '#f4cb8c';		
	     for (var i=1; i <= 31; i++ )
		 {		 
			 if (document.getElementById('RId_' + i)) {
			 	  var colorA = document.getElementById('RId_' + i).style.backgroundColor;
				  var colorB = '#f4cb8c'; 		 		    
				  if(comparaColor(colorA, colorB))
					  if (('RId_' + i) != Obj) 
					  	document.getElementById('RId_' + i).style.backgroundColor = '#F0f5f9';
			}	
		}
	}
				 
	
}

function fSeleccionaDiaCalendarioFindeSemana(Obj,Tipo){

	if (Tipo == 'IDA'){
		document.getElementById(Obj).style.backgroundColor = '#D17078';		
     	for (var i=1; i <= 31; i++ )
		{		 
			if (document.getElementById('IId_' + i)) {	 		    
				var colorA = document.getElementById('IId_' + i).style.backgroundColor;
				var colorB = '#D17078';
				if(comparaColor(colorA, colorB))
					if (('IId_' + i) != Obj)
						document.getElementById('IId_' + i).style.backgroundColor = '#F2CBCB';
			}
	    }
    }
	
	if (Tipo == 'REGRESO'){
		document.getElementById(Obj).style.backgroundColor = '#D17078';		
	     for (var i=1; i <= 31; i++ )
		 {		 
			 if (document.getElementById('RId_' + i)) {
			 	  var colorA = document.getElementById('RId_' + i).style.backgroundColor;
				  var colorB = '#D17078'; 		 		    
				  if(comparaColor(colorA, colorB))
					  if (('RId_' + i) != Obj) 
					  	document.getElementById('RId_' + i).style.backgroundColor = '#F2CBCB';
			}	
		}
	}
				 
	
}
function fColocaFechaIDA(Dia,Mes,Ano){
	
	var diaSel
	var mesSel

    diaSel = Dia
	mesSel = Mes
	

	if (Dia.length == 1)
		diaSel = '0' + Dia;	
	 		
	if (Mes.length == 1)
		mesSel = '0' + Mes;		

 document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth1').value = Ano + '-' + mesSel;
document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDay1').value = diaSel;
		
}
function fColocaFechaREGRESO(Dia,Mes,Ano){
	
	var diaSel
	var mesSel

    diaSel = Dia
	mesSel = Mes
	

	if (Dia.length == 1)
		diaSel = '0' + Dia;	
	 		
	if (Mes.length == 1)
		mesSel = '0' + Mes;		

document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth2').value = Ano + '-' + mesSel;
document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDay2').value = diaSel;
	
}
function fActualizaPagina(){

	if (document.getElementById('NumeroMesPaginaIDA'))
	    document.getElementById('NumeroMesPaginaIDA').value = '0';
    if (document.getElementById('NumeroMesPaginaREGRESO'))
	    document.getElementById('NumeroMesPaginaREGRESO').value = '0';
	
}
function fFechaIDASelec(Dia,Mes,Ano){
	
	var diaSel
	var mesSel

    diaSel = Dia
	mesSel = ''
	
	if (Dia.length == 1)
		diaSel = '0' + Dia;	
	
    switch(parseInt(Mes)){
		case 1:
		  mesSel = 'Enero';		  
		break;
		case 2:
		  mesSel = 'Febrero';		  
		break;
		case 3:
		  mesSel = 'Marzo';		  
		break;
		case 4:
		  mesSel = 'Abril';		  
		break;
		case 5:
		  mesSel = 'Mayo';		  
		break;
		case 6:
		  mesSel = 'Junio';		  
		break;
		case 7:
		  mesSel = 'Julio';		  
		break;
		case 8:
		  mesSel = 'Agosto';		  
		break;
		case 9:
		  mesSel = 'Septiembre';		  
		break;
		case 10:
		  mesSel = 'Octubre';		  
		break;
		case 11:
		  mesSel = 'Noviembre';		  
		break;
		case 12:
		  mesSel = 'Diciembre';		  
		break;
  }
	document.getElementById('FechaIDA').value = diaSel + "-" + mesSel + '-' + Ano;
}
function fFechaRegresoSelec(Dia,Mes,Ano){
	var diaSel

	var mesSel

    diaSel = Dia
	mesSel = ''
	
	if (Dia.length == 1)
		diaSel = '0' + Dia;	
    switch(parseInt(Mes)){
		
		case 1:
		  mesSel = 'Enero';		  
		break;
		case 2:
		  mesSel = 'Febrero';		  
		break;
		case 3:
		  mesSel = 'Marzo';		  
		break;
		case 4:
		  mesSel = 'Abril';		  
		break;
		case 5:
		  mesSel = 'Mayo';		  
		break;
		case 6:
		  mesSel = 'Junio';		  
		break;
		case 7:
		  mesSel = 'Julio';		  
		break;
		case 8:
		  mesSel = 'Agosto';		  
		break;
		case 9:
		  mesSel = 'Septiembre';		  
		break;
		case 10:
		  mesSel = 'Octubre';		  
		break;
		case 11:
		  mesSel = 'Noviembre';		  
		break;
		case 12:
		  mesSel = 'Diciembre';		  
		break;
  }
	document.getElementById('FechaREGRESO').value = diaSel + "-" + mesSel + '-' + Ano;
}
function fValidaSalida(){
	
	var mensaje;
	
	  if (document.getElementById('').value == ''){
          mensaje = '-Seleccione la Fecha de IDA-';		  		  
	  }
	  
	   if (document.getElementById('').value == ''){
          mensaje+= '-Seleccione la Fecha de REGRESO-';		  		  
	  }
}
function fCargaImagenEsquinas(NomDiv,NomImagen){

	   document.getElementById(NomDiv).innerHTML = "<img src='" + NomImagen + "'></img>"
}
function fValidaFechas(){
	
   if (document.getElementById('FechaIDA').value ==''){
		
		alert('-Seleccione una Fecha de IDA-');
		return false;
		
	}
if ( document.getElementById('FechaREGRESO')){

    if (document.getElementById('FechaREGRESO').value ==''){
		
		alert('-Seleccione una Fecha de VUELTA-');
		return false;
	}

	 var AnoIDA = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth1').value.substring(0,4);
	 var MesIDA = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth1').value.substring(5,7);	 
	 var DiaIDA = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDay1').value.substring(0,2);
 	 var AnoREGRESO = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth2').value.substring(0,4);
	 var MesREGRESO = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth2').value.substring(5,7);	 
	 var DiaREGRESO = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDay2').value.substring(0,2);
     var varFechaIDA      = new Date(AnoIDA,(MesIDA - 1) , DiaIDA);
     var varFechaREGRESO  = new Date(AnoREGRESO,(MesREGRESO - 1) , DiaREGRESO);
	
	   if (varFechaIDA > varFechaREGRESO){
		   alert('-La Fecha de IDA no puede ser mayor a la fecha de VUELTA- ');
		    return false;
	   }
    }
}
function fGuardaOrigenDestino(){
	
var idOrigen  = 'CONTROLGROUPAVAILABILITYSEARCHINPUT_AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1';
var idDestino = 'CONTROLGROUPAVAILABILITYSEARCHINPUT_AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1';

document.getElementById('OrigenSeleccionado').value = document.getElementById(idOrigen).value;
document.getElementById('DestinoSeleccionado').value = document.getElementById(idDestino).value;
	
}
function fRecuperaOrigenDestino(){
	
if (document.getElementById('OrigenSeleccionado').value != ''){

if (document.getElementById('OrigenSeleccionado')){
   document.getElementById('CONTROLGROUPAVAILABILITYSEARCHINPUT:AVAILABILITYSEARCHINPUT:DropDownListMarketOrigin1').value = document.getElementById('OrigenSeleccionado').value;		
	}
}
if(document.getElementById('DestinoSeleccionado').value != ''){	
	if (document.getElementById('DestinoSeleccionado')){
		document.getElementById('CONTROLGROUPAVAILABILITYSEARCHINPUT:AVAILABILITYSEARCHINPUT:DropDownListMarketDestination1').value = document.getElementById('DestinoSeleccionado').value;		
    } 
}

}
function fSubmitSelect(Evento){
	
   document.forms[0].method = 'POST';
   document.forms[0].action = 'LowFare.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var Src = '0';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   var SecondSegment = '';

   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
  if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
  if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;

  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC')) 
  Src = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
	
  }
 SecondSegment = '&Ori2=' + Des + '&Des2=' + Ori + '&Tramo=1';

 if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='LowFare.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Src=' + Src + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR  + SecondSegment;     
     } else{
        location.href='LowFareConnect.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Src=' + Src + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR + SecondSegment;    
     }
}
function fSubmitSelectPag(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'LowFare.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
 location.href='LowFare.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
function navegador(){

if(navigator.appName == 'Microsoft Internet Explorer'){
	var Empieza;
	var Version;
	
	Empieza = navigator.appVersion.indexOf('MSIE');
	Empieza+=5;
	Version = navigator.appVersion.substring(Empieza,Empieza+3);
	
   if (Version == '6.0'){
       	   
	   }
    if (Version == '7.0'){

     	document.getElementById('mainHead').style.marginLeft = '-220px';
	    document.getElementById('mainBody1').style.marginLeft = '-220px';
	    document.getElementById('mainFootCalendario1').style.marginLeft = '-220px'; 
   }
 
}

if(navigator.appName == 'Netscape'){

  		document.getElementById('mainHead').style.marginLeft = '-220px';
	    document.getElementById('mainBody1').style.marginLeft = '-220px';
	    document.getElementById('mainFootCalendario1').style.marginLeft = '-220px';
	  
     }
 
}
function fTarifas(Valor){

	if (Valor == '1'){
	
	if (document.getElementById('MesAtrasIda'))
        document.getElementById('MesAtrasIda').style.visibility = 'hidden';
		
	if (document.getElementById('MesAdelanteIda'))
        document.getElementById('MesAdelanteIda').style.visibility = 'hidden';	
	}
	if (Valor == '2'){
		
	if (document.getElementById('MesAtrasRegreso'))
        document.getElementById('MesAtrasRegreso').style.visibility = 'visible';
		
	if (document.getElementById('MesAdelanteRegreso'))
        document.getElementById('MesAdelanteRegreso').style.visibility = 'visible';	
	}

}
function fPonerEspera(){}
function fQuitarEspera(){}	
function fMensaje(numMes){
	
	if(numMes != 0){
		if(numMes < 2){
			alert('No hay mes anterior');
		}
		if(numMes >= 9){
			alert('No hay mes siguiente');
		}
	}

}
/**** FUNCIONES PARA LOWFARE INTEGRADO AVAILABILITY_SEARCH_INPUT *************/
function fTipoBusquedaSearch(Obj){
	
    if (Obj.value=='Precio'){
	    document.getElementById('marketDates').style.visibility='hidden';
		Obj.ckecked = true;
	}
	else {
  	    document.getElementById('marketDates').style.visibility='visible';
	    Obj.ckecked = true;
	}
}

function fTipoHref(){

    var theForm = document.forms['SkySales'];
    var SecondSegment = '';

       if (!theForm) {
            theForm = document.SkySales;
       }
         
       if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        
         var Origen,Destino,Tipo,FechaIda,FechaReg,ADT,CHD,INF,DiaIda,DiaReg
	 var SRC = '0';

         Origen   = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
         Destino  = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

       if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      Tipo      = 'OneWay'; 
       else   
     	      Tipo      = 'RoundTrip';   
        }
   
         DiaIda   = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDay1').value;         
         DiaReg   = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDay2').value;         
         FechaIda = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth1').value;
         FechaReg = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth2').value;
         ADT      = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	     CHD      = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value; 
         INF      = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
        
        if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC'))
		SRC  = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC').value; 
           

        if (esPuntoAPunto(Origen,Destino) == false){
            
         if(document.getElementById('TipoBusqueda').checked==true) {
               
               location.href='Continuidad.aspx?Ori=' + Origen + '&Des=' + Destino + '&Tipo=' + Tipo + '&Ida='+ FechaIda + '&Reg=' + FechaReg + '&ADT=' + ADT + '&CHD=' + CHD + '&INF=' + INF + '&SRC=' + SRC + '&DiaIda=' + DiaIda + '&DiaReg=' + DiaReg  ;
               return; 

               }

               if(document.getElementById('TipoBusqueda').checked==false) {

                 var tipoBusca;

                 if (Tipo == 'OneWay')
                      tipoBusca = '1'
                 else tipoBusca = '2'
 
                 SecondSegment = '&Ori2=' + Destino  + '&Des2=' + Origen;

                 location.href='LowFareConnect.aspx?Ori=' + Origen + '&Des=' + Destino + '&Tipo=' + tipoBusca  + '&Ida='+ FechaIda + '&Reg=' + FechaReg + '&ADT=' + ADT + '&CHD=' + CHD + '&INF=' + INF  + '&SRC=' + SRC + '&DiaIda=' + DiaIda + '&DiaReg=' + DiaReg + '&Evento=Buscar' + SecondSegment;
                 return;

               }
        }       
	
	if(document.getElementById('TipoBusqueda')){
		
		if(document.getElementById('TipoBusqueda').checked){
			
			if(fOnClick()==false) return;
			 fhref();
								
		  }else{			
			if(fOnClick()==false) return;
			fSubmitLowFare();									
		}
  	 }
   } // Forma Si no esta en Submit

	
}
function fClickTipo(){
}
function fSubmitLowFare(){
	
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var Src = '0';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   var SecondSegment = '';

   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;

  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC')) 
  Src = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC').value;

 SecondSegment = '&Ori2=' + Des  + '&Des2=' + Ori + '&Tramo=1';
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='LowFare.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Src=' + Src + '&Evento=Buscar' + SecondSegment  ;
     } else{
        location.href='LowFareConnect.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Src=' + Src + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
}
function setCheckedValue(radioObj, newValue) {

	if(!radioObj)
		return;

	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		return;
	}
	for(var i = 0; i < radioLength; i++) {

		radioObj[i].checked = false;
		if(radioObj[i].value == newValue.toString()) {
			radioObj[i].checked = true;
		}
	}

   document.getElementById('marketDates').style.visibility='hidden';

}
/************ POPUP MENU ***********************************/
function fPopup(URL,Alias)
{	
var Esp = "width=640, height=640, top=5, right=5, resizable=yes,scrollbars=yes";
 secCod = window.open(URL,Alias,Esp);	
}

function fPopupH(URL,Alias)
{	
var Esp = "width=965, height=585, top=5, right=5, resizable=yes,scrollbars=yes";
 secCod = window.open(URL,Alias,Esp);	
}
/****************************/
function addLoadEvent(func) {
   var oldonload = window.onload;
    
	if (typeof window.onload != 'function') {        
		
		window.onload = function fHold(){ 			
		               if (!document.getElementById('AMT'))
						 javascript:__doPostBack('PAYMENTINPUT','HOLD');
                }
    }
	else{
	     
      window.onload = function fHold( ){ 
					  if (!document.getElementById('AMT'))
    					javascript:__doPostBack('PAYMENTINPUT','HOLD');
				oldonload();
       }
    }
}
/**************PASAJEROS OCULTOS**************/
function addLoadEvent1(func) {
   var oldonload = window.onload;
 
	if (typeof window.onload != 'function') {        
		
		window.onload = function fOculta(){ 			
		               if (document.getElementById('seatAssignmentDisplayDiv'))
			        		document.getElementById('seatAssignmentDisplayDiv').style.visibility='Hidden'; 
                }
				
    }
	else{
	     
      window.onload = function fOculta( ){ 
					  if (document.getElementById('seatAssignmentDisplayDiv'))
    					document.getElementById('seatAssignmentDisplayDiv').style.visibility='Hidden'; 	
				oldonload();
												          					
       }
    }
}
/***************FUNCIONES PARA BANCO****************************************/
function fMuestraBanco(tipo){

	
	if (tipo=='AMEX'){
                if(document.getElementById('BancoEmisor'))      
		   document.getElementById('BancoEmisor').style.visibility = 'hidden';	
                if(document.getElementById('BancoEmisor1'))  
		    document.getElementById('BancoEmisor1').style.visibility = 'hidden';
                if(document.getElementById('BancoEmisor2'))  				
		   document.getElementById('BancoEmisor2').style.visibility = 'hidden';
			
	}else {
               if(document.getElementById('BancoEmisor'))  
		  document.getElementById('BancoEmisor').style.visibility = 'visible';	
               if(document.getElementById('BancoEmisor1'))  
		document.getElementById('BancoEmisor1').style.visibility = 'visible';
               if(document.getElementById('BancoEmisor2')) 	
		document.getElementById('BancoEmisor2').style.visibility = 'visible';
	}
}
function fColocaValorSub()
 {
  return true;	
}

function fValidaAddressVerification(){
	
	var msj = '';
	
	  if (document.getElementById('PAYMENTINPUT_TextBoxAvs__Address1'))		  	     
      		 if(document.getElementById('PAYMENTINPUT_TextBoxAvs__Address1').value=='')
	 		   msj+= 'Ingrese la Dirección del tarjetahabiente \n';			   			   
		 
      if (document.getElementById('PAYMENTINPUT_TextBoxAvs__PostalCode'))		  
      		 if(document.getElementById('PAYMENTINPUT_TextBoxAvs__PostalCode').value=='')
			   msj+= 'Ingrese el Código Postal \n';

     if (msj != ''){
		  alert(msj);
		  return false;
	 }
	     
	 else{
	 return true;	 
	 }
}
function fSubmitSelectPagPromo(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'LowFare.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf    = '';
   var Adt    = '';
   var Chd    = '';
   var Gratis = '0';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADA')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADA').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CNN')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CNN').value;
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_FREE')) 
  Gratis= document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_FREE').value;
  
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='SearchAllPromo.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Gratis=' + Gratis + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
function fSubmitSelectPromoLowFare(Evento){

  document.forms[0].method = 'POST';
  document.forms[0].action = 'LowFare.aspx';
  
   var Ori = '';
   var Des = '';
   var Inf    = '';
   var Adt    = '';
   var Chd    = '';
   var Gratis = '0';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADA')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADA').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CNN')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CNN').value;
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_FREE')) 
  Gratis= document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_FREE').value;
  
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
}

 location.href='LowFare.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Gratis=' + Gratis +'&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;
	
	
}
/**IDA**/
function MesAdelantePromo(){

	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagPromo('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagPromo('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
}
function MesAdelanteREGRESOPromo(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagPromo('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagPromo('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fAyudaLinea(){		 		
   var imagenWI = "images/InterJet/es/ayuda_online.jpg"   //Put here you image path   "Contact us"
   var Width = 380;
   var Height = 450;
   var winLeft = (screen.width  - Width)  / 2;
   var winTop  = 25;
   window
   var feature = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + Width +",height=" + Height + ",top=" + winTop +',left='+ winLeft;
   try {    
      } 
    catch(er)
	 {
      if (er != "OK")
	     {
	     document.write("<img src=" + imagenWI + " Alt=\"Disculpe la molestias, Por el momento Servicio no disponible\"> ")
	     }
  }

}
function fAyudaLinea2(){		 		
	
   var imagenWI = "images/InterJet/es/ayuda_online.jpg"   //Put here you image path   "Contact us"
   var Width = 380;
   var Height = 450;
   var winLeft = (screen.width  - Width)  / 2;
   var winTop  = 25;
   window
   var feature = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + Width +",height=" + Height + ",top=" + winTop +',left='+ winLeft;
   try {    
      } 
    catch(er)
	 {
      if (er != "OK")
	     {
	     document.write("<img src=" + imagenWI + " Alt=\"Disculpe la molestias, Por el momento Servicio no disponible\"> ")
	     }
  }
}
function fAyudaLinea3(){		 		
	
   var imagenWI = "images/InterJet/fle_azul.jpg"   //Put here you image path   "Contact us"
   var Width = 380;
   var Height = 450;
   var winLeft = (screen.width  - Width)  / 2;
   var winTop  = 25;
   window
   var feature = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + Width +",height=" + Height + ",top=" + winTop +',left='+ winLeft;
   try {    
      } 
    catch(er)
	 {
      if (er != "OK")
	     {
	     document.write("<img src=" + imagenWI + " Alt=\"Disculpe la molestias, Por el momento Servicio no disponible\"> ")
	     }
  }

}
function displayPopUpConverter()
		{
			var url = 'CurrencyConverter.aspx';
                        
			if (!window.converterWindow || converterWindow.closed)	
			{
				converterWindow = window.open(url,'converter','width=350,height=300,toolbar=0,status=0,location=0,menubar=0,scrollbars=0,resizable=0');
			}
			else
			{
				converterWindow.open(url,'converter','width=350,height=300,toolbar=0,status=0,location=0,menubar=0,scrollbars=0,resizable=0');
				converterWindow.focus();
			}
		}
       
/****************************/
function addLoadEventAX(func) {
   var oldonload = window.onload;
  
	if (typeof window.onload != 'function') {        
		
		window.onload = function fHold(){ 			
		               if (!document.getElementById('PAYMENTDISPLAY_TextBoxSecurity'))
						javascript:__doPostBack('PAYMENTINPUT$LinkButtonSubmit','');
                }
		    }
	else{
	     
      window.onload = function fHold( ){ 
					  if (!document.getElementById('PAYMENTDISPLAY_TextBoxSecurity'))
    					javascript:__doPostBack('PAYMENTINPUT$LinkButtonSubmit','');
				oldonload();
		}
    }
}
function validaDatosAX()
{
    var msj = '', mand = ' es obligatorio.\n';
	band = false;
		
    if (document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value.length != 15) {
		msj += 'El número de tarjeta es invalido (El número de tarjeta debe ser de 15 dígitos)\n';
	}
	if (document.getElementById('PAYMENTINPUT_TextBoxCC__VerificationCode').value.length != 4) {          
		msj += 'Código de seguridad invalido (El código de seguridad debe ser 4 dígitos)\n';
	} 						
	if (validateMod10(document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value) == false) {		
		msj += 'El número de tarjeta es invalido favor de verificar\n';		
	}
	if (document.getElementById('PAYMENTINPUT_TextBoxCC__AccountHolderName').value == '' ) {          
		msj += 'Ingrese el Nombre del tarjetahabiente \n';
	}
	if (document.getElementById('chkAcuerdo').checked == false ) {          
		msj += 'No ha ingresado que esta de acuerdo \n';
	} 							
	if (document.getElementById('PAYMENTDISPLAY_TextBoxSecurity')) {
		if (document.getElementById('PAYMENTDISPLAY_TextBoxSecurity').value == ''){
			msj += 'Ingrese el Texto de Seguridad \n';		
		}
	}
	if( msj != '' )
	{
		msj = 'Favor de corregir lo siguiente:\n\n' + msj;
		alert( msj );
		return false;
	}
	return true;
}
function validaDatosUATP()
{
    
	var msj = '', mand = ' es obligatorio.\n';
	band = false;
		
    	if (document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value.length != 15) {
		msj += 'El número de tarjeta es invalido (El número de tarjeta debe ser de 15 dígitos)\n';
	}
	
	var number = document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value;
	
	if(!Number(number)) {
		msj += 'El número de tarjeta es invalido favor de verificar\n';	
	}

	if (document.getElementById('PAYMENTDISPLAY_TextBoxSecurity')) {
		if (document.getElementById('PAYMENTDISPLAY_TextBoxSecurity').value == ''){
			msj += 'Ingrese el Texto de Seguridad \n';		
		}
	}

	if( msj != '' )
	{
		msj = 'Favor de corregir lo siguiente:\n\n' + msj;
		alert( msj );
		return false;
	}


	__doPostBack('PAYMENTINPUT$LinkButtonSubmit','');
	return true;
}
function validateAgencyAccount() {
}
function ValidaMail (Name){

var validEmailChars = '[^\:\,\;\#$\%\&\(\)\+\=\/]+';
var emailPattern = '^' + validEmailChars + '(\\.' + validEmailChars + ')?@' + validEmailChars + '(\\.' + validEmailChars + ')+$';
var mensaje = '';

if (!document.getElementById(Name).value.match(emailPattern)) {
     mensaje += 'El formato del correo electrónico no esta en el formato correcto\n'
 }
 return mensaje;
}
 function fLimpiaValores(){
    if (document.getElementById('CONTROLGROUPREGISTER_MEMBERINPUT_TextBoxAgentUserName')){
        document.getElementById('CONTROLGROUPREGISTER_MEMBERINPUT_TextBoxAgentUserName').value = document.getElementById('CONTROLGROUPREGISTER_MEMBERINPUT_TextBoxAgentUserName').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_MEMBERINPUT_TextBoxAgentUserName').value = document.getElementById('CONTROLGROUPREGISTER_MEMBERINPUT_TextBoxAgentUserName').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_MEMBERINPUT_TextBoxAgentUserName').value = document.getElementById('CONTROLGROUPREGISTER_MEMBERINPUT_TextBoxAgentUserName').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_MEMBERINPUT_TextBoxAgentUserName').value = document.getElementById('CONTROLGROUPREGISTER_MEMBERINPUT_TextBoxAgentUserName').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_MEMBERINPUT_TextBoxAgentUserName').value = document.getElementById('CONTROLGROUPREGISTER_MEMBERINPUT_TextBoxAgentUserName').value.replace(':','');
      }
     if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstName')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstName').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstName').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstName').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstName').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstName').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstName').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstName').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstName').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstName').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstName').value.replace(':','');
      }
    if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxLastName')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxLastName').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxLastName').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxLastName').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxLastName').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxLastName').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxLastName').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxLastName').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxLastName').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxLastName').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxLastName').value.replace(':','');
      }
	if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress1')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress1').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress1').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress1').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress1').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress1').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress1').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress1').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress1').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress1').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress1').value.replace(':','');
      }
       //TextBoxStreetAddress2
    if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress2')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress2').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress2').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress2').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress2').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress2').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress2').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress2').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress2').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress2').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress2').value.replace(':','');
      }
    if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress3')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress3').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress3').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress3').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress3').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress3').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress3').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress3').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress3').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress3').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxStreetAddress3').value.replace(':','');
      }
    if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxTownCity')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxTownCity').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxTownCity').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxTownCity').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxTownCity').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxTownCity').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxTownCity').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxTownCity').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxTownCity').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxTownCity').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxTownCity').value.replace(':','');
      }
     if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxPostalCode')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxPostalCode').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxPostalCode').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxPostalCode').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxPostalCode').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxPostalCode').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxPostalCode').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxPostalCode').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxPostalCode').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxPostalCode').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxPostalCode').value.replace(':','');
      }
     if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstPhone')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstPhone').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstPhone').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstPhone').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstPhone').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFirstPhone').value.replace(':','');
      }
    if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxSecondPhone')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxSecondPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxSecondPhone').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxSecondPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxSecondPhone').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxSecondPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxSecondPhone').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxSecondPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxSecondPhone').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxSecondPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxSecondPhone').value.replace(':','');
      }
    if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxCellPhone')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxCellPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxCellPhone').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxCellPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxCellPhone').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxCellPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxCellPhone').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxCellPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxCellPhone').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxCellPhone').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxCellPhone').value.replace(':','');
      }
    if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFax')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFax').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFax').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFax').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFax').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFax').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFax').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFax').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFax').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFax').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxFax').value.replace(':','');
      }
    if (document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxEmail')){
        document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxEmail').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxEmail').value.replace('<','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxEmail').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxEmail').value.replace('>','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxEmail').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxEmail').value.replace("'","");
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxEmail').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxEmail').value.replace(';','');
	document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxEmail').value = document.getElementById('CONTROLGROUPREGISTER_PERSONINPUT_TextBoxEmail').value.replace(':','');
      }
   return true;
  }
function disableCtrlKeyCombination(e)
{
       //list all CTRL + key combinations you want to disable
        var forbiddenKeys = new Array('a', 'n', 'c', 'x', 'v', 'j');
        var key;
        var isCtrl;

   if(window.event)
        {
                key = window.event.keyCode;     //IE
   
                if(window.event.ctrlKey)
                        isCtrl = true;
                else
                        isCtrl = false;
        }
        else
        {
                key = e.which;     //firefox
                if(e.ctrlKey)
                        isCtrl = true;
                else
                        isCtrl = false;
        }
        //if ctrl is pressed check if other key is in forbidenKeys array
        if(isCtrl)
        {
                for(i=0; i < forbiddenKeys.length; i++)
                {
                       
                        //case-insensitive comparation
                        if(forbiddenKeys[i].toLowerCase() == String.fromCharCode(key).toLowerCase())
                        {
                                //alert('Key combination CTRL + ' + String.fromCharCode(key) + ' has been disabled.');
                                return false;
                        }
                }
        }
        return true; 
}
function disableRightMouseClick(e,obj){

	if (window.event.type == 'select'){
     }
    
   if (window.event.button==2||window.event.button==3){
        
	alert('-Ingrese la confirmacion del Mail-');
   }
}
function pintaImpuestos(vuelo) {

	var html = "";
	html = 	Impuestos[vuelo] + "<br/><br/>";
	html += "<div style='border-top:#406AB0 solid 1px;'><b>" + Total[vuelo] + "</b></div>";

	document.getElementById('id_' + vuelo).innerHTML = html;
}

function pintaImpuestosHorizontal(vuelo) {

	var html = "";
	html = "IVA + TUA:" + Impuestos[vuelo] + "&nbsp;&nbsp;&nbsp    Total:" + Total[vuelo] + "";
	document.getElementById('idh_' + vuelo).innerHTML = html;

}
function calculaTotal(vuelo, marketIndex, precioBase) { 

var total = 0;

	if(marketIndex == 1) {
		total = Number(precioBase) + Number(impuestos);
		document.getElementById('tot_' + vuelo).innerHTML = impuestosCurrency(total);
	}
	if(marketIndex == 2) {

		total = Number(precioBase) + Number(impuestos);
		document.getElementById('tot_' + vuelo).innerHTML = impuestosCurrency(total);
	}
}
function calculaImpuestos(vuelo, marketIndex, precioBase) {

	if(marketIndex == 1) {

		impuestos = (Number(precioBase) * Number(IVAIDA)) + Number(TUAIDA);	
		document.getElementById('imp_' + vuelo).innerHTML = impuestosCurrency(impuestos);

	}

	if(marketIndex == 2) {

		impuestos = (Number(precioBase) * Number(IVAREG)) + Number(TUAREG);		
		document.getElementById('imp_' + vuelo).innerHTML = impuestosCurrency(impuestos);
	}
}
function impuestosCurrency(num) {

	num = num.toString().replace(/\$|\,/g,'');
	if(isNaN(num))
		num = "0";
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();
	if(cents<10)
		cents = "0" + cents;
	for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
		num = num.substring(0,num.length-(4*i+3))+
	num.substring(num.length-(4*i+3));
	
	return (((sign)?'':'-') + num + '.' + cents);
}
function fCreaRadioSet(valor,tipo) {

if (tipo == 'IDA')
document.getElementById(valor).innerHTML="<input type=radio id=seleccionaIDA name=seleccionaIDA value=" + valor + "</input>";
else
document.getElementById(valor).innerHTML="<input type=radio id=seleccionaREG name=seleccionaREG value=" + valor + "</input>";

}

function InformacionTransportacion()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+110))/4; 
	var specs = "width=550, height=295, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("Transportacion.html","codSeg",specs);	
}

/***AYUDA REMOTO***/
function LineaAyuda()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=450, height=450, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("LineaAyuda.html","codSeg",specs);	
}
/***FIN DE AYUDA REMOTO***/

function fDeshabilitaRuta()
{ 	
 var i;
	for (i=1; i<9; i++)
	{
         if (document.getElementById('DivRegreso_' + i)){

             document.getElementById('DivRegreso_' + i).style.visibility = 'hidden';

          }
	}
}
function ValidaEMailBool(mail) {

	var validEmailChars = '[^\:\,\;\#$\%\&\(\)\+\=\/]+';
	var emailPattern = '^' + validEmailChars + '(\\.' + validEmailChars + ')?@' + validEmailChars + '(\\.' + validEmailChars + ')+$';
	var mensaje = '';

	if (!mail.match(emailPattern)) {
           return false; 
	 }else{
           return true;
         }
}
function cargaDatos() {
	if(email != '' && iden != '') {
		document.getElementById("CONTROLGROUPAGENTLOGIN_AGENTLOGIN_TextBoxUserID").value = email;
		document.getElementById("CONTROLGROUPAGENTLOGIN_AGENTLOGIN_PasswordFieldPassword").value = iden;
		__doPostBack('CONTROLGROUPAGENTLOGIN$AGENTLOGIN$LinkButtonLogIn','');
	} else {

		var reemplaza = / +/gi;
		var url = window.location.href;
		url = unescape(url);
		url = url.replace(reemplaza, " ");
		var userPosition = url.indexOf("user");
		var pwdPosition  = url.indexOf("id");
		var ampPosition  = url.indexOf("&");
		var user = "";
		var pwd =  "";

		if(userPosition != -1 && pwdPosition != -1) {

			if(ampPosition != -1) {
				user = url.substring(userPosition + "user".length + 1, ampPosition)
				pwd =  url.substring(ampPosition + "id".length + 2, url.length);

				document.getElementById("CONTROLGROUPAGENTLOGIN_AGENTLOGIN_TextBoxUserID").value = user;
				document.getElementById("CONTROLGROUPAGENTLOGIN_AGENTLOGIN_PasswordFieldPassword").value = pwd;

				__doPostBack('CONTROLGROUPAGENTLOGIN$AGENTLOGIN$LinkButtonLogIn','');
			}
		}
	}
}
function fCreaRadioSet(valor, tipo, ruta) {
	var html = "";
	if(indice == 0)
		rutas[indice++] = ruta +  tipo;
	else 
		if(rutas[indice - 1] != (ruta + tipo))
			rutas[indice++] = ruta +  tipo;

	html = "<input type=radio id="  + ruta + tipo + " name=" + ruta + tipo + " value=" + valor + "></input>";
	document.getElementById(valor).innerHTML= html;
}
function InformacionTransportacion()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("Transportacion.html","codSeg",specs);	
}
function BoletosTerminoscondiciones()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=670, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=yes";
	secCod = window.open("TerminosyCondiciones.html","codSeg",specs);	
}
function TelecommTerminoscondiciones()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=670, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=yes";
	secCod = window.open("TerminosyCondicionesTelecomm.html","codSeg",specs);	
}
/***INICIO DE FUNCIONES DE HIPERVÍNCULO DE TRANSPORTACIÓN***/
function AntaraSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("Antara.html","codSeg",specs);	
}
function FAReformaSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("FAReforma.html","codSeg",specs);	
}
function SantaFeSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("SantaFe.html","codSeg",specs);	
}
function WTCSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("WTC.html","codSeg",specs);	
}
function NaucalpanSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("Naucalpan.html","codSeg",specs);	
}
function CancunSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";

	secCod = window.open("STTCancun.html","codSeg",specs);	
}
function PlayaDelCarmenSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("STTCarmen.html","codSeg",specs);	
}
function MonterreySTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("STTMonterrey.html","codSeg",specs);	
}
function MonterreyValleSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("STTMonterreyValle.html","codSeg",specs);	
}
function CuernavacaColibriSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("CuernavacaColibriSTT.html","codSeg",specs);	
}
function MexicaliSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("Mexicali.html","codSeg",specs);	
}
function EnsenadaSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("Ensenada.html","codSeg",specs);	
}

function TijuanaSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("AtoTijuana.html","codSeg",specs);	
}
function LosCabosSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("LosCabos.html","codSeg",specs);	
}
/***FIN DE FUNCIONES DE HIPERVÍNCULO DE TRANSPORTACIÓN***/
function InformacionPoliticasSTT()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+80))/4; 
	var specs = "width=650, height=540, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("TerminosSTT.html","codSeg",specs);	
}
function validaAlMenosUno() {
	var i = 0;
	var k = 0;
	var valorAND = false; // Esta variable indicara que al menos una opcion de cada una de las rutas haya sido seleccionada
	var ds = document.forms['SkySales'];
	if(!ds)
		ds = document.SkySales;
	var arreglo = new Array();
	var idx = 0;
	for(i=0; i < rutas.length; i++) {
		var radio = ds[rutas[i]];
		for(k=0; k < radio.length; k++) {
			if(radio[k].checked == 1) {
				arreglo[rutas[i]] = true;
				break;
			}
			else
				arreglo[rutas[i]] = false;
		}
	}

var errorSuttle = "";


	for(i=0; i < rutas.length; i++) {

		if(arreglo[rutas[i]] == false) {
			valorAND = false;
			errorSuttle +=  "Selecciona una opcion de la ruta: " + rutas[i] + "\n";
		}	
		else
			valorAND = true;		
	}	

	  if (rutas.length==0)
     errorSuttle="No existe servicio";

	if(valorAND == true) {
	        document.SkySales.method = "POST";
		document.SkySales.action="PaymentSTT.aspx";
		document.SkySales.submit();
		return true;
	}
		else {
		alert(errorSuttle);
		return false;
	}


}
function fDeshabilitaRuta()

{ 	
 var i;
	for (i=1; i<10; i++)
	{
	
         if (document.getElementById('DivRegreso_' + i)) {

             document.getElementById('DivRegreso_' + i).style.visibility = 'hidden';
	     document.getElementById('option2_' + i).style.visibility = 'hidden';
            }

	}

}
function pintaRutas(nombreDiv, numPax, sentido) {

	var i = 0;
	var html = "";

				html = "";
				html = "<select name='" + sentido + numPax + "' Id='" + sentido + numPax + "' style='font-size:11.9px'>";

				//alert(html);

				if(origenSuttle == "TLC") {
					if(sentido=="Ida_") {
						html += "<option value='ANT-TLC'>ANTARA-TOLUCA      </option>"
						html += "<option value='NAU-TLC'>NAUCALPAN-TOLUCA   </option>"
						html += "<option value='STF-TLC'>SANTA FE-TOLUCA    </option>"
						html += "<option value='WTC-TLC'>WTC CD. MEX-TOLUCA </option>"
						html += "<option value='CEN-TLC'>F.A. REFORMA-TOLUCA </option>"
					}
					else {
						html += "<option value='TLC-ANT'>TOLUCA-ANTARA      </option>"
						html += "<option value='TLC-NAU'>TOLUCA-NAUCALPAN   </option>"
						html += "<option value='TLC-STF'>TOLUCA-SANTA FE    </option>"
						html += "<option value='TLC-WTC'>TOLUCA-WTC CD. MEX </option>"
						html += "<option value='TLC-CEN'>TOLUCA-F.A. REFORMA </option>"
					}
				}
				else {
					if(sentido=="Reg_") {
						html += "<option value='ANT-TLC'>ANTARA-TOLUCA      </option>"
						html += "<option value='NAU-TLC'>NAUCALPAN-TOLUCA   </option>"
						html += "<option value='STF-TLC'>SANTA FE-TOLUCA    </option>"
						html += "<option value='WTC-TLC'>WTC CD. MEX-TOLUCA </option>"
						html += "<option value='CEN-TLC'>F.A. REFORMA-TOLUCA </option>"
					}
					else {
						html += "<option value='TLC-ANT'>TOLUCA-ANTARA      </option>"
						html += "<option value='TLC-NAU'>TOLUCA-NAUCALPAN   </option>"
						html += "<option value='TLC-STF'>TOLUCA-SANTA FE    </option>"
						html += "<option value='TLC-WTC'>TOLUCA-WTC CD. MEX </option>"
						html += "<option value='TLC-CEN'>TOLUCA-F.A. REFORMA </option>"
					}
				}

				html += "</select>";

			document.getElementById(nombreDiv).innerHTML = html;
	
}
/***INICIO DE FUNCIONES VISA****/
function fSubmitSelectAmex(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'AmexLowFare.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
 
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
 
 if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='AmexLowFare.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='LowFareConnect.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
}
function MesAdelanteVisa(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagVisa('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagVisa('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
		
}
function MesAdelanteREGRESOVisa(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagVisa('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagVisa('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagVisa(Params){
	
	document.forms[0].method = 'POST';
  document.forms[0].action = 'AmexLowFare.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
  location.href='AmexLowFare.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES VISA**/


/***INICIO DE FUNCIONES AMES 3000****/
function fSubmitSelectAmex3000(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'AmexLowFare3000.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
 
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
 
 if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='AmexLowFare3000.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='LowFareConnect.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
}
function MesAdelanteAmex3000(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagAmex3000('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagAmex3000('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
		
}
function MesAdelanteREGRESOAmex3000(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagAmex3000('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagAmex3000('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagAmex3000(Params){
	
	document.forms[0].method = 'POST';
  document.forms[0].action = 'AmexLowFare3000.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
  location.href='AmexLowFare3000.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES AMEX 3000***/
/***INICIO DE FUNCIONES AMERICAN EXPRESS****/
function fSubmitSelectAmericanExpress(Evento){

  document.forms[0].method = 'POST';
  document.forms[0].action = 'AmericanExpressLowFare.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';

   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
 if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='AmericanExpressLowFare.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='LowFareConnect.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
}
function MesAdelanteAmericanExpress(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagAmericanExpress('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagAmericanExpress('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
	
}
function MesAdelanteREGRESOAmericanExpress(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagAmericanExpress('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagAmericanExpress('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagAmericanExpress(Params){
	
   document.forms[0].method = 'POST';
  document.forms[0].action = 'AmericanExpressLowFare.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
  location.href='AmericanExpressLowFare.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES AMERICAN EXPRESS**/
/***INICIO DE FUNCIONES CONGRESOS Y CONVENCIONES****/
function fSubmitSelectCongresosyConvenciones(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'CongresosyConvenciones.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='CongresosyConvenciones.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='LowFareConnect.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteCongresosyConvenciones(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagCongresosyConvenciones('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagCongresosyConvenciones('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOCongresosyConvenciones(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagCongresosyConvenciones('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagCongresosyConvenciones('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagCongresosyConvenciones(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'CongresosyConvenciones.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='CongresosyConvenciones.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES DE CONGRESOS Y CONVENCIONES**/


function fSubmitSelectAlfa(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionAlfa.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionAlfa.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionAlfa.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteAlfa(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagAlfa('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagAlfa('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOAlfa(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagAlfa('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagAlfa('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagAlfa(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'PromocionAlfa.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='PromocionAlfa.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}


function fSubmitSelectradioshack(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'Promocionradioshack.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='Promocionradioshack.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='Promocionradioshack.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteradioshack(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagradioshack('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagradioshack('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOradioshack(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagradioshack('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagradioshack('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagradioshack(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'Promocionradioshack.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='Promocionradioshack.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}



function fSubmitSelectdeacero(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'Promociondeacero.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='Promociondeacero.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='Promociondeacero.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelantedeacero(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagdeacero('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagdeacero('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOdeacero(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagdeacero('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagdeacero('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagdeacero(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'Promociondeacero.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='Promociondeacero.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}



function fSubmitSelectcanacintra(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'Promocioncanacintra.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='Promocioncanacintra.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='Promocioncanacintra.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelantecanacintra(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagcanacintra('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagcanacintra('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOcanacintra(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagcanacintra('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagcanacintra('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagcanacintra(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'Promocioncanacintra.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='Promocioncanacintra.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}




function fSubmitSelectcoparmex(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'Promocioncoparmex.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='Promocioncoparmex.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='Promocioncoparmex.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelantecoparmex(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagcoparmex('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagcoparmex('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOcoparmex(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagcoparmex('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagcoparmex('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagcoparmex(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'Promocioncoparmex.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='Promocioncoparmex.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}



function fSubmitSelectproctergamble(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'Promocionproctergamble.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='Promocionproctergamble.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='Promocionproctergamble.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteproctergamble(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagproctergamble('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagproctergamble('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOproctergamble(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagproctergamble('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagproctergamble('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagproctergamble(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'Promocionproctergamble.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='Promocionproctergamble.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}





function fSubmitSelectventaespecial(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'Promocionventaespecial.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='Promocionventaespecial.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='Promocionventaespecial.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteventaespecial(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagventaespecial('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagventaespecial('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOventaespecial(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagventaespecial('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagventaespecial('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagventaespecial(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'Promocionventaespecial.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='Promocionventaespecial.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}







function fSubmitSelecttdu(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'Promociontdu.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='Promociontdu.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='Promociontdu.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelantetdu(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagtdu('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagtdu('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOtdu(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagtdu('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagtdu('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagtdu(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'Promociontdu.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='Promociontdu.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}




/***PROMCOION Issfam 15 POR CIENTO****/
function fSubmitSelectIssfam(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionIssfam.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionIssfam.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionIssfam.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteIssfam(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagIssfam('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagIssfam('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOIssfam(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagIssfam('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagIssfam('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagIssfam(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'PromocionIssfam.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='PromocionIssfam.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES DE Issfam 15 POR CIENTO**/




/***PROMCOION CREDOMATIC 10 POR CIENTO****/
function fSubmitSelectCredomatic(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionCredomatic.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionCredomatic.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionCredomatic.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteCredomatic(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagCredomatic('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagCredomatic('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOCredomatic(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagCredomatic('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagCredomatic('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagCredomatic(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'PromocionCredomatic.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='PromocionCredomatic.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES DE CREDOMATIC 10 POR CIENTO**/



/***PROMCOION Domeq 10 POR CIENTO****/
function fSubmitSelectDomecq(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionDomecq.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionDomecq.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionDomecq.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteDomecq(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagDomecq('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagDomecq('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESODomecq(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagDomecq('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagDomecq('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagDomecq(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'PromocionDomecq.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='PromocionDomecq.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES DE Domeq 10 POR CIENTO**/




/***PROMCOION Movistar 10 POR CIENTO****/
function fSubmitSelectMoviStar(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionMovistar.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionMovistar.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionMovistar.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteMovistar(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagMovistar('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagMovistar('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOMovistar(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagMovistar('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagMovistar('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagMovistar(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'PromocionMovistar.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='PromocionMovistar.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES DE Movistar 10 POR CIENTO**/





/**PROMCOION WALMART 15 POR CIENTO****/
function fSubmitSelectWalMart(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionAsociadosWalMart.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionAsociadosWalMart.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionAsociadosWalMart.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteWalMart(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagWalMart('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectWalMart('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOWalMart(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagWalMart('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagWalMart('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagWalMart(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'PromocionAsociadosWalMart.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='PromocionAsociadosWalMart.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES DE WALMART 15 POR CIENTO**/
/***PROMCOION EMPLEADOS 15 POR CIENTO****/
function fSubmitSelectEmpleados(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionEmpleados.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionEmpleados.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionEmpleados.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteEmpleados(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagEmpleados('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagEmpleados('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOEmpleados(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagEmpleados('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagEmpleados('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagEmpleados(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'PromocionEmpleados.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='PromocionEmpleados.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES DE EMPLEADOS 15 POR CIENTO**/
/***PROMCOION CANACO 10 POR CIENTO****/
function fSubmitSelectCanaco(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionCanaco.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionCanaco.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionCanaco.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteCanaco(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagCanaco('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagCanaco('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOCanaco(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagCanaco('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagCanaco('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagCanaco(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'PromocionCanaco.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='PromocionCanaco.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES DE CANACO 10 POR CIENTO**/
/***PROMCOION CCUPON PAK 10 POR CIENTO****/
function fSubmitSelectCuponPak(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionCuponPak.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionCuponPak.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionCuponPak.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteCuponPak(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagCuponPak('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagCuponPak('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOCuponPak(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagCuponPak('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagCuponPak('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagCuponPak(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'PromocionCuponPak.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='PromocionCuponPak.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES DE CUPON PAK 10 POR CIENTO**/
/***PROMCOION SAMS 10 POR CIENTO****/
function fSubmitSelectSams(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionSams.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionSams.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionSams.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteSams(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagSams('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagSams('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOSams(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagSams('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagSams('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagSams(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'PromocionSams.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='PromocionSams.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES DE SAMS 10 POR CIENTO**/
/***PROMCOION Scotiabank 10  POR CIENTO****/
function fSubmitSelectScotiabank(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionScotiabank.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }
  
if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionScotiabank.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionScotiabank.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
	
}
function MesAdelanteScotiabank(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagScotiabank('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagScotiabank('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOScotiabank(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagScotiabank('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagScotiabank('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagScotiabank(Params){
	
	document.forms[0].method = 'POST';
	document.forms[0].action = 'PromocionScotiabank.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
    
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='PromocionScotiabank.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
/***FIN DE FUNCIONES DE Scotiabank 10 POR CIENTO**/
/***INICIO DE FUNCIONES Amex Promo 15 %***/
function fSubmitSelectAmexPromo(Evento){

  document.forms[0].method = 'POST';
  document.forms[0].action = 'AmericanExpressPromo.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
	if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
  if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
  if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
   }
 
 if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='AmericanExpressPromo.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionCorporatecard.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
}
function MesAdelanteAmexPromo(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagAmexPromo('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagAmexPromo('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
	
}
function MesAdelanteREGRESOAmexPromo(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagAmexPromo('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagAmexPromo('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagAmexPromo(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'AmericanExpressPromo.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
 
 location.href='AmericanExpressPromo.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;

}
/***FIN DE FUNCIONES DE FUNCIONES Amex Promo 15 %***/
/***INICIO DE FUNCIONES DEPORTEISMO 10 %***/
function fSubmitSelectDeporteismo(Evento){

  document.forms[0].method = 'POST';
  document.forms[0].action = 'DeporteismoPromo.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
	if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
  if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
  if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
   }
 
 if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='DeporteismoPromo.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='DeporteismoPromo.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
}
function MesAdelanteDeporteismo(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagDeporteismo('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagDeporteismo('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
	
}
function MesAdelanteREGRESODeporteismo(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagADeporteismo('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagDeporteismo('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagDeporteismo(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'DeporteismoPromo.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
 
 location.href='DeporteismoPromo.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;

}
/***FIN DE FUNCIONES DE DEPORTEISMO 10 %***/
/***INICIO DE FUNCIONES American Express Empresa 15 %***/
function fSubmitSelectAmericanExpressEmpresa(Evento){
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionesAmericanExpress.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
	if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
  if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
  if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
   }
 
 if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionesAmericanExpress.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionCorporatecard.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
}
function MesAdelanteAmexPromociones(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectAmericanExpressEmpresa('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectAmericanExpressEmpresa('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
	
}
function MesAdelanteREGRESOAmexPromociones(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectAmericanExpressEmpresa('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectAmericanExpressEmpresa('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectAmericanExpressEmpresa(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionesAmericanExpress.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
 
 location.href='PromocionesAmericanExpress.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
}
/***FIN DE FUNCIONES American Express Empresa 15 %***/
/***INICIO DE FUNCIONES PROMOCIONES HP Empresa 15 %***/
function fSubmitSelectHP(Evento){

  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionesHP.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
	if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
  if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
  if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
   }
 
 if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionesHP.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionesHP.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
}
function MesAdelanteHP(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagHP('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagHP('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
	
}
function MesAdelanteREGRESOHP(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagHP('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagHP('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagHP(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionesHP.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
 
 location.href='PromocionesHP.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;

}

/***FIN DE FUNCIONES PROMOCIONES HP Empresa 15 %***/
/***INICIO DE FUNCIONES PROMOCIONES Sitatyr 15 %***/
function fSubmitSelectSitatyr(Evento){

  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionesSitatyr.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
	if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
  if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
  if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
   }
 
 if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='PromocionesSitatyr.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionesSitatyr.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
}
function MesAdelanteSitatyr(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagSitatyr('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagSitatyr('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
	
}
function MesAdelanteREGRESOSitatyr(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagSitatyr('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagSitatyr('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagSitatyr(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionesSitatyr.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
 
 location.href='PromocionesSitatyr.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;

}

/***FIN DE FUNCIONES PROMOCIONES Sitatyr 15 %***/
/***INICIO DE FUNCIONES Banorte Promo 15 % todas las tarjetas***/
function fSubmitSelectBanortePromo(Evento){

  document.forms[0].method = 'POST';
  document.forms[0].action = 'BanortePromo.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
	if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
  if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
  if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
   }
 
 if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='BanortePromo.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='PromocionCorporatecard.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
}
function MesAdelanteBanortePromo(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagBanortePromo('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagBanortePromo('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
	
}
function MesAdelanteREGRESOBanortePromo(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagBanortePromo('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagBanortePromo('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagBanortePromo(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'BanortePromo.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
 
 location.href='BanortePromo.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;

}
/***FIN DE FUNCIONES DE FUNCIONES Banorte Promo 15 % todas las tarjetas***/
/***INICIO DE FUNCIONES Venta Nocturna  15 % tarjetas solo American Express***/
function fSubmitSelectPromocionNocturna(Evento){

  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionVentaNocturna.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
	if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
  if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
  if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
   }
 
 if (esPuntoAPunto(Ori,Des) == true)
 { 
        location.href='PromocionVentaNocturna.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     }
 else{
        location.href='PromocionVentaNocturna.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
}
function MesAdelantePromocionNocturna(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagPromocionNocturna('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagPromocionNocturna('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
	
}
function MesAdelanteREGRESOPromocionNocturna(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagPromocionNocturna('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagPromocionNocturna('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagPromocionNocturna(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'PromocionVentaNocturna.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
  location.href='PromocionVentaNocturna.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;

}
/***FIN DE FUNCIONES DE FUNCIONES Venta Nocturna 15 % tsolo American Expres***/


/***INICIO SHUTLEITINERARY***/
function fSubmitSelectShutle(Evento){

  document.forms[0].method = 'POST';
  document.forms[0].action = 'ShutleItinerary.aspx';
   
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';

   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
	 
  }
  
 location.href='ShuttleItinerary.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;
}
/***FIN SHUTLE ITINERARY  ***/
function RandomNumber() {
	var number = Math.floor(Math.random() * 10);
	document.getElementById("genericTopRight").innerHTML = "<img src='images/Interjet/" + number + ".jpg' height='190'>";
}
/******* HECTOR BARRER *****/
function comparaFecha(fecha,fecha1){
fec=fecha.split("-");
fec1=fecha1.split("-");
//alert(fec[2]+fec[1]+fec[0]);
//alert(fec1[2]+fec1[1]+fec1[0]);
var num1= parseInt(fec[2]+fec[1]+fec[0]);
var num2= parseInt(fec1[2]+fec1[1]+fec1[0]);

if (parseInt(num1)>=parseInt(num2))
{
	return 1;
}
else 
{
	return 0;
}
} 
function evaluaFecha() { 
	var ds = document.forms['SkySales'];

	if (!ds)
		ds = document.Skysales;

	var dia = ds['Dia'].value;
	var mes = ds['Mes'].value;
	var ano = ds['Ano'].value;

	var now = new Date();
		
	var currentDay   = now.getDate();
	var currentMonth = now.getMonth();
	var currentYear  = now.getFullYear();
	
	var hoy=currentDay+"-"+(currentMonth+1)+"-"+currentYear;
	var captura=dia+"-"+mes+"-"+ano;
	
	//alert(ano);	
	//alert(captura);
		
	var i =comparaFecha(captura,hoy);
	//alert(i);	
	
		if(i==1) {
		document.SkySales.method = "POST";
		document.SkySales.action="ShuttleItinerary.aspx";
		document.SkySales.submit();
			 }
	else
	{
		
		var msg ="Fecha invalida: Debe ser mayor o igual a la fecha actual";
		alert(msg);
	}
	
}
function evaluaFechaCUN() { 
	
	var ds = document.forms['SkySales'];

	if (!ds)
		ds = document.Skysales;

	var dia = ds['Dia'].value;
	var mes = ds['Mes'].value;
	var ano = ds['Ano'].value;

	var now = new Date();
		
	var currentDay   = now.getDate();
	var currentMonth = now.getMonth();
	var currentYear  = now.getFullYear();
	
	var hoy=currentDay+"-"+(currentMonth+1)+"-"+currentYear;
	var captura=dia+"-"+mes+"-"+ano;
	
	//alert(ano);	
	//alert(captura);
		
	var i =comparaFecha(captura,hoy);
	//alert(i);	
	
		if(i==1) {
		document.SkySales.method = "POST";
		document.SkySales.action="ShuttleItineraryCUN.aspx";
		document.SkySales.submit();
			 }
	else
	{
		
		var msg ="Fecha invalida: Debe ser mayor o igual a la fecha actual";
		alert(msg);
	}

}

function evaluaFecha2() { 

	var ds = document.forms['SkySales'];

	if (!ds)
		ds = document.Skysales;

	var dia = ds['Dia'].value;
	var mes = ds['Mes'].value;
	var ano = ds['Ano'].value;
	var now = new Date();
	var currentDay   = now.getDate();
	var currentMonth = now.getMonth();
	var currentYear  = now.getFullYear();
	var msg = "";
	var si = false;

	if(dia >= currentDay) {

		if(mes >= currentMonth + 1) {

			if(ano >= currentYear) 
				si = true;
			else 
				msg = "Fecha invalida: Debe ser mayor o igual a la fecha actual";
		}	
		else  {
			if(ano > currentYear) 
				si = true;
			else 
				msg = "Fecha invalida: Debe ser mayor o igual a la fecha actual";
		}
	}
	else {
		
		if(mes > currentMonth + 1) {
		
			if(ano >= currentYear) 				
				si = true;
			else
				msg = "Fecha invalida: Debe ser mayor o igual a la fecha actual";
		}
		else {
			if(ano > currentYear) 				
				si = true;
			else
				msg = "Fecha invalida: Debe ser mayor o igual a la fecha actual";
		}
	}
	
	if(si) {
		document.SkySales.method = "POST";
		document.SkySales.action="ShuttleItineraryCUN.aspx";
		document.SkySales.submit();
	}
	else
		alert(msg);
}
function evaluaFechaMTY() { 
	
	var ds = document.forms['SkySales'];

	if (!ds)
		ds = document.Skysales;

	var dia = ds['Dia'].value;
	var mes = ds['Mes'].value;
	var ano = ds['Ano'].value;

	var now = new Date();
		
	var currentDay   = now.getDate();
	var currentMonth = now.getMonth();
	var currentYear  = now.getFullYear();
	
	var hoy=currentDay+"-"+(currentMonth+1)+"-"+currentYear;
	var captura=dia+"-"+mes+"-"+ano;
	
	//alert(ano);	
	//alert(captura);
		
	var i =comparaFecha(captura,hoy);
	//alert(i);	
	
		if(i==1) {
		document.SkySales.method = "POST";
		document.SkySales.action="ShuttleItineraryMTY.aspx";
		document.SkySales.submit();
			 }
	else
	{
		
		var msg ="Fecha invalida: Debe ser mayor o igual a la fecha actual";
		alert(msg);

	}
}
function evaluaFechaMEX() { 

	var ds = document.forms['SkySales'];

	if (!ds)
		ds = document.Skysales;

	var dia = ds['Dia'].value;
	var mes = ds['Mes'].value;
	var ano = ds['Ano'].value;

	var now = new Date();
		
	var currentDay   = now.getDate();
	var currentMonth = now.getMonth();
	var currentYear  = now.getFullYear();
	
	var hoy=currentDay+"-"+(currentMonth+1)+"-"+currentYear;
	var captura=dia+"-"+mes+"-"+ano;
	
	//alert(ano);	
	//alert(captura);
		
	var i =comparaFecha(captura,hoy);
	//alert(i);	
	
		if(i==1) {
		document.SkySales.method = "POST";
		document.SkySales.action="ShuttleItineraryMEX.aspx";
		document.SkySales.submit();
			 }
	else
	{
		
		var msg ="Fecha invalida: Debe ser mayor o igual a la fecha actual";
	alert(msg);
	}
}
function evaluaFechaSJD() { 

	var ds = document.forms['SkySales'];

	if (!ds)
		ds = document.Skysales;

	var dia = ds['Dia'].value;
	var mes = ds['Mes'].value;
	var ano = ds['Ano'].value;

	var now = new Date();
		
	var currentDay   = now.getDate();
	var currentMonth = now.getMonth();
	var currentYear  = now.getFullYear();
	
	var hoy=currentDay+"-"+(currentMonth+1)+"-"+currentYear;
	var captura=dia+"-"+mes+"-"+ano;
	
	//alert(ano);	
	//alert(captura);
		
	var i =comparaFecha(captura,hoy);
	//alert(i);	
	
		if(i==1) {
		document.SkySales.method = "POST";
		document.SkySales.action="ShuttleItinerarySJD.aspx";
		document.SkySales.submit();
			 }
	else
	{
		
		var msg ="Fecha invalida: Debe ser mayor o igual a la fecha actual";
	alert(msg);
	}
}

function evaluaFechaCUER() { 
	
	var ds = document.forms['SkySales'];

	if (!ds)
		ds = document.Skysales;

	var dia = ds['Dia'].value;
	var mes = ds['Mes'].value;
	var ano = ds['Ano'].value;

	var now = new Date();
		
	var currentDay   = now.getDate();
	var currentMonth = now.getMonth();
	var currentYear  = now.getFullYear();
	
	var hoy=currentDay+"-"+(currentMonth+1)+"-"+currentYear;
	var captura=dia+"-"+mes+"-"+ano;
	
	//alert(ano);	
	//alert(captura);
		
	var i =comparaFecha(captura,hoy);
	//alert(i);	
	
		if(i==1) {
		document.SkySales.method = "POST";
		document.SkySales.action="ShuttleItinerary.aspx";
		document.SkySales.submit();
			 }
	else
	{
		
		var msg ="Fecha invalida: Debe ser mayor o igual a la fecha actual";
		alert(msg);
	}
}
function evaluaFechaTIJ() { 
	
	var ds = document.forms['SkySales'];

	if (!ds)
		ds = document.Skysales;

	var dia = ds['Dia'].value;
	var mes = ds['Mes'].value;
	var ano = ds['Ano'].value;

	var now = new Date();
		
	var currentDay   = now.getDate();
	var currentMonth = now.getMonth();
	var currentYear  = now.getFullYear();
	
	var hoy=currentDay+"-"+(currentMonth+1)+"-"+currentYear;
	var captura=dia+"-"+mes+"-"+ano;
	
	//alert(ano);	
	//alert(captura);
		
	var i =comparaFecha(captura,hoy);
	//alert(i);	
	
		if(i==1) {
		document.SkySales.method = "POST";
		document.SkySales.action="ShuttleItineraryTIJ.aspx";
		document.SkySales.submit();
			 }
	else
	{
		
		var msg ="Fecha invalida: Debe ser mayor o igual a la fecha actual";
		alert(msg);

	}
}
/**INICIO DE CAMBIO DE NOMBRE **/
function TerminosCambiodeNombre()
{
	var specs = "width=696, height=662, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	
	secCod = window.open("CambiodeNombre.html","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
/** FIN DE CAMBIO DE NOMBRE**/
function FAQ()
{
	var specs = "width=696, height=662, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	
	secCod = window.open("FAQ.html","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
function InformacionSeguro()
{
	var winLeft = (screen.width-450)/4; 
	var winTop = (screen.height-(10335+110))/4; 
	var specs = "width=650, height=550, top="+ winTop +", left="+ winLeft +", resizable=no,scrollbars=no";
	secCod = window.open("InformacionSeguro.html","codSeg",specs);	
}
function Cobertura()
{
	var specs = "width=696, height=662, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	
	secCod = window.open("cobertura.html","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}

function fPasoSTT() {//1
	var ds = document.forms['SkySales'];
	if(!ds)
		ds = document.SkySales;
	var header = "Acepto la compra de servicios complementarios:\n\n";
	var msg = ""

	if(ds['checkbox_STT'] != undefined) {//2
		if (document.getElementById('CONTROLGROUPPASSENGER_INSURANCEFEE_on').checked == false && ds['checkbox_STT'][0].checked == false) {//3
			__doPostBack('CONTROLGROUPPASSENGER$LinkButtonSubmit','');
			return true;
	        }//4

		if(ds['checkbox_STT'][0].checked)
			msg += " * Servicio de Transportación Terrestre\n";
	
		if(document.getElementById('CONTROLGROUPPASSENGER_INSURANCEFEE_on').checked)				 
			msg += " * Servicio de Asistencia Segura\n";		


		if(ds['checkbox_STT'][0].checked) {//5
                 
				document.SkySales.method = "POST";
				document.SkySales.action="PassengerSTT.aspx";
				document.SkySales.submit();
				return true;

		} //6
		else {//7
			if(msg != "") {//8
							                     				
				__doPostBack('CONTROLGROUPPASSENGER$LinkButtonSubmit','');				
				return true;
			}//9
		}//10

	}//11
	else if(ds['CONTROLGROUPPASSENGER$INSURANCEFEE$SegurosACE'] != undefined) {//12
		
		
		if (document.getElementById('CONTROLGROUPPASSENGER_INSURANCEFEE_on').checked == false) {//13
       
			__doPostBack('CONTROLGROUPPASSENGER$LinkButtonSubmit','');
			return true;
	        }//14

		if(document.getElementById('CONTROLGROUPPASSENGER_INSURANCEFEE_on').checked)				 
			msg += " * Servicio de Asistencia Segura\n";	

		if(msg != "") {//15
			__doPostBack('CONTROLGROUPPASSENGER$LinkButtonSubmit','');
			return true;
		}//16
	
	} //17
	else {	//18
	
		__doPostBack('CONTROLGROUPPASSENGER$LinkButtonSubmit','');
		return true;
        }//19
       		
}//20
function InformeSeguradora()
{
	var specs = "width=720, height=720, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	
	secCod = window.open("TerminosdeSeguro.html","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
function DetalledeSeguro()
{
	var specs = "width=720, height=710, top=5, right=10, resizable=no, scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	secCod = window.open("DetalledeSeguro.html","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
function DetalledeSeguroACE()
{
	var specs = "width=696, height=662, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	secCod = window.open("DetalledeSeguro.html","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
function MuestraRutasCortas()
{
	var specs = "width=680, height=300, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	secCod = window.open("RutasCortas.htm","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
function MuestraRutasLargas()
{
	var specs = "width=650, height=300, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	secCod = window.open("RutasLargas.htm","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
function CoberturaSeguradora()
{
	var specs = "width=680, height=640, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	secCod = window.open("CoberturadeSeguro.html","codSeg",specs);	
	secCod.focus();	secCod.document.close();
}
// MULTICIUDAD
function fTipoHrefConexion(){

       var theForm = document.forms['SkySales'];

       if (!theForm) {
            theForm = document.SkySales;
       }

       if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        
         var Origen,Destino,Tipo,FechaIda,FechaReg,ADT,CHD,INF,DiaIda,DiaReg

         Origen   = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
         Destino  = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

       if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      Tipo      = 'OneWay'; 
       else   
     	      Tipo      = 'RoundTrip';   
        }
   
         DiaIda   = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDay1').value;         
         DiaReg   = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDay2').value;         
         FechaIda = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth1').value;
         FechaReg = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth2').value;
         ADT      = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 CHD      = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value; 
         INF      = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value; 
           

        if (esPuntoAPunto(Origen,Destino) == false){

               if(document.getElementById('TipoBusqueda').checked==true) {
               alert('Búsqueda por Fecha');
               location.href='Continuidad.aspx?Ori=' + Origen + '&Des=' + Destino + '&Tipo=' + Tipo + '&Ida='+ FechaIda + '&Reg=' + FechaReg + '&ADT=' + ADT + '&CHD=' + CHD + '&INF=' + INF + '&DiaIda=' + DiaIda + '&DiaReg=' + DiaReg  ;
               return; 

               }

               if(document.getElementById('TipoBusqueda').checked==false) {
		 alert('Búsqueda por Precio');
                 location.href='LowFareConnect.aspx?Ori=' + Origen + '&Des=' + Destino + '&Tipo=' + Tipo + '&Ida='+ FechaIda + '&Reg=' + FechaReg + '&ADT=' + ADT + '&CHD=' + CHD + '&INF=' + INF + '&DiaIda=' + DiaIda + '&DiaReg=' + DiaReg ;
                 return;

               }
        }       
	
	if(document.getElementById('TipoBusqueda')){
		
		if(document.getElementById('TipoBusqueda').checked){
			
			if(fOnClick()==false) return;
			 fhref();
								
		  }else{			
			if(fOnClick()==false) return;
			fSubmitLowFare();									
		}
  	 }
   } // Forma Si no esta en Submit
}

function fSubmitConexion(Evento) {         
               
	var ds =  document.forms['SkySales'];
	var RadioIda;
	var RadioRegreso;
	var primerSegmento = false;
	var segundoSegmento = false;
	var NoDisponible = "Lo sentimos no hay vuelos disponibles\npara el itinerario seleccionado. Favor de escoger\notra fecha o par de ciudades e intente de nuevo.";

	if (!ds) ds = document.SkySales;

	RadioIda = ds['CONTINUIDAD$RDSABC'];
	RadioRegreso = ds['CONTINUIDAD$RDSCBA'];

	if(TipoViaje == "OneWay") {

		if(RadioIda == undefined) {

			alert(NoDisponible);
			return;
		}
		else {

			primerSegmento = ValidaAlmenosUnElemento(RadioIda);
			
			if(primerSegmento == true) {

				if(ds['AGREEMENTINPUT$CheckBoxAgreement'] != undefined) {
					if(ds['AGREEMENTINPUT$CheckBoxAgreement'].checked == false) {
						alert("Debes indicar que estas de acuerdo con\nlas reglas tarifarias y términos seleccionando \n la caja en la parte inferior de la pagina");
						return;
					}
				}

				document.getElementById('CONTINUIDAD_Evento').value = Evento;
				document.SkySales.method = "POST";
				document.SkySales.action="Continuidad.aspx";
				document.SkySales.submit();
				return;
					
			} 
			else {
				alert("\nFavor de seleccionar un vuelo de salida");
				return;
			}	

		}

	}

	if(TipoViaje == "RoundTrip") {

		if(RadioIda == undefined) {

			alert(NoDisponible);
			return;

		}

		if(RadioRegreso == undefined) {

			alert(NoDisponible);
			return;

		}
		primerSegmento = ValidaAlmenosUnElemento(RadioIda);
		segundoSegmento = ValidaAlmenosUnElemento(RadioRegreso);

		if(primerSegmento == true) {

			if(segundoSegmento  == true) {

				if(ds['AGREEMENTINPUT$CheckBoxAgreement'] != undefined) {
					if(ds['AGREEMENTINPUT$CheckBoxAgreement'].checked == false) {
						alert("Debes indicar que estas de acuerdo con\nlas reglas tarifarias y términos seleccionando \n la caja en la parte inferior de la pagina");
						return;
					}
				}

				document.getElementById('CONTINUIDAD_Evento').value = Evento;
				document.SkySales.method = "POST";
				document.SkySales.action="Continuidad.aspx";
				document.SkySales.submit();
				return;
			}
			else {
				alert("\nFavor de seleccionar un vuelo de regreso");
				return;
			}	
			
					
		} 
		else {
			alert("\nFavor de seleccionar un vuelo de salida");
			return;
		}	

	}
}
function ValidaAlmenosUnElemento(RadioGroup) { 

	var i = 0;
	var estaSeleccionado = false;

	//Undefined significa que solo hay un elemento en el radio group
	if(RadioGroup.length == undefined) 
		return RadioGroup.checked;

	for(i=0; i< RadioGroup.length; i++ ) {
		
		if(RadioGroup[i].checked == true) {
			estaSeleccionado = true;
		}
	}

	return estaSeleccionado;
	
}
function fMultiCiudad(){

         var Origen,Destino

         Origen= document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
         Destino = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;
          
        if (esPuntoAPunto(Origen,Destino) == true){             
            document.getElementById('travelOptions1').style.visibility = 'visible';
            setCheckedValue(document.forms['SkySales'].elements['TipoBusqueda'],'Precio');
         }
        else{
         
        }

    }
/********INICIO DE FUNCIONES PARA CONEXIONES DE LOWFARE********/
function fSubmitSelectConnect(Evento){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'LowFareConnect.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   var TipoCON = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

    if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked){
	 TI      = '1';
         TipoCON = 'OneWay';
        } 
      else{
    	 TI      = '2';
         TipoCON = 'RoundTrip';
         
       }		  
   }
     
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
 
  }

    if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='LowFare.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Src=0&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;     
     } else{
        location.href='LowFareConnect.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR;    
     }
  
}
function MesAdelanteConnect(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';


 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagConnect('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagConnect('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);

}
function MesAdelanteREGRESOConnect(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagConnect('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagConnect('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagConnect(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'LowFareConnect.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
 
 location.href='LowFareConnect.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}
function fConexion(){

       var theForm = document.forms['SkySales'];

       if (!theForm) {
            theForm = document.SkySales;
       }

       if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        
         var Origen,Destino,Tipo,FechaIda,FechaReg,ADT,CHD,INF,DiaIda,DiaReg

         Origen   = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
         Destino  = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

       if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {	   
           if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      Tipo      = 'OneWay'; 
       else   
     	      Tipo      = 'RoundTrip';   
        }
   
         DiaIda   = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDay1').value;         
         DiaReg   = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDay2').value;         
         FechaIda = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth1').value;
         FechaReg = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketMonth2').value;
         ADT      = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 CHD      = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value; 
         INF      = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value; 
           
               location.href='Continuidad.aspx?Ori=' + Origen + '&Des=' + Destino + '&Tipo=' + Tipo + '&Ida='+ FechaIda + '&Reg=' + FechaReg + '&ADT=' + ADT + '&CHD=' + CHD + '&INF=' + INF + '&DiaIda=' + DiaIda + '&DiaReg=' + DiaReg  ;
               return; 

     }

}
/********FIN DE FUNCIONES PARA CONEXIONES DE LOWFARE********/
function fCambiaImagen(obj,Color){
}
function CargaVentanaUatp(_serial,_book) {
			var specs = "directories=no,width=540,height=480,resizable=no,menubar=no,location=no,status=yes,toolbar=no,scrollbars=yes,top=150,left=200";
			var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";

			var ds = document.forms['SkySales'];
			if(!ds) ds = document.SkySales;
			var ventana;
			ventana = window.open("https://dbi.airplus.com/dbi/servlet/load","dbiForm",specs);
			ventana.document.write('<form id="dbiForm" name="dbiForm" target="_self" action="https://dbi.airplus.com/dbi/servlet/load" method="POST">');
			ventana.document.write('<body>');
			ventana.document.write('<input name="kn" id="kn" type="hidden" value=' + _serial + '>');
			ventana.document.write('<input name="lang" id="lang" type="hidden" value="es" >');
			ventana.document.write('<input name="al" id="al" type="hidden" value="AIJ">');
			ventana.document.write('<input name="fk" id="fk" type="hidden" value='+ _book + '>');
			ventana.document.write('</body>');
			ventana.document.write('</form>');
			ventana.document.write('<script>');
		    ventana.document.write('document.dbiForm.method = "POST";');
			ventana.document.write('document.dbiForm.action = "https://dbi.airplus.com/dbi/servlet/load";');
			ventana.document.write('document.dbiForm.submit();');
			ventana.document.write('</script>');
			ventana.document.write('</html');
return true;
}
function ventanaBanco() {

	var specs = "width=680, height=640, top=5, right=10, resizable=yes,scrollbars=yes";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";

	var ds = document.forms['SkySales'];
	if(!ds) ds = document.SkySales;

	var ArrayTarjeta = new Array();

	ArrayTarjeta["MethodCode"] = ds['PAYMENTINPUT$DropDownListPaymentMethodCode'].value.substr(16,2);
	ArrayTarjeta["ACCNO"]      = ds['PAYMENTINPUT$TextBoxACCTNO'].value;
	ArrayTarjeta["AMT"]        = ds['PAYMENTINPUT$TextBoxAMT'].value.replace(",", "");
	ArrayTarjeta["CVV"]        = ds['PAYMENTINPUT$TextBoxCC__VerificationCode'].value;
	ArrayTarjeta["Month"]      = ds['PAYMENTINPUT$DropDownListEXPDAT_Month'].value;
	ArrayTarjeta["Year"]       = ds['PAYMENTINPUT$DropDownListEXPDAT_Year'].value.substr(2,2);
	ArrayTarjeta["HolderName"] = ds['PAYMENTINPUT$TextBoxCC__AccountHolderName'].value;

	if (ArrayTarjeta["MethodCode"] == "VI")
		ArrayTarjeta["MethodCode"] = "VISA";

	var ventana;
	ventana = window.open("TDSecure.aspx","codSeg",specs);

	ventana.document.write('<form name="payinfo" action="https://eps.banorte.com/secure3d/Solucion3DSecure.htm" method="POST">');
	ventana.document.write('<body bgcolor="#FFFFFF" leftmargin="5" topmargin="0" marginwidth="0" marginheight="0">');
	ventana.document.write('<!--3Dsecure-->');
	ventana.document.write('  <input type="hidden" name="MerchantId" value="">');
	ventana.document.write('  <input type="hidden" name="MerchantName" value="Interjet">');
	ventana.document.write('  <input type="hidden" name="MerchantCity" value="Mexico">');
	ventana.document.write('  <!--Este ForwardPath es solo de pruebas, este debe ir montado del lado del comercio-->');
	
	//Produccion
	ventana.document.write('  <input type="hidden" name="ForwardPath" value="https://www.interjet.com.mx/TDSecure.aspx">');

	//TEST
//	ventana.document.write('  <input type="hidden" name="ForwardPath" value="http://172.27.40.200/TDSecure.aspx">');

	ventana.document.write('  <!--Payworks-->');
	ventana.document.write('  <input type="hidden" name="ClientId" value="977">');
	ventana.document.write('  <input type="hidden" name="Name" value="9799800">');
	ventana.document.write('  <input type="hidden" name="Password" value="int800p">');

	//PRODUCCCION
	ventana.document.write('  <input type="hidden" name="Mode" value="P">');

	//TEST Y
	ventana.document.write('  <input type="hidden" name="TransType" value="Auth">');
	ventana.document.write('  <!--Este ResponsePath es solo de pruebas, este debe ir montado del lado del comercio-->');
	ventana.document.write('    <input type="hidden" name="ResponsePath" value="https://eps.banorte.com/payworkshosted3Dsecure/RespuestaCC.jsp">');
	ventana.document.write('	<table>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td>');
	ventana.document.write('			<font size="4" face="verdana, arial, helvetica, sans-serif" color="#ffffff">');
	ventana.document.write('			&nbsp;&nbsp;&nbsp;<b><i>Ejemplo 3DSECURE</i></b></font><br>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="center">');
	ventana.document.write('			<font color="white" size="3"><b>Payment Method</b></font>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font size="2" face="verdana, arial, helvetica, sans-serif" color="#ffffff">Card type:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden"name="CardType" value=" '+ ArrayTarjeta["MethodCode"]  +' "/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Card Number:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" maxlength="16" name="Card" value="' + ArrayTarjeta["ACCNO"] + '"/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Cvv2Indicator:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Cvv2Indicator" id="Cvv2Indicator" value="1"/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Cvv2Val:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Cvv2Val" id="Cvv2Val" value=" '+ ArrayTarjeta["CVV"] +' "/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font size="2" face="verdana, arial, helvetica, sans-serif" color="#ffffff">expiration date:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Expires" value="' + ArrayTarjeta["Month"] + '/'  + ArrayTarjeta["Year"] + '" />');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Purchase Total:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td><input type="hidden" maxlength="16" name="Total" value="' + ArrayTarjeta["AMT"] + '" />');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align=right width="40%">');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<!--<input type="submit" name="request" value="Purchase" />-->');
	ventana.document.write('			<br><br>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	</table>');
	ventana.document.write('	<br>');
	ventana.document.write('</form>');
	ventana.document.write('<script>');
	ventana.document.write('document.payinfo.method = "POST";');
	ventana.document.write('document.payinfo.action = "https://eps.banorte.com/secure3d/Solucion3DSecure.htm";');
	ventana.document.write('document.payinfo.submit();');
	ventana.document.write('</script>');			

	return true;
}
function ventanaPagoClubInterjet(PaginaRespuesta) {
	//"https://www.interjet.com.mx/TDSecure.aspx"
	//alert("ventanaBanco: " + PaginaRespuesta);
	var specs = "width=680, height=640, top=5, right=10, resizable=yes,scrollbars=yes";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";

	var ds = document.forms['SkySales'];
	if(!ds) ds = document.SkySales;

	var ArrayTarjeta = new Array();

	ArrayTarjeta["MethodCode"] = ds['TipoTarjeta'].value;
	ArrayTarjeta["ACCNO"]      = ds['NumTarjeta'].value;
	ArrayTarjeta["AMT"]        = 230.00;
	ArrayTarjeta["CVV"]        = ds['CVV'].value;
	ArrayTarjeta["Month"]      = ds['MesVencimiento'].value;
	ArrayTarjeta["Year"]       = ds['AnoVencimiento'].value.substr(2,2);
	ArrayTarjeta["HolderName"] = ds['NombreTarjetaHabiente'].value;

	if (ArrayTarjeta["MethodCode"] == "AX") {
		
		document.SkySales.method = "POST";
		document.SkySales.action = PaginaRespuesta;
		document.SkySales.submit();
		return true;
	}

	if (ArrayTarjeta["MethodCode"] == "VI")
		ArrayTarjeta["MethodCode"] = "VISA"


	var ventana;
	ventana = window.open("TDSecure.aspx","codSeg",specs);
	ventana.document.write('<form name="payinfo" action="https://eps.banorte.com/secure3d/Solucion3DSecure.htm" method="POST">');
	ventana.document.write('<body bgcolor="#FFFFFF" leftmargin="5" topmargin="0" marginwidth="0" marginheight="0">');
	ventana.document.write('<!--3Dsecure-->');
	ventana.document.write('  <input type="hidden" name="__EVENTTARGET" value="' + PaginaRespuesta + '">');
	ventana.document.write('  <input type="hidden" name="MerchantId" value="">');
	ventana.document.write('  <input type="hidden" name="MerchantName" value="Interjet">');
	ventana.document.write('  <input type="hidden" name="MerchantCity" value="Mexico">');
	ventana.document.write('  <!--Este ForwardPath es solo de pruebas, este debe ir montado del lado del comercio-->');

	//Produccion
ventana.document.write('  <input type="hidden" name="ForwardPath" value="https://www.interjet.com.mx/TDSecure.aspx">');

	//TEST UNO      
//	ventana.document.write('  <input type="hidden" name="ForwardPath" value="http://172.27.40.200/TDSecure.aspx">');

	ventana.document.write('  <!--Payworks-->');
	ventana.document.write('  <input type="hidden" name="ClientId" value="977">');
	ventana.document.write('  <input type="hidden" name="Name" value="9799800">');
	ventana.document.write('  <input type="hidden" name="Password" value="int800p">');
	ventana.document.write('  <input type="hidden" name="Mode" value="P">');
	ventana.document.write('  <input type="hidden" name="TransType" value="Auth">');
	ventana.document.write('  <!--Este ResponsePath es solo de pruebas, este debe ir montado del lado del comercio-->');
	ventana.document.write('    <input type="hidden" name="ResponsePath" value="http://eps.banorte.com/payworkshosted3Dsecure/RespuestaCC.jsp">');
	ventana.document.write('	<table>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td>');
	ventana.document.write('			<font size="4" face="verdana, arial, helvetica, sans-serif" color="#ffffff">');
	ventana.document.write('			&nbsp;&nbsp;&nbsp;<b><i>Ejemplo 3DSECURE</i></b></font><br>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="center">');
	ventana.document.write('			<font color="white" size="3"><b>Payment Method</b></font>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font size="2" face="verdana, arial, helvetica, sans-serif" color="#ffffff">Card type:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden"name="CardType" value=" '+ ArrayTarjeta["MethodCode"]  +' "/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Card Number:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" maxlength="16" name="Card" value="' + ArrayTarjeta["ACCNO"] + '"/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Cvv2Indicator:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Cvv2Indicator" id="Cvv2Indicator" value="1"/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Cvv2Val:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Cvv2Val" id="Cvv2Val" value=" '+ ArrayTarjeta["CVV"] +' "/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font size="2" face="verdana, arial, helvetica, sans-serif" color="#ffffff">expiration date:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Expires" value="' + ArrayTarjeta["Month"] + '/'  + ArrayTarjeta["Year"] + '" />');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Purchase Total:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td><input type="hidden" maxlength="16" name="Total" value="' + ArrayTarjeta["AMT"] + '" />');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align=right width="40%">');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<!--<input type="submit" name="request" value="Purchase" />-->');
	ventana.document.write('			<br><br>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	</table>');
	ventana.document.write('	<br>');
	ventana.document.write('</form>');
	ventana.document.write('<script>');
	ventana.document.write('document.payinfo.method = "POST";');
	ventana.document.write('document.payinfo.action = "https://eps.banorte.com/secure3d/Solucion3DSecure.htm";');
	ventana.document.write('document.payinfo.submit();');
	ventana.document.write('</script>');			

	return true;
}
function ventanaPagoClubInterjetMiJet(PaginaRespuesta) {

	//"https://www.interjet.com.mx/TDSecure.aspx"
	//alert("ventanaBanco: " + PaginaRespuesta);

	var specs = "width=680, height=640, top=5, right=10, resizable=yes,scrollbars=yes";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";

	var ds = document.forms['SkySales'];
	if(!ds) ds = document.SkySales;

	var ArrayTarjeta = new Array();

	ArrayTarjeta["MethodCode"] = ds['TipoTarjeta'].value;
	ArrayTarjeta["ACCNO"]      = ds['NumTarjeta'].value;
	ArrayTarjeta["AMT"]        = 230.00;
	ArrayTarjeta["CVV"]        = ds['CVV'].value;
	ArrayTarjeta["Month"]      = ds['MesVencimiento'].value;
	ArrayTarjeta["Year"]       = ds['AnoVencimiento'].value.substr(2,2);
	ArrayTarjeta["HolderName"] = ds['NombreTarjetaHabiente'].value;

	if (ArrayTarjeta["MethodCode"] == "AX") {
		
		document.SkySales.method = "POST";
		document.SkySales.action = PaginaRespuesta;
		document.SkySales.submit();
		return true;
	}

	if (ArrayTarjeta["MethodCode"] == "VI")
		ArrayTarjeta["MethodCode"] = "VISA"
	
	var ventana;
	ventana = window.open("TDSecure.aspx","codSeg",specs);

	ventana.document.write('<form name="payinfo" action="https://eps.banorte.com/secure3d/Solucion3DSecure.htm" method="POST">');
	ventana.document.write('<body bgcolor="#FFFFFF" leftmargin="5" topmargin="0" marginwidth="0" marginheight="0">');

	ventana.document.write('<!--3Dsecure-->');
	ventana.document.write('  <input type="hidden" name="__EVENTTARGET" value="' + PaginaRespuesta + '">');
	ventana.document.write('  <input type="hidden" name="MerchantId" value="">');
	ventana.document.write('  <input type="hidden" name="MerchantName" value="Interjet">');
	ventana.document.write('  <input type="hidden" name="MerchantCity" value="Mexico">');
	ventana.document.write('  <!--Este ForwardPath es solo de pruebas, este debe ir montado del lado del comercio-->');

	//Produccion
	ventana.document.write('  <input type="hidden" name="ForwardPath" value="https://www.interjet.com.mx/TDSecure.aspx">');

	//TEST
//	ventana.document.write('  <input type="hidden" name="ForwardPath" value="http://172.27.40.200/TDSecure.aspx">');

	ventana.document.write('  <!--Payworks-->');
	ventana.document.write('  <input type="hidden" name="ClientId" value="977">');
	ventana.document.write('  <input type="hidden" name="Name" value="9799800">');
	ventana.document.write('  <input type="hidden" name="Password" value="int800p">');
	ventana.document.write('  <input type="hidden" name="Mode" value="P">');
	ventana.document.write('  <input type="hidden" name="TransType" value="Auth">');
	ventana.document.write('  <!--Este ResponsePath es solo de pruebas, este debe ir montado del lado del comercio-->');
	ventana.document.write('    <input type="hidden" name="ResponsePath" value="http://eps.banorte.com/payworkshosted3Dsecure/RespuestaCC.jsp">');
	ventana.document.write('	<table>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td>');
	ventana.document.write('			<font size="4" face="verdana, arial, helvetica, sans-serif" color="#ffffff">');
	ventana.document.write('			&nbsp;&nbsp;&nbsp;<b><i>Ejemplo 3DSECURE</i></b></font><br>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="center">');
	ventana.document.write('			<font color="white" size="3"><b>Payment Method</b></font>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font size="2" face="verdana, arial, helvetica, sans-serif" color="#ffffff">Card type:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden"name="CardType" value=" '+ ArrayTarjeta["MethodCode"]  +' "/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Card Number:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" maxlength="16" name="Card" value="' + ArrayTarjeta["ACCNO"] + '"/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Cvv2Indicator:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Cvv2Indicator" id="Cvv2Indicator" value="1"/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Cvv2Val:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Cvv2Val" id="Cvv2Val" value=" '+ ArrayTarjeta["CVV"] +' "/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font size="2" face="verdana, arial, helvetica, sans-serif" color="#ffffff">expiration date:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Expires" value="' + ArrayTarjeta["Month"] + '/'  + ArrayTarjeta["Year"] + '" />');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Purchase Total:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td><input type="hidden" maxlength="16" name="Total" value="' + ArrayTarjeta["AMT"] + '" />');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align=right width="40%">');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<!--<input type="submit" name="request" value="Purchase" />-->');
	ventana.document.write('			<br><br>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	</table>');
	ventana.document.write('	<br>');
	ventana.document.write('</form>');
	ventana.document.write('<script>');
	ventana.document.write('document.payinfo.method = "POST";');
	ventana.document.write('document.payinfo.action = "https://eps.banorte.com/secure3d/Solucion3DSecure.htm";');
	ventana.document.write('document.payinfo.submit();');
	ventana.document.write('</script>');			

	return true;
}
function ventanaBancoCambioNombre(PaginaRespuesta) {
	//"https://www.interjet.com.mx/TDSecure.aspx"
	//alert("ventanaBanco: " + PaginaRespuesta);
	var specs = "width=680, height=640, top=5, right=10, resizable=yes,scrollbars=yes";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Boletín 1</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";

	var ds = document.forms['SkySales'];
	if(!ds) ds = document.SkySales;

	var ArrayTarjeta = new Array();

	ArrayTarjeta["MethodCode"] = ds['TipoTarjeta'].value;
	ArrayTarjeta["ACCNO"]      = ds['NumTarjeta'].value;
	ArrayTarjeta["AMT"]        = ds['MontoTarjeta'].value.replace(",", "");
	ArrayTarjeta["CVV"]        = ds['CVV'].value;
	ArrayTarjeta["Month"]      = ds['MesVencimiento'].value;
	ArrayTarjeta["Year"]       = ds['AnoVencimiento'].value.substr(2,2);
	ArrayTarjeta["HolderName"] = ds['NombreTarjetaHabiente'].value;

	if (ArrayTarjeta["MethodCode"] == "AX") {
		
		document.SkySales.method = "POST";
		document.SkySales.action = PaginaRespuesta;
		document.SkySales.submit();
		return true;
	}


	if (ArrayTarjeta["MethodCode"] == "VI")
		ArrayTarjeta["MethodCode"] = "VISA"

	var ventana;
	ventana = window.open("TDSecure.aspx","codSeg",specs);

	ventana.document.write('<form name="payinfo" action="https://eps.banorte.com/secure3d/Solucion3DSecure.htm" method="POST">');
	ventana.document.write('<body bgcolor="#FFFFFF" leftmargin="5" topmargin="0" marginwidth="0" marginheight="0">');

	ventana.document.write('<!--3Dsecure-->');
	ventana.document.write('  <input type="hidden" name="__EVENTTARGET" value="' + PaginaRespuesta + '">');
	ventana.document.write('  <input type="hidden" name="MerchantId" value="">');
	ventana.document.write('  <input type="hidden" name="MerchantName" value="Interjet">');
	ventana.document.write('  <input type="hidden" name="MerchantCity" value="Mexico">');
	ventana.document.write('  <!--Este ForwardPath es solo de pruebas, este debe ir montado del lado del comercio-->');

	//Produccion
	ventana.document.write('  <input type="hidden" name="ForwardPath" value="https://www.interjet.com.mx/TDSecure.aspx">');

	//TEST
//ventana.document.write('  <input type="hidden" name="ForwardPath" value="http://172.27.40.200/TDSecure.aspx">');


	ventana.document.write('  <!--Payworks-->');
	ventana.document.write('  <input type="hidden" name="ClientId" value="977">');
	ventana.document.write('  <input type="hidden" name="Name" value="9799800">');
	ventana.document.write('  <input type="hidden" name="Password" value="int800p">');
	ventana.document.write('  <input type="hidden" name="Mode" value="P">');
	ventana.document.write('  <input type="hidden" name="TransType" value="Auth">');
	ventana.document.write('  <!--Este ResponsePath es solo de pruebas, este debe ir montado del lado del comercio-->');
	ventana.document.write('    <input type="hidden" name="ResponsePath" value="http://eps.banorte.com/payworkshosted3Dsecure/RespuestaCC.jsp">');
	ventana.document.write('	<table>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td>');
	ventana.document.write('			<font size="4" face="verdana, arial, helvetica, sans-serif" color="#ffffff">');
	ventana.document.write('			&nbsp;&nbsp;&nbsp;<b><i>Ejemplo 3DSECURE</i></b></font><br>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="center">');
	ventana.document.write('			<font color="white" size="3"><b>Payment Method</b></font>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font size="2" face="verdana, arial, helvetica, sans-serif" color="#ffffff">Card type:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden"name="CardType" value=" '+ ArrayTarjeta["MethodCode"]  +' "/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Card Number:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" maxlength="16" name="Card" value="' + ArrayTarjeta["ACCNO"] + '"/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Cvv2Indicator:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Cvv2Indicator" id="Cvv2Indicator" value="1"/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Cvv2Val:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Cvv2Val" id="Cvv2Val" value=" '+ ArrayTarjeta["CVV"] +' "/>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font size="2" face="verdana, arial, helvetica, sans-serif" color="#ffffff">expiration date:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<input type="hidden" name="Expires" value="' + ArrayTarjeta["Month"] + '/'  + ArrayTarjeta["Year"] + '" />');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align="right">');
	ventana.document.write('			<font color="white" size="2" face="verdana, arial, helvetica, sans-serif">Purchase Total:</font>');
	ventana.document.write('		</td>');
	ventana.document.write('		<td><input type="hidden" maxlength="16" name="Total" value="' + ArrayTarjeta["AMT"] + '" />');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	<tr>');
	ventana.document.write('		<td align=right width="40%">');
	ventana.document.write('		</td>');
	ventana.document.write('		<td>');
	ventana.document.write('			<!--<input type="submit" name="request" value="Purchase" />-->');
	ventana.document.write('			<br><br>');
	ventana.document.write('		</td>');
	ventana.document.write('	</tr>');
	ventana.document.write('	</table>');
	ventana.document.write('	<br>');
	ventana.document.write('</form>');
	ventana.document.write('<script>');
	ventana.document.write('document.payinfo.method = "POST";');
	ventana.document.write('document.payinfo.action = "https://eps.banorte.com/secure3d/Solucion3DSecure.htm";');
	ventana.document.write('document.payinfo.submit();');
	ventana.document.write('</script>');			

	return true;
}

function SolucionBanorte() {

	document.SkySales.method = "POST";
	document.SkySales.action = "https://eps.banorte.com/secure3d/Solucion3DSecure.htm";
	document.SkySales.submit();	
}
function factivatarjeta(obj){

	if (obj.checked) {
	document.getElementById('datostarjeta').style.display    = 'none';
         }	
	else {
	document.getElementById('datostarjeta').style.display    = 'block';
	}	
}
function fSwitch(Tramo,Origen,Destino){

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var Src = '0';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
  var SecondSegment = '';
   var Ori2,Des2;
   Ori2 = '';
   Des2 = '';

   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;
  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;

  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC')) 
  Src = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC').value;
 
 if (Tramo == 1) {

      Ori = Origen;
      Des = Destino;
       
      if(document.getElementById('LOWFARE_ViaIDA'))
         Ori2 = Des;

      if(document.getElementById('LOWFARE_ViaREG'))
         
         Des2 = document.getElementById('LOWFARE_ViaREG').value;
		 
  
    SecondSegment = '&Ori2=' + Ori2 + '&Des2=' + Des2;
  
   } 

   if (Tramo == 2){
  
      Ori2 = Destino;	    
      Des2 = Origen;

     SecondSegment = '&Ori2=' + Des2 + '&Des2=' + Ori2 ;
   }
  
  location.href='LowFare.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt='+ Adt + '&Src=' + Src + '&Chd=' + Chd + '&Evento=Buscar' + '&Tramo=' + Tramo + SecondSegment ;

}
function fSwitch2(Tramo,Origen,Destino){
   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var Src = '0';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   var SecondSegment = '';
   var Ori2,Des2;
   Ori2 = '';
   Des2 = '';

   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;
  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;

  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC')) 
  Src = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC').value;
 
 if (Tramo == 1) {

      Ori = Origen;
      Des = Destino;
       
      if(document.getElementById('LOWFAREREYESMAGOS_ViaIDA'))
         Ori2 = Des;

      if(document.getElementById('LOWFAREREYESMAGOS_ViaREG'))
         
         Des2 = document.getElementById('LOWFAREREYESMAGOS_ViaREG').value;
	
    SecondSegment = '&Ori2=' + Ori2 + '&Des2=' + Des2;
   } 

   if (Tramo == 2){
  
      Ori2 = Destino;	    
      Des2 = Origen;

 SecondSegment = '&Ori2=' + Des2 + '&Des2=' + Ori2 ;
   }
  
  location.href='LowFareFebrero.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt='+ Adt + '&Src=' + Src + '&Chd=' + Chd + '&Evento=Buscar' + '&Tramo=' + Tramo + SecondSegment ;

}

function fActualizaOpenJaw(obj){

	document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin2').value = obj.value;
        
        obj = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin2');
        obj.value = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value; 
        changeDest(obj, document['SkySales']['AVAILABILITYSEARCHINPUT_DropDownListMarketDestination2'], document['SkySales']['AVAILABILITYSEARCHINPUT_DropDownListMarketDestination2'].options[document['SkySales']['AVAILABILITYSEARCHINPUT_DropDownListMarketDestination2'].selectedIndex].value)

        document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination2').value = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
}
/****IICIO TERMINOS Y CONDICIONES ADULTOS MAYORES****/
function TerminosAdultosMayores()
{
	var specs = "width=640, height=380, top=5, right=10, resizable=no,scrollbars=no";
	var contenido = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>Términos y coondiciones</title></head><body bgcolor=white topmargin=2 leftmargin=2> <div align='center'>";
	
	secCod = window.open("AdultosMayores.html","codSeg",specs);	
	
	//secCod.document.write(contenido);  
	secCod.focus();	secCod.document.close();
}
/****FIN TERMINOS Y CONDICIONES ADULTOS MAYORES****/
function fRuta2X1(Ori,Des,Adt,Chd,Inf,Src){
  
   var FI  = '';
   var FR  = '';
   var TI  = '';
   
   var NPI = ''; 
   var NPR = '';

   var SecondSegment = '';
   var Ori2,Des2;
   Ori2 = Des;
   Des2 = Ori;

   var Tramo = 1

 if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	  TI = '1';
	   else   
    	  TI = '2';		  
   }

 location.href='LowFarePromo.aspx';

}

function fvalidaPasajeroRepetido(){
  
    for (var i = 1; i < 10; i++)
     {

        if(document.getElementById('CONTROLGROUPPASSENGER$PASSENGERINPUT$TextBoxCustomerNumber_' + i)){
           
             for (var j = 2; j<10;j++){
                  
                   if(document.getElementById('CONTROLGROUPPASSENGER$PASSENGERINPUT$TextBoxCustomerNumber_' + j)){
                        if (document.getElementById('CONTROLGROUPPASSENGER$PASSENGERINPUT$TextBoxCustomerNumber_' + i).value == document.getElementById('CONTROLGROUPPASSENGER$PASSENGERINPUT$TextBoxCustomerNumber_' + j).value)  { 
                              
                            if ( i != j) {
			        alert('Los pasajeros no pueden un mismo numero de clubinterjet');
                                return false;
                               }
 
                           
                            }
 
                      }
               }
          }
            
     }

return true;
}
function addLoadEvent1(func) {
   var oldonload = window.onload;
    
	if (typeof window.onload != 'function') {        
		
		window.onload = function fLoadValues(){ 		
		                      fUpdate();
		                 }
    }
	else{
	     
      window.onload = function fHold( ){ 
				fUpdate();
       }
    }
}
function setCuartosPromo(Obj)
{
   var strNumAdultos = "", strMI = "";
   var cTabla="";
   
           // Colocar el Radio SET en VIAJE DOBLE
		   if (document.getElementById('AVAILABILITYSEARCHINPUT_RoundTrip'))
	           document.getElementById('AVAILABILITYSEARCHINPUT_RoundTrip').checked = true;
   
		   for(var n = 1; n <= 8; n++)
		     strNumAdultos += "<OPTION VALUE='" +  n + "' >" +  n + " </OPTION>";
			
		   for (var j=0; j <= 8; j++)
    	     strMI += "<option value="+ j +">"+ j +"</option>";
 		   
		   cTabla += "<table style='font-size:16px;color:#111683;'><tr><td><font size='-4'>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ADULTO  &nbsp;</td><td><font size='-4'>MENOR</td><td align=center><font size='-4'>&nbsp;&nbsp;INFANTE<br/><b></b></font></td></tr></table>";

		   cTabla += "<table style='font-size:16px;color:#111683;'><tr><td><font size='-4'>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td><td><font size='-4'>(2-11 Años)</td><td align=center><font size='-4'>&nbsp;(<2 Años)<br/><b></b></font></td></tr></table>";

               for(var i=1; i <= Obj; i++)
              {           		
	            cTabla += "<table style='font-size:12px;color:#111683;' ><tr><td colspan=3>" + "hab" + i + ":" + "</td>";               
                cTabla += "<td align='left'><SELECT NAME=Adultos" + i +" ID=Adultos" + i  +" onChange='validaPersonPromo(this," + i + " )'>" + strNumAdultos + "</SELECT></td>";
                cTabla += "<td>&nbsp;&nbsp;<SELECT NAME=c"+ i + "Ninos " + " ID=c"+ i + "Ninos" + "  onChange='validaPersonPromo(this," + i + " ); setEdadesPromo(this," + i + " )' > ";
				cTabla += strMI + "</SELECT></td>";
				cTabla += "<td>&nbsp;&nbsp;<SELECT NAME='infante"+ i + "' " + " ID='infante"+ i + "'" + " onChange='setInfante()'> ";
				cTabla += strMI + "</SELECT></td></tr>";
                cTabla += "</table>";
				cTabla+="<div id='DIV" + i + "'>  </DIV>";
		  	  }

        document.getElementById(iDPromo+'ADT').value = Obj;
	    document.getElementById(iDPromo+'CHD').value = document.getElementById(iDPromo+'INFANT').value = 0;
        document.getElementById("Tarifas").innerHTML = cTabla;
		
}


function setCuartosPromoEstudiantes(Obj)
{
   var strNumAdultos = "", strMI = "";
   var cTabla="";
   
           // Colocar el Radio SET en VIAJE DOBLE
		   if (document.getElementById('AVAILABILITYSEARCHINPUT_RoundTrip'))
	           document.getElementById('AVAILABILITYSEARCHINPUT_RoundTrip').checked = true;
   
		   for(var n = 2; n <= 8; n++)
		     strNumAdultos += "<OPTION VALUE='" +  n + "' >" +  n + " </OPTION>";
			
		   for (var j=0; j <= 3; j++)
    	     strMI += "<option value="+ j +">"+ j +"</option>";
 		   
		   cTabla += "<table style='font-size:16px;color:#111683;'><tr><td><font size='-4'>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   &nbsp;</td><td><font size='-4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td align=center><font size='-4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/><b></b></font></td></tr></table>";

		   cTabla += "<table border='0' style='font-size:12px;color:#111683;' ><tr><td colspan='3'>personas por habitacion </td></tr></table>";

               for(var i=1; i <= Obj; i++)
              {           		
	            cTabla += "<table style='font-size:12px;color:#111683;' ><tr><td colspan=3>" + "hab" + i + ":" + "</td>";               
                cTabla += "<td align='left'><SELECT NAME=Adultos" + i +" ID=Adultos" + i  +" onChange=''>" + strNumAdultos + "</SELECT></td>";
                cTabla += "<td>&nbsp;&nbsp; ";
				cTabla += "</td>";
				cTabla += "<td>&nbsp;&nbsp;";
				cTabla += "</td></tr>";
                cTabla += "</table>";
				cTabla+="<div id='DIV" + i + "'>  </DIV>";
		  	  }

        document.getElementById(iDPromo+'ADT').value = Obj;
	    document.getElementById(iDPromo+'CHD').value = document.getElementById(iDPromo+'INFANT').value = 0;
        document.getElementById("Tarifas").innerHTML = cTabla;
		
}

function setCuartosPromoNinos(Obj)
{
   var strNumAdultos = "", strMI = "";
   var cTabla="";
   
           // Colocar el Radio SET en VIAJE DOBLE
		   if (document.getElementById('AVAILABILITYSEARCHINPUT_RoundTrip'))
	           document.getElementById('AVAILABILITYSEARCHINPUT_RoundTrip').checked = true;
   
		   for(var n = 1; n <= 4; n++)
		     strNumAdultos += "<OPTION VALUE='" +  n + "' >" +  n + " </OPTION>";
			
		   for (var j=0; j <= 3; j++)
    	     strMI += "<option value="+ j +">"+ j +"</option>";
 		   
		   cTabla += "<table style='font-size:16px;color:#111683;'><tr><td><font size='-4'>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ADULTO  &nbsp;</td><td><font size='-4'>MENOR</td><td align=center><font size='-4'>&nbsp;&nbsp;INFANTE<br/><b></b></font></td></tr></table>";

		   cTabla += "<table style='font-size:16px;color:#111683;'><tr><td><font size='-4'>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td><td><font size='-4'>(2-11 Años)</td><td align=center><font size='-4'>&nbsp;(<2 Años)<br/><b></b></font></td></tr></table>";

               for(var i=1; i <= Obj; i++)
              {           		
	            cTabla += "<table style='font-size:12px;color:#111683;' ><tr><td colspan=3>" + "hab" + i + ":" + "</td>";               
                cTabla += "<td align='left'><SELECT NAME=Adultos" + i +" ID=Adultos" + i  +" onChange='validaPersonPromo(this," + i + " )'>" + strNumAdultos + "</SELECT></td>";
                cTabla += "<td>&nbsp;&nbsp;<SELECT NAME=c"+ i + "Ninos " + " ID=c"+ i + "Ninos" + "  onChange='validaPersonPromo(this," + i + " ); setEdadesPromo(this," + i + " )' > ";
				cTabla += strMI + "</SELECT></td>";
				cTabla += "<td>&nbsp;&nbsp;<SELECT NAME='infante"+ i + "' " + " ID='infante"+ i + "'" + " onChange='setInfante()'> ";
				cTabla += strMI + "</SELECT></td></tr>";
                cTabla += "</table>";
				cTabla+="<div id='DIV" + i + "'>  </DIV>";
		  	  }

        document.getElementById(iDPromo+'ADT').value = Obj;
	  //  document.getElementById(iDPromo+'CHD').value = document.getElementById(iDPromo+'INFANT').value = 0;
        document.getElementById("Tarifas").innerHTML = cTabla;
		
}
function validaPersonPromo(Oselect, otraJ)
{
	var Aselect = document.getElementById(iDPromo+'ADT');
	var Mselect = document.getElementById(iDPromo+'CHD');
	var msjEr = ""; 
	var bool = true;
	var adultos = 0;

	for(var j=1; j <= document.getElementById('HAB').selectedIndex + 1; j++)
		 adultos = adultos + parseInt(document.getElementById("Adultos"+j).value);
		
	var ninos_x = 0;
	var CantidadMax;
	
	for(var j=1; j <= document.getElementById('HAB').selectedIndex + 1; j++)
		 ninos_x = ninos_x + parseInt(document.getElementById("c"+ j +"Ninos").value);
	
	if ((ninos_x+adultos)>9) 
	{
	alert("el número de personas en el paquete no puede exceder de: 9");
	
		if (Oselect.id.substring(0,4)=="Adul")
			{
				Aselect.value=adultos-Oselect.value+1;
				Oselect.value=1;
			}
		else
			{
				Mselect.value=ninos_x-Oselect.value;
				Oselect.value=0;
			}
		return;
	}
	else
	{

	CantidadMax=parseInt(document.getElementById("c"+ otraJ +"Ninos").value) + parseInt(document.getElementById("Adultos"+otraJ).value);
	if (CantidadMax>8) 
		{
		alert("el número de personas en la habitación no puede exceder de: 8");
	
			if (Oselect.id.substring(0,4)=="Adul")
				{
					Aselect.value=adultos-Oselect.value+1;
					Oselect.value=1;
				}
			else
				{
					Mselect.value=ninos_x-Oselect.value;
					Oselect.value=0;
				}
			return;
		}
			else
			{
				Mselect.value=ninos_x;
				Aselect.value=adultos;
			}
	}

}

function validaPersonPromoEstudiante(Oselect, otraJ)
{
	var Aselect = document.getElementById(iDPromo+'ADT');
	var Mselect = document.getElementById(iDPromo+'CHD');
	var msjEr = ""; 
	var bool = true;
	var adultos = 0;

	for(var j=1; j <= document.getElementById('HAB').selectedIndex + 1; j++)
		 adultos = adultos + parseInt(document.getElementById("Adultos"+j).value);
		
	var ninos_x = 0;
	var CantidadMax;
	
	for(var j=1; j <= document.getElementById('HAB').selectedIndex + 1; j++)
		 ninos_x = ninos_x + parseInt(document.getElementById("c"+ j +"Ninos").value);
	
	if ((ninos_x+adultos)>9) 
	{
	alert("el número de personas en el paquete no puede exceder de: 9");
	
		if (Oselect.id.substring(0,4)=="Adul")
			{
				Aselect.value=adultos-Oselect.value+1;
				Oselect.value=1;
			}
		else
			{
				Mselect.value=ninos_x-Oselect.value;
				Oselect.value=0;
			}
		return;
	}
	else
	{

	CantidadMax=parseInt(document.getElementById("c"+ otraJ +"Ninos").value) + parseInt(document.getElementById("Adultos"+otraJ).value);
	if (CantidadMax>8) 
		{
		alert("el número de personas en la habitación no puede exceder de: 8");
	
			if (Oselect.id.substring(0,4)=="Adul")
				{
					Aselect.value=adultos-Oselect.value+1;
					Oselect.value=1;
				}
			else
				{
					Mselect.value=ninos_x-Oselect.value;
					Oselect.value=0;
				}
			return;
		}
			else
			{
				Mselect.value=ninos_x;
				Aselect.value=adultos;
			}
	}

}
function setEdadesPromo(selN,k)
{       
   	var cEdades = "";
   	var tNino = "";
	var k1 = k-1;
	var Mselect = document.getElementById(iD+'CHD');
	
      if (parseInt(selN.value) > 0)
      {
      		tNino = "<table style='color:#111683;'><tr>";
			cEdades = "<tr>";
      		
          	for(var i=1; i<=selN.value; i++) 
          	{                             
               
//			   tNino+= "<tr><td><font size='-4'>&nbsp;&nbsp;EDAD " + i + "&nbsp;&nbsp;</td>";
						tNino+= "<tr>";
					  cEdades += "<td><font size='-4'>&nbsp;EDAD" + i + "<select name='edadC" +k+i+ "' id='edadC" +k+i+ "' >";
					  cEdades += "<option value='-1'>-?-</option>";
					  for (var j=2; j <= 11; j++)
						cEdades += "<option value="+ j +">"+ j +"</option>";
					  cEdades += "</select></td></tr>";
			  
      		}
      		
       	tNino += "</tr>";
       	cEdades = tNino + cEdades + "</tr></table>";
      }

      document.getElementById('DIV' + k).innerHTML = cEdades;
	
}


//TELECOMM


function validatelecomm() {

var Val =document.getElementById('Opcion').value;
//alert(Val);
if(Val == 'false' || Val == '') {
						alert("Debes indicar que estas de acuerdo con\nlas reglas tarifarias y términos seleccionando \n la caja en la parte inferior de la pagina");
						return;
					}

if(Val == 'true') {
__doPostBack('PAYMENTINPUT$LinkButtonSubmit','');
			return true;

}


}



function AmericanExpressEBTAPromo()
{
/*
var cad;
var cad2;
var Bins = new Array(15);
var res;
var res2=new Array(1);

Bins [0]='491341';
Bins [1]='491366';
Bins [2]='491371';
Bins [3]='491375';
Bins [4]='491586';
Bins [5]='493157';
Bins [6]='493158';
Bins [7]='493172';
Bins [8]='493173';
Bins [9]='544548';
Bins [10]='544549';
Bins [11]='547050';
Bins [12]='547078';
Bins [13]='547079';
Bins [14]='547096';
Bins [15]='547097';


Array.prototype.find = function(searchStr) {
  var returnArray = false;
  for (i=0; i<this.length; i++) {
    if (typeof(searchStr) == 'function') {
      if (searchStr.Bins(this[i])) {
        if (!returnArray) { returnArray = [] }
        returnArray.push(i);
      }
    } else {
      if (this[i]===searchStr) {
        if (!returnArray) { returnArray = [] }
        returnArray.push(i);
      }
    }
  }
  return returnArray;
}

cad =document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value;

//alert(cad);

if(cad.length>5)
{
	res=Bins.find(cad.substring(0,6));
	//alert(res);
	if (parseInt(res[0])>=0 && parseInt(res[0])<=13)
		{
		cad2=document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value;
		}
	else
		{
		 alert('Número de Tarjeta no Valida Para esta Promoción');
		 document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value='';
		}
  }*/
}

function BanortePromo()
{
/*
var cad;
var cad2;
var Bins = new Array(14);
var res;
var res2=new Array(1);

Bins [0]='491341';
Bins [1]='491366';
Bins [2]='491371';
Bins [3]='491375';
Bins [4]='493157';
Bins [5]='493158';
Bins [6]='493172';
Bins [7]='493173';
Bins [8]='544548';
Bins [9]='544549';
Bins [10]='547050';
Bins [11]='547078';
Bins [12]='547079';
Bins [13]='547096';
Bins [14]='547097';


Array.prototype.find = function(searchStr) {
  var returnArray = false;
  for (i=0; i<this.length; i++) {
    if (typeof(searchStr) == 'function') {
      if (searchStr.Bins(this[i])) {
        if (!returnArray) { returnArray = [] }
        returnArray.push(i);
      }
    } else {
      if (this[i]===searchStr) {
        if (!returnArray) { returnArray = [] }
        returnArray.push(i);
      }
    }
  }
  return returnArray;
}

cad =document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value;

//alert(cad);

if(cad.length>5)
{
	res=Bins.find(cad.substring(0,6));
	//alert(res);
	if (parseInt(res[0])>=0 && parseInt(res[0])<=13)
		{
		cad2=document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value;
		}
	else
		{
		 alert('Número de Tarjeta no Valida Para esta Promoción');
		 document.getElementById('PAYMENTINPUT_TextBoxACCTNO').value='';
		}
}*/
}


/*************/
/**IDA**/
function MesAdelantePadre(){

	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagPadres('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagPadres('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
}
function MesAdelanteREGRESOPadre(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagPadres('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagPadres('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}

function fSubmitSelectPagPadres(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'promocionpapa.aspx';
   
  var Ori  = '';
   var Des  = '';
   var Inf  = '';
   var Adt  = '';
   var Chd  = '';
   var Src  = '0';
   var Free = '0';
   var FI   = '';
   var FR   = '';
   var TI   = '';
   var NPI  = ''; 
   var NPR  = '';
   var SecondSegment = '';
   var Sum;
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADA')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADA').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CNN')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CNN').value;
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_FREE')) 
  Gratis= document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_FREE').value;
  
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
 
 location.href='promocionpapa.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Free=' + Free + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;

    
}

/*****PROMO S**********/

function fSubmitSelectS(Evento){
	
   document.forms[0].method = 'POST';
   document.forms[0].action = 'LowFarePromos.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var Src = '0';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   var SecondSegment = '';

   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

   if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
   
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
  if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
  if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;

  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC')) 
  Src = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_SRC').value;
 
  if (Evento == 'Buscar'){
	  
  if (document.getElementById('NumeroMesPaginaIDA')) 
      document.getElementById('NumeroMesPaginaIDA').value = 0;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
     document.getElementById('NumeroMesPaginaREGRESO').value = 0;
	 
	  NPI = 0;
	  NPR = 0;	  	  
	
  }
 SecondSegment = '&Ori2=' + Des + '&Des2=' + Ori + '&Tramo=1';

 if (esPuntoAPunto(Ori,Des) == true){ 
        location.href='LowFarePromos.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Src=' + Src + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR  + SecondSegment;     
     } else{
        location.href='LowFareConnect.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' +  TI  + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Src=' + Src + '&Evento=Buscar' + '&NPI=' + NPI + '&NPR=' + NPR + SecondSegment;    
     }
}
function MesAdelanteS(){
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';

 if(document.getElementById(ObjTipo).checked == false) 
  fSubmitSelectPagS('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value + '&MesRegreso=' + document.getElementById('MesRegreso').value); 
  else fSubmitSelectPagS('&IDA=S' + '&MesIDA=' + document.getElementById('MesIDA').value);
		
}

function MesAdelanteREGRESOS(){
	
	var ObjTipo = 'AVAILABILITYSEARCHINPUT_OneWay';
	 if(document.getElementById(ObjTipo).checked == false) 	
      fSubmitSelectPagS('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value + '&MesIDA='  + document.getElementById('MesIDA').value);
	  else
	   fSubmitSelectPagS('&VU=S' + '&MesRegreso=' + document.getElementById('MesRegreso').value);	 	
}
function fSubmitSelectPagS(Params){
	
  document.forms[0].method = 'POST';
  document.forms[0].action = 'LowFarePromos.aspx';

   var Ori = '';
   var Des = '';
   var Inf = '';
   var Adt = '';
   var Chd = '';
   var FI  = '';
   var FR  = '';
   var TI  = '';
   var NPI = ''; 
   var NPR = '';
   
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1')) 
      Ori = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketOrigin1').value;
	  
   if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1')) 
      Des = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListMarketDestination1').value;

     if (document.getElementById('AVAILABILITYSEARCHINPUT_OneWay')) {
	   
       if(document.getElementById('AVAILABILITYSEARCHINPUT_OneWay').checked)
	      TI = '1';
	   else   
    	  TI = '2';		  
   }
  
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT')) 
  Inf = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_INFANT').value;
	 
  if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT')) 
  Adt = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_ADT').value;
	 
 if (document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD')) 
  Chd = document.getElementById('AVAILABILITYSEARCHINPUT_DropDownListPassengerType_CHD').value;
 
 if (document.getElementById('NumeroMesPaginaIDA')) 
  NPI = document.getElementById('NumeroMesPaginaIDA').value;
 
 if (document.getElementById('NumeroMesPaginaREGRESO')) 
  NPR = document.getElementById('NumeroMesPaginaREGRESO').value;
  
 location.href='LowFarePromos.aspx?Ori=' + Ori + '&Des=' + Des + '&Tipo=' + TI + '&Inf=' + Inf + '&Adt=' + Adt + '&Chd=' + Chd + '&Evento=Calendario' + '&NPI=' + NPI + '&NPR=' + NPR + Params;
	
}