var gblIDIOMA='ING';
fGbl = function(){ 
	//alert('entro');
	return{		
		llenaGlbs:function(params){			
			gblIDIOMA = params.Idioma; 
			/*if (gblIDIOMA=='ESP') {
				var printt = this.replaceCharsDecHex('á','','','','');
				var tx = '\xE1\xE9-c-\xE1\xED\xFA\xF3\u00E1\u00E9';
				//alert(tx);
				//alert(printt);
			}*/
			//alert('\xFA');
			//var xc  = this.replaceCharsDecHex('á','','','',''); 			
			//alert('\u00FA' +  xc);
		},
		replaceCharsDecHex:function(cad,param1,param2,param3,param4){
			var charDe=''; var charHx='';
			for (var x=192; x<255; x++) {					
				//charHx = '\u00' + Number(x).toString(16).toUpperCase();
				charHx = String.fromCharCode(92) + 'u00' + Number(x).toString(16).toUpperCase();
				//charHx = '\\' + 'u00' + Number(x).toString(16).toUpperCase();
				charDe = String.fromCharCode(x);
				var patt=new RegExp(charDe,"g");
				cad = cad.replace(patt,charHx); //Reemplaza todas las ocurrencias				
			}
			return String(cad);
		},
		regresaHex:function(val){
			var _val='';
			if (typeof val=='string') {
				_val = (parseInt(val)!=NaN)? parseInt(val):val.charCodeAt(0); 
			}else if (typeof val=='number') {
				_val = val; //String.fromCharCode(val);
			}
			_val = Number(_val).toString(16).toUpperCase();
			return _val;
		}	
	}; //fin <return>
}(); //fin <glbVar>


/*
	\u00E7 = ç Min
	\u00C7 = Ç May
	\u00FA = ú
	\u00E9 = é
	\u00E0 = à
	\u00E3 = ã
	\u00E1 = á
	\u00F3 = ó
	\u00FA = ú
	\u00EA = ê
	\u00ED = í Min
	\u00F1 = ñ min
	\u00F1 = ñ min   --  \u00D1 = Ñ May
*/

