/*
FRAMEWORK_VERSION:19.0.0
*/
registerNameSpace("Common");Common.PopupCreator=function(a){a=a||{};a.id=a.id||false;a.title=a.title||false;a.noPuntita=a.noPuntita||false;this.template='<div class="popUp" style="display:none" '+(a.id?'id="'+a.id+'"':"")+'> 		<div class="contenedorPopUp"> 			<div class="esquina arribaIzq"></div> 			<div class="arribaMedio"></div> 			<div class="esquina arribaDer"></div> 			<div class="contenedorFondoDer"> 				<div class="contenedorFondoIzq"> 					<div class="contenedorBordes"> 						<div class="contenidoDelPopUp"> 							<div class="mainSprite closeWindow"></div> 							'+(a.noPuntita?"":'<span class="sprite puntita"></span>')+(a.title?'<span class="tituloPopUp">'+a.title+"</span>":"")+' 						</div> 					</div> 				</div> 			</div> 			<div class="esquina abajoIzq"></div> 			<div class="abajoMedio"></div> 			<div class="esquina abajoDer"></div> 		</div> 	</div>';var b=$(this.template);$(".closeWindow",b).click(function(){$(this).parents(".popUp").hide()});return b};registerNameSpace("Common");Common.PopupCreatorNew=function(a){a=a||{};a.id=a.id||false;a.title=a.title||false;a.noPuntita=a.noPuntita||false;a.indicatorPosition=a.indicatorPosition||"top";this.template='<div class="popUpNew"'+(a.id?'id="'+a.id+'"':"")+'> 			<div class="opaqueDiv"></div> 			<div class="popUpContainer"> 		        <div class="commonSprite closePopUp closeBlueIcon"></div> 		        '+(a.noPuntita?"":'<span class="indicator '+a.indicatorPosition+'Indicator"></span>')+" 		        "+(a.title?'<div class="titlePopUpContainer"><span class="titlePopUp">'+a.title+"</span></div>":"")+' 				<div class="popUpContent"></div> 		    </div>		</div>';var b=$(this.template);$(".closePopUp",b).click(function(){$(this).parents(".popUpNew").hide()});return b};registerNameSpace("Common.Utils");Common.Utils.QuerySt=function(a){hu=window.location.search.substring(1);gy=hu.split("&");for(i=0;i<gy.length;i++){ft=gy[i].split("=");if(ft[0]==a){ft[1]=ft[1].replace(/[+]/gi," ");ft[1]=ft[1].replace(/[.]/gi,".\n");return ft[1]}}return""};registerNameSpace("Common");Common.OmnitureDataCollector=function(options){var me=this;this.globalPaxCantInf=0;this.globalPaxCantCnn=0;this.globalPaxCantAdt=0;this.setEVar=function(number,value){data["eVar"+number]=value};this.getEVar=function(number){return data["eVar"+number]};this.setProp=function(number,value){data["prop"+number]=value};this.setNamedVar=function(name,value){data[name]=value};this.getNamedVar=function(value){return data[value]};this.setEvent=function(number,product){if(product!=-1){dataEvents["event"+number]=product}else{dataEvents["event"+number]=-1}};this.setNamedEvent=function(value){dataEvents[value]=-1};this.eventPurchase=function(){dataEvents.purchase=-1};this.eventCheckout=function(){dataEvents.scCheckout=-1};this.setAsyncEvent=function(num,value){var omnitureDataCollectorAjax=new Common.OmnitureDataCollector();omnitureDataCollectorAjax.setEvent(num,value);omnitureDataCollectorAjax.beforeApply(s);s=omnitureDataCollectorAjax.applyData(s);omnitureDataCollectorAjax.afterApply(s);omnitureDataCollectorAjax.sendData(s)};this.fireEvent=function(event){var omnitureDataCollectorAjax=new Common.OmnitureDataCollector();if(event.name!=undefined){omnitureDataCollectorAjax.setNamedEvent(event.name)}if(event.eVar!=undefined&&event.value!=undefined){omnitureDataCollectorAjax.setNamedVar(event.eVar,event.value)}omnitureDataCollectorAjax.beforeApply(s);s=omnitureDataCollectorAjax.applyData(s);omnitureDataCollectorAjax.afterApply(s);omnitureDataCollectorAjax.sendData(s)};this.isAviable=function(){if(typeof(s)!="object"){return false}else{return true}};this.beforeApply=function(omnitureObject){};this.applyData=function(omnitureObject){for(var prop in data){try{eval("omnitureObject."+prop+' = "'+data[prop]+'";')}catch(e){this.errMessages+=e+"\n"}}omnitureObject.events="";for(var event in dataEvents){try{if(omnitureObject.events==""){omnitureObject.events=event}else{omnitureObject.events+=","+event}}catch(e){this.errMessages+=e+"\n"}}return omnitureObject};this.sendData=function(omnitureObject){omnitureObject.t()};this.sendDataNoPageview=function(omnitureObject){omnitureObject.tl()};this.afterApply=function(omnitureObject){};this.getErrors=function(){return this.errMessages};this.setAutomaticCountry=function(){var country="INC";if(this.getPaisVisita()==undefined&&!Common.Utils.Cookie.ReadCookie("s_eVar27")){var curDomain=document.domain;var foundCountry=curDomain.match(/\b(AR|BO|BR|CL|CO|CR|EC|SV|ES|GT|HN|MX|NI|PA|PY|PE|PR|DO|UY|US|VE|INC|decolar)\b/ig);if(foundCountry!=null&&foundCountry.length>0){country=foundCountry[0].toUpperCase();if(country=="DECOLAR"){country="BR"}}pageData.country=country}else{pageData.country=Common.Utils.Cookie.ReadCookie("s_eVar27")||this.getPaisVisita()}pageData.country=pageData.country.toLowerCase()};this.setGlobalCategory=function(value){Common.Utils.Cookie.CreateCookie("OMNITURE_GLOBAL_CATEGORY",value)};this.getGlobalCategory=function(){return Common.Utils.Cookie.ReadCookie("OMNITURE_GLOBAL_CATEGORY")};this.setGlobalProductId=function(value){Common.Utils.Cookie.CreateCookie("OMNITURE_GLOBAL_PRODUCTID",value)};this.getGlobalProductId=function(){return Common.Utils.Cookie.ReadCookie("OMNITURE_GLOBAL_PRODUCTID")};this.setGlobalPaxCant=function(value,type){switch(type){case"inf":this.globalPaxCantInf=value;break;case"cnn":this.globalPaxCantCnn=value;break;case"adt":default:this.globalPaxCantAdt=value;break}var total=this.globalPaxCantInf+this.globalPaxCantCnn+this.globalPaxCantAdt;Common.Utils.Cookie.CreateCookie("OMNITURE_GLOBAL_PAXCANT",total)};this.getGlobalPaxCant=function(){return Common.Utils.Cookie.ReadCookie("OMNITURE_GLOBAL_PAXCANT")};this.setGlobalTotalAmount=function(value){Common.Utils.Cookie.CreateCookie("OMNITURE_GLOBAL_TOTAL_AMOUNT",value)};this.getGlobalTotalAmount=function(){return Common.Utils.Cookie.ReadCookie("OMNITURE_GLOBAL_TOTAL_AMOUNT")};this.setS_account=function(value){this.setNamedVar("s_account",value)};this.setBrowserHeight=function(value){this.setNamedVar("browserHeight",value)};this.setBrowserWidth=function(value){this.setNamedVar("browserWidth",value)};this.setCampaign=function(value){this.setNamedVar("campaign",value)};this.setChannel=function(value){var channel=pageData.country+": ";if(value){channel+=value}else{channel+=pageData.flow}this.setNamedVar("channel",channel.toLowerCase())};this.setSubsection=function(value){var subsection=pageData.country+": ";if(value){subsection+=value}else{subsection+=pageData.flow+": "+pageData.section}this.setProp(1,subsection.toLowerCase())};this.setCharSet=function(value){this.setNamedVar("charSet",value)};this.setColorDepth=function(value){this.setNamedVar("colorDepth",value)};this.setConnectionType=function(value){this.setNamedVar("connectionType",value)};this.setCookieDomainPeriods=function(value){this.setNamedVar("cookieDomainPeriods",value)};this.setCookieLifetime=function(value){this.setNamedVar("cookieLifetime",value)};this.setCookiesEnabled=function(value){this.setNamedVar("cookiesEnabled",value)};this.setCurrencyCode=function(value){this.setNamedVar("currencyCode",value)};this.setDc=function(value){this.setNamedVar("dc",value)};this.setDoPlugins=function(value){this.setNamedVar("doPlugins",value)};this.setDynamicAccountList=function(value){this.setNamedVar("dynamicAccountList",value)};this.setDynamicAccountMatch=function(value){this.setNamedVar("dynamicAccountMatch",value)};this.setDynamicAccountSelection=function(value){this.setNamedVar("dynamicAccountSelection",value)};this.setDynamicVariablePrefix=function(value){this.setNamedVar("dynamicVariablePrefix",value)};this.setFpCookieDomainPeriods=function(value){this.setNamedVar("fpCookieDomainPeriods",value)};this.setHomepage=function(value){this.setNamedVar("homepage",value)};this.setJavaEnabled=function(value){this.setNamedVar("javaEnabled",value)};this.setJavascriptVersion=function(value){this.setNamedVar("javascriptVersion",value)};this.setLinkDownloadFileTypes=function(value){this.setNamedVar("linkDownloadFileTypes",value)};this.setLinkExternalFilters=function(value){this.setNamedVar("linkExternalFilters",value)};this.setLinkInternalFilters=function(value){this.setNamedVar("linkInternalFilters",value)};this.setLinkLeaveQueryString=function(value){this.setNamedVar("linkLeaveQueryString",value)};this.setLinkName=function(value){this.setNamedVar("linkName",value)};this.setLinkTrackEvents=function(value){this.setNamedVar("linkTrackEvents",value)};this.setLinkTrackVars=function(value){this.setNamedVar("linkTrackVars",value)};this.setLinkType=function(value){this.setNamedVar("linkType",value)};this.setMediaLength=function(value){this.setNamedVar("mediaLength",value)};this.setMediaName=function(value){this.setNamedVar("mediaName",value)};this.setMediaPlayer=function(value){this.setNamedVar("mediaPlayer",value)};this.setMediaSession=function(value){this.setNamedVar("mediaSession",value)};this.setMobile=function(value){this.setNamedVar("mobile",value)};this.setS_objectID=function(value){this.setNamedVar("s_objectID",value)};this.setPageName=function(oValues){var pageName="";if(typeof oValues=="object"){for(var e in oValues){pageData[e]=oValues[e]}pageName=pageData.country+": "+pageData.flow+": "+pageData.section+": "+pageData.page}else{if(typeof oValues=="string"){pageData.page=oValues;pageName=pageData.country+": "+pageData.page}else{return false}}this.setNamedVar("pageName",this.quitarAcentos(pageName.toLowerCase()));this.setChannel();this.setSubsection();this.setCodigoPais(pageData.country.toLowerCase())};this.setPageType=function(value){this.setNamedVar("pageType",value)};this.setPageURL=function(value){this.setNamedVar("pageURL",value)};this.setPlugins=function(value){this.setNamedVar("plugins",value)};this.setProducts=function(value){var value=value.replace(/[.]/gi,"");this.setNamedVar("products",value)};this.setPurchaseID=function(value){this.setNamedVar("purchaseID",value)};this.setReferrer=function(value){this.setNamedVar("referrer",value)};this.setResolution=function(value){this.setNamedVar("resolution",value)};this.setServer=function(value){this.setNamedVar("server",value)};this.setState=function(value){this.setNamedVar("state",value)};this.setTrackDownloadLinks=function(value){this.setNamedVar("trackDownloadLinks",value)};this.setTrackExternalLinks=function(value){this.setNamedVar("trackExternalLinks",value)};this.setTrackingServer=function(value){this.setNamedVar("trackingServer",value)};this.setTrackingServerSecure=function(value){this.setNamedVar("trackingServerSecure",value)};this.setTrackInlineStats=function(value){this.setNamedVar("trackInlineStats",value)};this.setTransactionID=function(value){this.setNamedVar("transactionID",value)};this.setS_usePlugins=function(value){this.setNamedVar("s_usePlugins",value)};this.setVisitorID=function(value){this.setNamedVar("visitorID",value)};this.setVisitorNamespace=function(value){this.setNamedVar("visitorNamespace",value)};this.setZip=function(value){this.setNamedVar("zip",value)};this.setRegion=function(value){this.setEVar(52,value)};this.setDepartureMonth=function(value){var month=value.split("-")[0];var year=value.split("-")[1];var departureMonth=year.toString()+month.toString();if(month>0&&month<10){departureMonth=year.toString()+"0"+month.toString()}this.setEVar(53,departureMonth)};this.setDuration=function(value){this.setEVar(54,value)};this.setPaxsAdults=function(value){this.setEVar(55,value)};this.setPaxsChildren=function(value){this.setEVar(56,value)};this.setDepartureDate=function(value){this.setEVar(57,value)};this.setReturnDate=function(value){this.setEVar(58,value)};this.setDeparturePort=function(value){this.setEVar(59,value)};this.setReturnPort=function(value){this.setEVar(60,value)};this.setCabinType=function(value){this.setEVar(61,value)};this.setSearchRefinements=function(value){this.setEVar(62,value)};this.setTipoProducto=function(value){this.setEVar(1,value);this.setGlobalCategory(value)};this.getTipoProducto=function(value){return this.getEVar(1)};this.setDiaDeSemanaIda=function(value){this.setEVar(7,value)};this.setDiaDeSemanaVuelta=function(value){this.setEVar(8,value)};this.setNombreDeAerolinea=function(value){this.setEVar(9,value)};this.setIdCro=function(value){this.setEVar(10,value)};this.setMedioDePago=function(value){this.setEVar(11,value)};this.setNeedsAddressCreditCard=function(value){};this.setContrataSeguro=function(value){};this.setKenshoo=function(value){this.setEVar(14,value)};this.setTipoProductoHotel=function(value){};this.setDiaSemanaIdaHotel=function(value){this.setEVar(20,value)};this.setDiaSemanaVueltaHotel=function(value){this.setEVar(21,value)};this.setNombreHotel=function(value){};this.setIDHotel=function(value){};this.setIDCroHotel=function(value){};this.setMedioDePagoHotel=function(value){};this.setPaisVisita=function(value){this.setEVar(27,value)};this.getPaisVisita=function(){return this.getEVar(27)};this.setIdentificadorSeo=function(value){this.setEVar(28,value)};this.setNombreDeLanding=function(value){this.setEVar(29,value)};this.setCheckoutId=function(value){this.setEVar(49,value)};this.setProvider=function(value){this.setEVar(51,value)};this.setABTesting30=function(value){};this.setSearchResult=function(){this.setEvent(1,-1)};this.setCantidadDeBebes=function(value){this.setGlobalPaxCant(value,"inf");this.setEvent(6,value)};this.setCantidadDeResultados=function(value){};this.setCantidadDeResultadosPorAerolineas=function(value){this.setEvent(8,value)};this.setPrecioMinimo=function(value){};this.setResultadoElegido=function(value){this.setEvent(10,value)};this.setTarifaPorAdulto=function(value){this.setEvent(11,value)};this.setTotalTarifa=function(value){this.setEvent(12,value)};this.setImpTasas=function(value){this.setEvent(13,value)};this.setCargos=function(value){this.setEvent(14,value)};this.setTotal=function(value){this.setEvent(15,value);this.setGlobalTotalAmount(value)};this.setCantidadDePagos=function(value){};this.setDuracionViajeHotel=function(value){this.setEvent(35,value)};this.setAnticipacionCompraHotel=function(value){this.setEvent(36,value)};this.setCantidadResultadosHotel=function(value){};this.setResultadoElegidoHotel=function(value){var omnitureDataCollectorAjax=new Common.OmnitureDataCollector();omnitureDataCollectorAjax.setEvent(42,value);omnitureDataCollectorAjax.beforeApply(s);s=omnitureDataCollectorAjax.applyData(s);omnitureDataCollectorAjax.afterApply(s);omnitureDataCollectorAjax.sendData(s)};this.setPrecioMinimoHotel=function(value){};this.setTarifaPorNocheHotel=function(value){this.setAsyncEvent(44,value)};this.setTotalEstadiaHotel=function(value){this.setAsyncEvent(45,value)};this.setImpuestosHotel=function(value){this.setAsyncEvent(46,value)};this.setTotalHotel=function(value){this.setGlobalTotalAmount(value);this.setAsyncEvent(47,value)};this.eventComprarReservar=function(source_event){};this.eventMasDetalle=function(source_event){var eJSON={name:"event22",description:"mas detalle",source_event:source_event};this.fireEvent(eJSON)};this.eventOrdenarPorMasVendidos=function(source_event){var eJSON={name:"event23",description:"ordenarpormasvendidos",source_event:source_event};this.fireEvent(eJSON)};this.eventOrdenarPorPrecio=function(source_event){};this.eventOrdenarPorDuracion=function(source_event){var eJSON={name:"event26",description:"ordenduracion",source_event:source_event};this.fireEvent(eJSON)};this.eventNuevaBusqueda=function(source_event){};this.eventBuscarVuelos=function(source_event){var eJSON={name:"event29",description:"layer",source_event:source_event};this.fireEvent(eJSON)};this.eventMostrarCuotas=function(source_event){var eJSON={name:"event31",description:"mcuotas",source_event:source_event};this.fireEvent(eJSON)};this.eventComprar=function(source_event){var eJSON={name:"event32",description:"comprarcheckout",source_event:source_event};this.fireEvent(eJSON)};this.eventMasDetalles=function(source_event){var eJSON={name:"event33",description:"masdetalle",source_event:source_event};this.fireEvent(eJSON)};this.eventTieneComentarioVuelos=function(source_event){var eJSON={name:"event34",description:"comentario",source_event:source_event};this.fireEvent(eJSON)};this.eventSolapaListado=function(source_event){var eJSON={name:"event48",description:"listado",source_event:source_event};this.fireEvent(eJSON)};this.eventSolapaMapas=function(source_event){var eJSON={name:"event49",description:"mapas",source_event:source_event};this.fireEvent(eJSON)};this.eventSolapaFotos=function(source_event){var eJSON={name:"event50",description:"fotos",source_event:source_event};this.fireEvent(eJSON)};this.eventOrdenarMasVendidos=function(source_event){};this.eventOrdenarPorPrecio=function(source_event){};this.eventOrdenarPorEstrellas=function(source_event){};this.eventMasFotos=function(source_event){};this.eventUbicacion=function(source_event){var eJSON={name:"event55",description:"ubicacion",source_event:source_event};this.fireEvent(eJSON)};this.eventTarifas=function(source_event){var eJSON={name:"event56",description:"tarifas",source_event:source_event};this.fireEvent(eJSON)};this.eventCambioMoneda=function(source_event){};this.eventNuevaBusqueda=function(source_event){};this.eventBuscarHoteles=function(source_event){var eJSON={name:"event59",description:"buscarhoteles",source_event:source_event};this.fireEvent(eJSON)};this.eventSeleccionarHoteles=function(source_event){};this.eventSolapaDescripcion=function(source_event){var eJSON={name:"event61",description:"descripcion",source_event:source_event};this.fireEvent(eJSON)};this.eventSolapaFotos=function(source_event){var eJSON={name:"event62",description:"fotos",source_event:source_event};this.fireEvent(eJSON)};this.eventSolapaUbicacion=function(source_event){var eJSON={name:"event63",description:"ubicacion",source_event:source_event};this.fireEvent(eJSON)};this.eventSolapaServicios=function(source_event){var eJSON={name:"event64",description:"servicios",source_event:source_event};this.fireEvent(eJSON)};this.eventTieneComentario=function(source_event){var eJSON={name:"event66",description:"comentario",source_event:source_event};this.fireEvent(eJSON)};this.eventConfirmarReserva=function(source_event){var eJSON={name:"event67",description:"confirmar_reserva",source_event:source_event};this.fireEvent(eJSON)};this.eventSeleccionarResultados=function(source_event){var eJSON={name:"event68",description:"seleccionar_resultados",source_event:source_event};this.fireEvent(eJSON)};this.eventContadorLanding=function(source_event){var eJSON={name:"event69",description:"contador_landing",source_event:source_event};this.fireEvent(eJSON)};this.setType=function(value){this.setProp(2,value)};this.setDomain=function(value){this.setProp(15,value);this.setEVar(35,value)};this.setTipoDeViaje=function(value){var value=value.toLowerCase();this.setEVar(2,value)};this.setCodigoCiudadOrigen=function(value){var value_array=value.split(",");if(value_array.length>1){this.setEVar(3,value_array[0])}else{this.setEVar(3,value)}};this.setCodigoCiudadDestino=function(value){var value_array=value.split(",");var value_count=value_array.length-1;if(value_array.length>1){this.setEVar(4,value_array[value_count])}else{this.setEVar(4,value)}};this.setCodigoCiudadOrigenDestino=function(){var value=this.getEVar(3)+"_"+this.getEVar(4);this.setEVar(5,value)};this.setFechaIda=function(value){var value_array=value.split(",");if(value_array.length>1){value=value_array[0].replace(/[-]/gi,"");this.setEVar(6,value)}else{value=value.replace(/[-]/gi,"");this.setEVar(6,value)}};this.setFechaVuelta=function(value){var value=value.replace(/[-]/gi,"");this.setEVar(7,value)};this.setCantidadDeAdultos=function(value){this.setEVar(8,value);this.setGlobalPaxCant(value,"adt")};this.setCantidadDeNinios=function(value){this.setGlobalPaxCant(value,"cnn");this.setEVar(9,value)};this.setIncluyeHotel=function(){var incluyeHotel=Common.Utils.Cookie.ReadCookie("OMNITURE_SEARCH_FLIGHTS_HOTELS");if(incluyeHotel==1){this.setEVar(10,"hotel")}else{this.setEVar(10,"No Hotel")}};this.eventFiltrarPorAerolinea=function(source_event,value){var value="airline: "+value;value=this.quitarAcentos(value.toLowerCase());var eJSON={name:"event6",description:"filtrarporaerolinea",source_event:source_event,eVar:"eVar31",value:value};this.fireEvent(eJSON)};this.eventFiltrarPorParadas=function(source_event,value){var value="stops: "+value;value=this.quitarAcentos(value.toLowerCase());var eJSON={name:"event6",description:"fparadas",source_event:source_event,eVar:"eVar31",value:value};this.fireEvent(eJSON)};this.eventFilterCurrency=function(source_event,value){var _value="filter: currency: "+value;var eJSON={name:"event6",description:"",source_event:source_event,eVar:"eVar31",value:_value};this.fireEvent(eJSON)};this.eventFilterPrice=function(source_event,value){var _value="filter: price: "+value;var eJSON={name:"event6",description:"",source_event:source_event,eVar:"eVar31",value:_value};this.fireEvent(eJSON)};this.eventFilterDeparture=function(source_event,value){var _value="filter: departure: "+value;var eJSON={name:"event6",description:"",source_event:source_event,eVar:"eVar31",value:_value};this.fireEvent(eJSON)};this.eventFilterArrival=function(source_event,value){var _value="filter: arrival: "+value;var eJSON={name:"event6",description:"",source_event:source_event,eVar:"eVar31",value:_value};this.fireEvent(eJSON)};this.eventFilterScales=function(source_event,value){var _value="filter: scales: "+value;var eJSON={name:"event6",description:"",source_event:source_event,eVar:"eVar31",value:_value};this.fireEvent(eJSON)};this.eventFilterAirlines=function(source_event,value){var _value="filter: airlines: "+value;var eJSON={name:"event6",description:"",source_event:source_event,eVar:"eVar31",value:_value};this.fireEvent(eJSON)};this.eventOrderOrderby=function(source_event,value){var _value="order: orderby: "+value;var eJSON={name:"event6",description:"",source_event:source_event,eVar:"eVar31",value:_value};this.fireEvent(eJSON)};this.eventOrderCurrency=function(source_event,value){var _value="order: currency: "+value;var eJSON={name:"event6",description:"",source_event:source_event,eVar:"eVar31",value:_value};this.fireEvent(eJSON)};this.eventMatrixAirlines=function(source_event,value){var _value="matrix: airlines: "+value;var eJSON={name:"event6",description:"",source_event:source_event,eVar:"eVar31",value:_value};this.fireEvent(eJSON)};this.eventMatrixScales=function(source_event,value){var _value="matrix: scales: "+value;var eJSON={name:"event6",description:"",source_event:source_event,eVar:"eVar31",value:_value};this.fireEvent(eJSON)};this.setFiltraResultados=function(value){this.setEVar(31,value)};this.setProductSearches=function(value){this.setEvent(1,value)};this.setSearches=function(value){this.setEvent(4,value)};this.setNullSearches=function(value){this.setEvent(5,value)};this.eventCambioMonedaVuelos=function(source_event,value){var value="currency: "+value;value=value.toLowerCase();var eJSON={name:"event6",description:"cambiomonedas",source_event:source_event,eVar:"eVar31",value:value};this.fireEvent(eJSON)};this.getTipoDeViaje=function(value){if(value==1){return"OW"}else{if(value==2){return"RT"}else{if(value==3){return"MC"}else{return"NULL"}}}};this.eventAdd=function(){dataEvents.scAdd=-1};this.setSearchResults=function(value){if(value==1){var rankingHotel=Common.Utils.Cookie.ReadCookie("OMNITURE_RANKING_HOTEL");if(rankingHotel){this.setEVar(30,rankingHotel)}}else{if(value==2){var rankingVuelo=Common.Utils.Cookie.ReadCookie("OMNITURE_RANKING_VUELO");if(rankingVuelo){this.setEVar(30,rankingVuelo)}}else{if(value==3){var rankingPaquete=Common.Utils.Cookie.ReadCookie("OMNITURE_RANKING_PAQUETE");if(rankingPaquete){this.setEVar(30,rankingPaquete)}}else{if(value==4){var rankingCruise=Common.Utils.Cookie.ReadCookie("OMNITURE_RANKING_CRUISE");if(rankingCruise){this.setEVar(30,rankingCruise)}}else{this.setEVar(30,0)}}}}};this.setCiudadDestinoHotel=function(value){this.setEVar(11,value)};this.setFechaIdaHotel=function(value){var value=value.replace(/[-]/gi,"");this.setEVar(12,value)};this.setFechaVueltaHotel=function(value){var value=value.replace(/[-]/gi,"");this.setEVar(13,value)};this.setCantidadHabitacionesHotel=function(value){this.setEVar(14,value)};this.setCantidadAdultosHotel=function(value){this.setGlobalPaxCant(value,"adt");this.setEVar(15,value)};this.setCantidadNinosHotel=function(value){this.setGlobalPaxCant(value,"cnn");this.setEVar(16,value)};this.eventGuardarHotel=function(source_event,value){var value=";HTL_"+value.id+"_"+value.destinationCode;var eJSON={name:"event7",description:"addFavorite",source_event:source_event,eVar:"products",value:value};this.fireEvent(eJSON)};this.eventComentariosHotel=function(source_event,value){var value=";HTL_"+value.id+"_"+value.destinationCode;var eJSON={name:"event9",description:"hotelComments",source_event:source_event,eVar:"products",value:value};this.fireEvent(eJSON)};this.eventProdView=function(){dataEvents.prodView=-1};this.setProductDetailView=function(){dataEvents.event2=-1};this.setRankingHotel=function(source_event){Common.Utils.Cookie.CreateCookie("OMNITURE_RANKING_HOTEL","");var hotelId=$(source_event).parents("li.hotel").attr("id");var hotelesId=[];$("#hotelResults li.hotel:visible").each(function(){hotelesId.push($(this).attr("id"))});var paginator=$("#paginator .paginatorButtonCurrentPageClass").text();if(paginator>1){paginator=(paginator-1)*10}else{paginator=0}for(x=0;x<hotelesId.length;x++){if(hotelesId[x]==hotelId){Common.Utils.Cookie.CreateCookie("OMNITURE_RANKING_HOTEL",x+paginator+1)}}};this.eventMapaHotel=function(source_event,value){var value=";HTL_"+value.id+"_"+value.destinationCode;var eJSON={name:"event8",description:"hotelMap",source_event:source_event,eVar:"products",value:value};this.fireEvent(eJSON)};this.eventOrdenarHoteles=function(source_event,value){var value="sort: "+value.toLowerCase();var eJSON={name:"event6",description:"fparadas",source_event:source_event,eVar:"eVar32",value:value};this.fireEvent(eJSON)};this.eventCambioMonedaHoteles=function(source_event,value){var value="currency: "+value.toLowerCase();var eJSON={name:"event6",description:"cambiomonedas",source_event:source_event,eVar:"eVar32",value:value};this.fireEvent(eJSON)};this.eventFiltroHoteles=function(source_event,value){var value="filter: "+value.toLowerCase();var eJSON={name:"event6",description:"filter",source_event:source_event,eVar:"eVar32",value:value};this.fireEvent(eJSON)};this.eventFitroEstrellas=function(source_event,value){var value="stars: "+value.toLowerCase();var eJSON={name:"event6",description:"filter",source_event:source_event,eVar:"eVar33",value:value};this.fireEvent(eJSON)};this.eventOrdenarPaquetes=function(source_event,value){var value="sort: "+value.toLowerCase();var eJSON={name:"event6",description:"filter",source_event:source_event,eVar:"eVar33",value:value};this.fireEvent(eJSON)};this.eventFiltroPrecioPaquetes=function(source_event,value){var value="price: "+value.toLowerCase();var eJSON={name:"event6",description:"filter",source_event:source_event,eVar:"eVar33",value:value};this.fireEvent(eJSON)};this.eventCambioMonedaPaquetes=function(source_event,value){var value="currency: "+value.toLowerCase();var eJSON={name:"event6",description:"filter",source_event:source_event,eVar:"eVar33",value:value};this.fireEvent(eJSON)};this.eventFiltroNombreHotelPaquetes=function(source_event,value){var value="hotelName: "+value.toLowerCase();var eJSON={name:"event6",description:"filter",source_event:source_event,eVar:"eVar33",value:value};this.fireEvent(eJSON)};this.eventFilterCruises=function(source_event,value){var value="filter: "+value.toLowerCase();var eJSON={name:"event6",description:"filter",source_event:source_event,eVar:"eVar62",value:value};this.fireEvent(eJSON)};this.eventChangeCabinCruises=function(source_event,value){var value=value.toUpperCase();var eJSON={name:"event6",description:"filter",source_event:source_event,eVar:"eVar61",value:value};this.fireEvent(eJSON)};this.eventChangeProducts=function(source_event,value){var eJSON={name:"event6",description:"",source_event:source_event,eVar:"products",value:value};this.fireEvent(eJSON)};this.eventSetNullSearches=function(source_event,value){var eJSON={name:"event5",description:"",source_event:source_event};this.fireEvent(eJSON)};this.eventTaxesAndFees=function(){dataEvents.event3=-1};this.setRankingVuelos=function(source_event){Common.Utils.Cookie.CreateCookie("OMNITURE_RANKING_VUELO","");var vueloId=$(source_event).parents("div.cajaResultado").attr("id");var vueloRanking=vueloId.split("_");Common.Utils.Cookie.CreateCookie("OMNITURE_RANKING_VUELO",(parseInt(vueloRanking[1])+1))};this.setCodigoCiudadOrigenPackages=function(value){this.setEVar(21,value)};this.setCodigoCiudadDestinoPackages=function(value){this.setEVar(22,value)};this.setFechaIdaPackages=function(value){var value=value.replace(/[-]/gi,"");this.setEVar(23,value)};this.setFechaVueltaPackages=function(value){var value=value.replace(/[-]/gi,"");this.setEVar(24,value)};this.setCantidadHabitacionesPackages=function(value){this.setEVar(63,value)};this.setCantidadAdultosPackages=function(value){this.setGlobalPaxCant(value,"adt");this.setEVar(64,value)};this.setCantidadNinosPackages=function(value){this.setGlobalPaxCant(value,"cnn");this.setEVar(65,value)};this.setBookingPace=function(value){var d=new Date();var t1=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();var value_array=value.split(",");if(value_array.length>1){var t2=value_array[0]}else{var t2=value}var one_day=1000*60*60*24;var x=t1.split("-");var y=t2.split("-");var date1=new Date(x[0],(x[1]-1),x[2]);var date2=new Date(y[0],(y[1]-1),y[2]);var month1=x[1]-1;var month2=y[1]-1;if(date2<date1){date2=new Date()}var _Diff=Math.ceil((date2.getTime()-date1.getTime())/(one_day));this.setEVar(25,_Diff);this.setProp(3,_Diff)};this.setDuracionViaje=function(type,dateCheckIn,dateCheckOut){var dateCheckIn_array=dateCheckIn.split(",");var dateCheckOut_array=dateCheckOut.split(",");var dateCheckInOriginal=dateCheckIn;var dateCheckOutOriginal=dateCheckOut;if(dateCheckIn_array.length>1){dateCheckIn=dateCheckIn_array[0].replace(/[-]/gi,"")}else{dateCheckIn=dateCheckIn.replace(/[-]/gi,"")}if(dateCheckOut_array.length>1){dateCheckOut=dateCheckOut_array[0].replace(/[-]/gi,"")}else{dateCheckOut=dateCheckOut.replace(/[-]/gi,"")}if(type==1){this.setProp(6,dateCheckIn);this.setProp(7,dateCheckOut)}else{if(type==2){this.setProp(4,dateCheckIn);this.setProp(5,dateCheckOut)}else{if(type==3){this.setProp(10,dateCheckIn);this.setProp(11,dateCheckOut)}}}var dateCheckInOriginal_array=dateCheckInOriginal.split(",");if(dateCheckInOriginal_array.length>1){var t1=dateCheckInOriginal_array[0]}else{var t1=dateCheckInOriginal}var dateCheckOutOriginal_array=dateCheckOutOriginal.split(",");if(dateCheckOutOriginal_array.length>1){var t2=dateCheckOutOriginal_array[0]}else{var t2=dateCheckOutOriginal}var one_day=1000*60*60*24;var x=t1.split("-");var y=t2.split("-");var date1=new Date(x[0],(x[1]-1),x[2]);var date2=new Date(y[0],(y[1]-1),y[2]);var month1=x[1]-1;var month2=y[1]-1;var _Diff=Math.ceil((date2.getTime()-date1.getTime())/(one_day));this.setEVar(26,_Diff)};this.setCodigoPais=function(value){this.setEVar(36,value);this.setProp(16,value)};this.setABtesting=function(position,version,identificador,pageName){var pageName=pageName;var pageName_array=pageName.split(":");if(pageName_array.length<position){var versionFinal=": "+identificador+": v"+version}else{var versionFinal=" "+identificador+": v"+version}pageName_array.splice(position,0,versionFinal);var value=pageName_array.join(":");if(version==1){this.setEVar(37,value);this.setProp(17,value)}else{if(version==2){this.setEVar(38,value);this.setProp(18,value)}else{if(version==3){this.setEVar(39,value);this.setProp(19,value)}else{if(version==4){this.setEVar(42,value);this.setProp(20,value)}else{if(version==5){this.setEVar(43,value);this.setProp(21,value)}else{if(version==6){this.setEVar(44,value);this.setProp(22,value)}else{if(version==7){this.setEVar(45,value);this.setProp(23,value)}else{if(version==8){this.setEVar(46,value);this.setProp(24,value)}else{if(version==9){this.setEVar(47,value);this.setProp(25,value)}else{if(version==10){this.setEVar(48,value);this.setProp(26,value)}}}}}}}}}}};this.setClase=function(){var clase=Common.Utils.Cookie.ReadCookie("OMNITURE_SEARCH_FLIGHTS_CLASS");if(clase=="C"){this.setEVar(40,"EJEC")}else{this.setEVar(40,"No Business")}};this.setTipoClase=function(value){var clase=value;if(clase=="C"){this.setEVar(41,"EJEC")}else{if(clase=="YC"){this.setEVar(41,"ECON")}else{if(clase=="YS"){this.setEVar(41,"ECON")}else{if(clase=="Y"){this.setEVar(41,"ECON")}else{if(clase=="F"){this.setEVar(41,"PRIM")}}}}}};this.eventReviewHotel=function(source_event,value){var value=";HTL_"+value.id+"_"+value.destinationCode;var eJSON={name:"event9",description:"reviewHotel",source_event:source_event,eVar:"products",value:value};this.fireEvent(eJSON)};this.setProviderAsync=function(value){var omnitureDataCollectorAjax=new Common.OmnitureDataCollector();omnitureDataCollectorAjax.setNamedVar("eVar51",value);omnitureDataCollectorAjax.beforeApply(s);s=omnitureDataCollectorAjax.applyData(s);omnitureDataCollectorAjax.afterApply(s);omnitureDataCollectorAjax.sendData(s)};this.setRankingPaquete=function(source_event){Common.Utils.Cookie.CreateCookie("OMNITURE_RANKING_PAQUETE","");var paqueteId=$(source_event).parents("div.ListItem").attr("id");var paquetesId=[];var paginator=[];$("#listaRowsList div.ListItem:visible").each(function(){paquetesId.push($(this).attr("id"))});$("#paginadoFooter .neutralDown2").each(function(){var value=Number($(this).text());if(typeof(value)=="number"){paginator.push(value)}});if(paginator.length>=1){var pagina=paginator[0];if(pagina>1){pagina=(pagina-1)*5}else{pagina=0}for(x=0;x<paquetesId.length;x++){if(paquetesId[x]==paqueteId){Common.Utils.Cookie.CreateCookie("OMNITURE_RANKING_PAQUETE",x+pagina+1)}}}};this.setCustomLink=function(linkName){this.setLink(true,"o",linkName)};this.setExitLink=function(linkName){this.setLink(true,"e",linkName)};this.setLink=function(delay,linkType,linkName){s.tl(delay,linkType,linkName)};this.setCompleteSearch=function(){this.setEvent(11,-1)};this.quitarAcentos=function(value){var __r={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"E","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ò":"O","Ó":"O","Ô":"O","Ö":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ñ":"N"};return value.replace(/[ÀÁÂÃÄÅÆÈÉÊËÌÍÎÒÓÔÖÙÚÛÜÑ]/gi,function(m){var ret=__r[m.toUpperCase()];if(m===m.toLowerCase()){ret=ret.toLowerCase()}return ret})};var COUNTRY_LIST="AR|BO|BR|CL|CO|CR|EC|SV|ES|GT|HN|MX|NI|PA|PY|PE|PR|DO|UY|US|VE|INC";this.errMessages="";var data=new Array();var dataEvents=new Array();var DEFAULT_REPORT_SUITE="despegardev";var pageData={country:"unmarked-country",flow:"unmarked-flow",section:"unmarked-section",page:"unmarked-page"};this.data=data;this.dataEvents=dataEvents;this.setAutomaticCountry()};registerNameSpace("Common.Utils");Common.Utils.Cookie=function(){};Common.Utils.Cookie.prototype.CreateCookie=function(c,d,e){if(e>0){var b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));var a="; expires="+b.toGMTString()}else{var a=""}document.cookie=c+"="+d+a+"; path=/"};Common.Utils.Cookie.prototype.ReadCookie=function(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null};Common.Utils.Cookie.prototype.EraseCookie=function(a){this.CreateCookie(a,"",-1)};Common.Utils.Cookie=new Common.Utils.Cookie();registerNameSpace("Common");Common.AjaxSetup=function(){$(document).ready(function(){$.ajaxSetup({beforeSend:function(b,a){if(typeof(b.setRequestHeader)){if(typeof(X_UOW)!="undefined"){b.setRequestHeader("X-UOW",X_UOW)}}}})})}();registerNameSpace("Common.Utils");Common.Utils.UriRFC3986=function(){this.encode=function(a){var b=encodeURIComponent(a);b=b.replace(/!/g,"%21");b=b.replace(/'/g,"%27");b=b.replace(/\(/g,"%28");b=b.replace(/\)/g,"%29");b=b.replace(/\*/g,"%2A");b=b.replace(/;/g,"%3B");b=b.replace(/:/g,"%3A");b=b.replace(/@/g,"%40");b=b.replace(/#/g,"%2523");b=b.replace(/%23/g,"%2523");b=b.replace(/\[/g,"%5B");b=b.replace(/\]/g,"%5D");b=b.replace(/\//g,"%2F");b=b.replace(/\$/g,"%24");return b};this.decode=function(a){var b=a.replace(/!/g,"%21");b=b.replace(/%27/g,"'");b=b.replace(/%28/g,"(");b=b.replace(/%29/g,")");b=b.replace(/%2A/g,"*");b=b.replace(/%3B/g,";");b=b.replace(/%3A/g,":");b=b.replace(/%40/g,"@");b=b.replace(/%23/g,"#");b=b.replace(/%2523/g,"#");b=b.replace(/%5B/g,"[");b=b.replace(/%5D/g,"]");b=b.replace(/%2F/g,"/");b=b.replace(/%24/g,"$");b=decodeURIComponent(b);return b}};