var disAlertCaracteresInvalidos = new Array("Caracteres Invalidos:","Invalid Characters:","Caracteres inv\u00E1lidos:","","","");
var disSearchSite = new Array("Por favor indique su busqueda.","Please specify your search.","Por favor especifique a sua busca.","","","");
var disLoading = new Array("Cargando...","Loading...","Carregando...","","","");
var disIndiqueAerolineaTraslado = new Array("Por favor indique la aerolinea y vuelo para su traslado del aeropuerto","Please Indicate the airline and flight number for your airport shuttle","Por favor indique a companhia a\u00E9rea e voo para seu traslado de aeroporto","","","");
var disTelPasajero = new Array("Verifique el n\u00FAmero de tel\u00E9fono", "The phone number is invalid","Verifique o n\u00FAmero do telefone","","","");
var disMandatoryField = new Array("Por favor llenar todos los campos obligatorios", "Please fill all mandatory fields","Por favor preencha todos os campos obrigat\u00F3rios","","","");
var disAlertRates = new Array("Debe introducir las edades de los ni\u00F1os", "You must write the childrens ages","Voc\u00EA deve informar as idades das crian\u00E7as","","","");
var disAlertAdultos = new Array("No podemos aceptar habitaciones sin adultos.", "Sorry, We cannot accept rooms with no adults.","N\u00E3o podemos aceitar quartos sem adultos.","","","");
/*alertAereopIng*/var disSelectAeropOrigen = new Array("Por favor seleccione el aeropuerto origen.", "Please select the departure airport.","Por favor selecione o aeroporto de origem.","","","");
/*alertCiudadIng*/var disSelectAeropDestino = new Array("Por favor seleccione el aeropuerto de llegada.", "Please select the arrival airport.","Por favor selecione o aeroporto de destino.","","","");
/*alertDestinoIng*/var disSelectDestino = new Array("Por favor seleccione su destino.", "Please select your destination.","Por favor selecione seu destino.","","","");
/*alertDiferentAirportIng*/var disSelectDifAirport = new Array("El aeropuerto de origen deber ser diferente al aeropuerto de llegada.", "Please select the diferent departure airport than arrival airport.","O aeroporto de origem deve ser diferente do aeroporto de destino.","","","");
/*disCercaDeCiudadING*/var disCercaDeDestino = new Array("Por favor indicar el destino.", "Please specified the destination.","Por favor indique o destino.","","","");
/*disCercaDeAttracING*/var disCercaDeAttraccion = new Array("Por favor indicar la Attracci\u00F3n." , "Please specified the Attraction.","Por favor indique a Atra\u00E7\u00E3o.","","","");
/**/var disNoFechaHoyCarros = new Array("La fecha de entrega debe ser posterior al dia de hoy." , "The pick-up date must be later than today.","A data de entrega deve ser posterior ao dia de hoje.","","","");
/**/var disNoFechasHorasDifCarros = new Array("La fecha de devolución debe ser posterior a 24 horas." , "The drop-off date must be later than 24 hours.","A data de devolu\u00E7\u00E3o deve ser posterior a 24 horas.","","","");
/**/var disPaxPermitidosTours = new Array("Por favor especifique al menos 1 y hasta {0}." ,"Please specify at least 1 but no more than {0}.","Por favor especifique ao menos 1 e at\u00E9 {0}.","","","");
/*disTotRebasa_ING*/var disPaxPermitidos = new Array("Por favor especifique al menos 1 y hasta {0} pasajeros." ,"Please specify at least 1 but no more than {0} travelers.","Por favor especifique ao menos 1 at\u00E9 {0} passageiros.","","","");
/**/var disFechaSalidaPosterior = new Array("La fecha de salida debe ser posterior a la fecha de llegada.", "The departure date must be earlier than your return date.","A data da volta deve ser posterior \u00E0 data de ida.","","","");
/**/var disFechaDevolucionPosteriorCarros = new Array("La fecha de Devolución debe ser posterior a la fecha de Entrega.", "The drop-off date must be earlier than your pick-up date.","A data de Devolu\u00E7\u00E3o deve ser posterior \u00E0 data de Entrega.","","","");
/**/var disSelectDestinoLista = new Array("Seleccione un destino de la lista.", "Select a destination in the list.", "Selecione um destino da lista.","","","");

	
/*txtDestinoING*/ var disAllDestination = new Array("Todos los Destinos", "All Destinations", "", "", "", "");
/*txtHotelING*/ var disAllHotels = new Array("Todos los Hoteles", "All Hotels", "", "", "", "");
/*txtCityING*/ var disAllCities = new Array("Todas las Ciudades / Zonas", "All Cities / Zones", "", "", "", "");
/*txtClasifTourING*/ var disAllCategories = new Array("Todas las Categorías", "All Categories", "", "", "", "");
/*disConnectFailureING*/ var disConnectFailure = new Array("Conectando ...", "Connecting ...", "Carregando...", "", "", "");
/*disNoReultsING*/ var disNoResults = new Array("No hay resultados para los datos solicitados.", "No results for your search criteria.", "", "", "", "");
/**/ var disHotels = new Array("Hoteles", "Hotels", "Hot\u00E9is", "", "", "");
/*MensajeING*/ var disNoAvailable = new Array("No Disponible", "Not Available", "", "", "", "");
var disClose = new Array("Cerrar","Close","","","","");
var titDescription = new Array("Descripci\u00F3n:","Description:","","","","");
var titRooms = new Array("Cuartos:","Rooms:","","","","");
var titView = new Array("Vista:","Room View:","","","","");
var titAmenities = new Array("Servicios:","Amenities:","","","","");
var titCancellationPolicy = new Array("Politicas de cancelaci\u00F3n:","Cancellation Policy:","","","","");
var disNewNewerFlashPlayer = new Array("La pel\u00EDcula requiere de una versi\u00F3n superior<br/> de Flash Player", "This movie requires a newer Flash Player","","","","");
var disDownloadFlashPlayer = new Array("Descargar Flash Player", "Download Flash Player","","","","");

var disAlertAdults  = new Array("Por favor indicar el n\u00FAmero de adultos","You must enter number of Adults","","","","");
var disAlertKids = new Array("Por favor indicar el n\u00FAmero de ni\u00F1os","You must enter number of Kids","","","","");
var disAlertHotel = new Array("Por favor indicar el nombre del hotel","You must enter the Hotel Name, please","","","","");
var disAlertTrasfer = new Array("Por favor seleccione el Traslado","You must specify the Transfer","","","","");
var disAlertAirline1 = new Array("Por favor indicar el nombre de la aerol\u00EDnea para el traslado del aeropuerto al hotel","You must enter the Airline Name for the Airport to Hotel transfer","","","","");
var disAlertFlight1 = new Array("Por favor indicar el n\u00FAmero de vuelo para el traslado del aeropuerto al hotel","You must enter the Flight Number for the Airport to Hotel transfer","","","","");
var disAlertAirline2 = new Array("Por favor indicar el nombre de la aerol\u00EDnea para el traslado del hotel al aeropuerto","You must enter the Airline Name for the Hotel to Airport transfer","","","","");
var disAlertFlight2 = new Array("Por favor indicar el n\u00FAmero de vuelo para el traslado del hotel al aeropuerto", "You must enter the Flight Number for the Hotel to Airport transfer","","","","");
var disAlertTipoTraslado = new Array("Por favor indicar el Tipo de Traslado","You must enter the Type of Transfers","","","","");
var disAlertFechaMinima = new Array("Mínimo con 48 horas de anticipaci\u00F3n.", "All reservations should be made within 48 hours.","","","","");
var disAlertFechaHoy1 = new Array("La fecha de llegada debe ser posterior al d\u00EDa de hoy.", "The arrival date must be later than today.","","","","");
var disAlertFechaHoy2 = new Array("La fecha de salida debe ser posterior al d\u00EDa de hoy.","The departure date must be later than today.","","","","");
var disAlertAgree = new Array("","","","","","");
	

/*   INI:    DICCIONARIO PARA CALENDARIO      */
var calPREV_YEAR = new Array("Año previo (sostener para menu)","Prev. year (hold for menu)","","","","");
var calPREV_MONTH = new Array("Mes previo (sostener para menu)","Prev. month (hold for menu)","","","","");
var calGO_TODAY = new Array("Hoy","Go Today","","","","");
var calNEXT_MONTH = new Array("Mes siguiente (sostener para menu)","Next month (hold for menu)","","","","");
var calNEXT_YEAR = new Array("Año siguiente (sostener para menu)","Next year (hold for menu)","","","","");
var calSEL_DATE = new Array("Seleccione fecha","Select date","","","","");
var calDRAG_TO_MOVE = new Array("Arrastrar para mover","Drag to move","","","","");
var calPART_TODAY = new Array(" (hoy)"," (today)","","","","");
var calINFO = new Array("Acerca del calendario","About the calendar","","","","");
var calDAY_FIRST = new Array("Mostrar %s primero","Display %s first","","","","");
var calCLOSE = new Array("Cerrar","Close","","","","");
var calTODAY = new Array("Hoy","Today","","","","");
var calTIME_PART = new Array("(Shift-)Haga clic o arrastre para cambiar el valor.","(Shift-)Click or drag to change value.","","","","");
var calTIME = new Array("Hora:","Time:","","","","");
var calABOUT = new Array("      Selecci\u00F3n de fecha:\n" + "      - Use los botones \xab, \xbb para seleccionar el año\n" + "      - Use los botones {0}, {1} para seleccionar el mes\n" + "      - Mantenga oprimido el bot\u00F3n del mouse en cualquiera de los botones superiores para una selecci\u00F3n r\u00E1pida.",
						 "      Date selection:\n" + "      - Use the \xab, \xbb buttons to select year\n" + "      - Use the {0}, {1} buttons to select month\n" + "      - Hold mouse button on any of the above buttons for faster selection.",
						 "","","","");
var calABOUT_TIME = new Array("\n\n" + "Time selection:\n" + "- Click on any of the time parts to increase it\n" + "- or Shift-click to decrease it\n" + "- or click and drag for faster selection.", 
								"\n\n" + "Time selection:\n" + "- Click on any of the time parts to increase it\n" + "- or Shift-click to decrease it\n" + "- or click and drag for faster selection.",
								"","","","");
/*   FIN:    DICCIONARIO PARA CALENDARIO      */


/*	INI:	VALIDADOR DE PAGOS */
var disAlertZip = new Array("Debe ingresar el c\u00F3digo postal (secci\u00F3n de tarjeta de cr\u00E9dito)","You must enter the Zip Code (credit card section)","","","","");
var disAlertBank = new Array("Debe ingresar el banco emisor (secci\u00F3n de tarjeta de cr\u00E9dito)", "You must enter the Issuing Bank (credit card section)","","","","");
var disAlertAddress = new Array("Debe ingresar la direcci\u00F3n (secci\u00F3n de tarjeta de cr\u00E9dito)", "You must enter the Address (credit card section)","","","","");
var disAlertName = new Array("Debe escribir su nombre", "You must enter your name","","","","");
var disAlertLastName = new Array("Debe escribir su apellido", "You must enter your last name","","","","");
var disAlertEmail = new Array("Debe introducir un E-Mail valido", "You must enter a valid E-Mail Address","","","","");
var disAlertEmail2 = new Array("El email lo necesita escribir 2 veces por seguridad. Falto la segunda.", "You must Retype E-Mail Address","","","","");
var disAlertCountry = new Array("Debe seleccionar su pa\u00EDs", "You must enter your country","","","","");
var disAlertState = new Array("Debe escribir su estado. Por favor seleccione otra vez su pa\u00EDs.", "You must enter your state. Select again your country.","","","","");
var disAlertCity = new Array("Debe escribir cual es su ciudad", "You must enter your city","","","","");
var disAlertPhone = new Array("Le falto escribir su tel\u00E9fono", "You must enter your phone number","","","","");
var disAlertPhone2 = new Array("Por favor escriba su tel\u00E9fono celular", "You must enter your cel phone number","","","","");
var disAlertCardHolderName = new Array("Debe escribir el nombre que aparece en la tarjeta de cr\u00E9dito", "You must enter the card holder name","","","","");
var disAlertCreditCard = new Array("Le falto el n\u00FAmero de la tarjeta de cr\u00E9dito", "You must enter your credit card number","","","","");
var disAlertCreditCard2 = new Array("Por favor asegurese que el n\u00FAmero de tarjeta que escribio pertenece al tipo de tarjeta que selecciono.", "Please make sure the card number you've entered matched the card type you selected.","","","","");
var disAlertCreditCard3 = new Array("La Tarjeta de Cr\u00E9dito es Invalida:", "The Credit Card is Invalid:","","","","");
var disAlertAgree = new Array("Debe aceptar las pol\u00EDticas antes de continuar","You must match Yes, I agree","","","","");
var disAlertAirline1 = new Array("Debe introducir la aerolinea y el vuelo para el traslado a su llegada", "You must enter the Airline and Flight for your arrival transfer","","","","");
var disAlertAirline2 = new Array("Debe introducir la aerolinea y el vuelo para el traslado a su partida", "You must enter the Airline and Flight for your departure transfer","","","","");
var disAlertCodigoSeguridad = new Array("Debe introducir el c\u00F3digo de seguridad ", "You must enter the Security Code","","","","");
var disAlertExpirationDate = new Array("Debe seleccionar la fecha de vencimiento de su tarjeta de cr\u00E9dito", "You must select the credit card's  expiration date","","","","");
var disAlertPhoneLenght = new Array("Debe escribir un n\u00FAmero de tel\u00E9fono v\u00E1lido", "You must enter a valid phone number","","","","");
var disAlertQuestion = new Array("Debe especificar, ¿Com\u00F3 se entero de nosotros?", "You must enter, ¿how did you hear about us?","","","","");
var disAlertDiferentes = new Array("Por favor re-escriba su email correctamente.", "Please re-type your email correctly.","","","","");
/*  FIN:	VALIDADOR DE PAGOS */

var aMeses = new Array(
						['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'],
						['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
						['Jen','Feb','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'],
						['','','','','','','','','','','','']
					  );
					  
var aMesesNombre = new Array(
							   ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
							   ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
							   ['Janeiro', 'Fevereiro', 'Mar\u00E7o', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
							   ['', '', '', '', '', '', '', '', '', '', '', '']
							);
							
var aDias = new Array(
						['Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab', 'Dom'],
						['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
						['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'S\u00E1b', 'Dom'],
						['', '', '', '', '', '', '', '']
					);
					
var aDiasNombre = new Array(
						['Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado', 'Domingo'],
						['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
						['Domingo', 'Segunda', 'Ter\u00E7a', 'Quarta', 'Quinta', 'Sexta', 'S\u00E1bado', 'Domingo'],
						['', '', '', '', '', '', '', '']
					);
								  
var fdic=function(){
			var dicc = {ESP:0, ING:1, POR:2};
			var pos=dicc.ING; var resultado='';
	return{		
			trad:function(clave,idioma){
				if (idioma==null) { idioma = this.lang(idioma); }
				resultado = ''; pos = eval("dicc." + idioma.toUpperCase());
				//Si me lo pasan como cadena 
				clave = (typeof clave=='string')? eval(clave) : clave;				
				if (typeof clave!='undefined') {								
					resultado = (typeof clave[pos]!='undefined') ? clave[pos]:'';
				}				
				return resultado;
			
			},
			meses:function(idioma) {
				if (idioma==null) { idioma = this.lang(idioma); }
				pos = eval("dicc." + idioma);
				if (typeof aMeses!='undefined') {								
					resultado = (typeof aMeses[pos]!='undefined') ? aMeses[pos]:'';
				}				
				return resultado;
			},
			mesesnombre:function(idioma) {
				if (idioma==null) { idioma = this.lang(idioma); }
				pos = eval("dicc." + idioma);
				if (typeof aMesesNombre!='undefined') {								
					resultado = (typeof aMesesNombre[pos]!='undefined') ? aMesesNombre[pos]:'';
				}				
				return resultado;
			},
			dias:function(idioma) {
				if (idioma==null) { idioma = this.lang(idioma); }
				pos = eval("dicc." + idioma);
				if (typeof aDias!='undefined') {								
					resultado = (typeof aDias[pos]!='undefined') ? aDias[pos]:'';
				}				
				return resultado;
			},
			diasnombre:function(idioma) {
				if (idioma==null) { idioma = this.lang(idioma); }
				pos = eval("dicc." + idioma);
				if (typeof aDiasNombre!='undefined') {								
					resultado = (typeof aDiasNombre[pos]!='undefined') ? aDiasNombre[pos]:'';
				}				
				return resultado;
			},
			lang:function(_lang){
				if (typeof _lang=='undefined' || _lang==null || _lang== '') {
					if (typeof gblIDIOMA!='undefined') {
						_lang = gblIDIOMA;
					}else {
						_lang = document.getElementById('Idioma');
						_lang = (typeof _lang!='undefined' && _lang!=null) ? _lang.value :'';
					}					
					_lang = (_lang!='') ? _lang : 'ING';						
				}
				return _lang.toUpperCase();
			}
			
	}; //fin <return>
}(); //fin <fdic>

	
