﻿var $tabs, IsDebug = false, fbAppID = "127327887326599", SiteID = 3, HotelResult = "", HotelResultRB = "", HotelLinkAddress = "", strHotelsCom = "", strExpedia = "", strVenere = "", HotelCityURL = "", faceBookLink = ""; if (SiteID == 1) { fbAppID = "174135455950738"; faceBookLink = "http://connect.facebook.net/nb_NO/all.js" } else if (SiteID == 2) { fbAppID = "191846177498076"; faceBookLink = "http://connect.facebook.net/sv_SE/all.js" } else if (SiteID == 3) { fbAppID = "174650319243789"; faceBookLink = "http://connect.facebook.net/da_DK/all.js" }
if (IsDebug) fbAppID = "127327887326599"; if (SiteID == 1) { seletecCurrency = "NOK"; HotelLinkAddress = "http://hotell.reisbillig.no" } else if (SiteID == 2) { seletecCurrency = "SEK"; HotelLinkAddress = "http://hotell.flygagenten.se" } else if (SiteID == 3) { seletecCurrency = "DKK"; HotelLinkAddress = "http://hotell.flyagenten.dk" } var UID = 0, SessionID, loggedInFB = false, email_register, password_login, allFields = $([]).add(email_register).add(password_login); email_register = $("#email_register"); password_login = $("#password_login");
(function(a) { a(".ui-autocomplete-input").live("autocompleteopen", function() { var b = a(this).data("autocomplete"), d = b.menu; b.options.selectFirst && d.activate(a.Event({ type: "mouseenter" }), d.element.children().first()) }) })(jQuery);
function FBLogin(a) { var b; document.getElementById("fb_loggedin").style.display = "inline"; b = "<img src='http://graph.facebook.com/" + a.session.uid + "/picture/' alt='' border='0' />"; $("#fb_loggedin").html(b); $.ajax({ url: "https://graph.facebook.com/" + a.session.uid + "?access_token=" + a.session.access_token, dataType: "jsonp", success: function(d) { d = eval(d); AuthService.LoginFB(SiteID, d.email, d.id, onFBLoginCompleted, onFBLoginFailed, "User Context") } }) }
function onFBLoginCompleted() { loggedInFB = true; loggedIn = Sys.Services.AuthenticationService.get_isLoggedIn(); IsLoggedIn() } function onFBLoginFailed() { loggedInFB = false }
function IsLoggedIn() {
    if ((loggedIn = Sys.Services.AuthenticationService.get_isLoggedIn()) || loggedInFB) { document.getElementById("register-user").style.display = "none"; if (loggedInFB) { document.getElementById("logout-user").style.display = "none"; document.getElementById("fb_login").style.display = "inline" } else { document.getElementById("logout-user").style.display = "inline"; document.getElementById("fb_login").style.display = "none" } AuthService.GetUID(onUIDCompleted, onUIDFailed, "User Context") } else {
        document.getElementById("register-user").style.display =
"inline"; document.getElementById("logout-user").style.display = "none"; document.getElementById("fb_login").style.display = "inline"; AuthService.GetUserSearch(SiteID, UID, SessionID, OnUserSearch_Completed, OnUserSearch_Error)
    }
} function onUIDCompleted(a) { UID = a; SessionID = $get(ClientIDs.txtSessionID).value; AuthService.GetUserSearch(SiteID, UID, SessionID, OnUserSearch_Completed, OnUserSearch_Error) } function onUIDFailed() { UID = 0 }
function OnPasswordResend() { var a = $("#email_register"); AuthService.PasswordResend(SiteID, a.val(), onPasswordResendCompleted, onPasswordResendFailed, "User Context"); return false } function onPasswordResendCompleted(a) { a = eval(a); updateTips(a[0].StatusText) } function onPasswordResendFailed(a) { $("#validateTips").text(a.message) } function OnRegister() { var a = $("#email_register"); AuthService.RegisterUser(SiteID, a.val(), 0, "OSL", onRegisterCompleted, onRegisterFailed, "User Context"); return false }
function onRegisterCompleted(a) { a = eval(a); if (a[0].StatusCode != 0) updateTips(a[0].StatusText); else { updateTips(a[0].StatusText); var b = $("#email_register"); Sys.Services.AuthenticationService.login(b.val(), a[0].pd, true, null, null, onLoginCompleted, onLoginFailed, "User Context") } } function onRegisterFailed() { $("#validateTips").text("Klarte ikke \u00e5 registerer bruker") }
function OnLogin() { var a = $("#email_register"), b = $("#password_login"); Sys.Services.AuthenticationService.login(a.val(), b.val(), true, null, null, onLoginCompleted, onLoginFailed, "User Context"); return false } function onLoginFailed() { $("#validateTips").text("Feil brukernavn og/eller passord") }
function onLoginCompleted(a) { eval(a); if (loggedIn = Sys.Services.AuthenticationService.get_isLoggedIn()) { updateTips("Innlogget"); $("#dialog-formCreateNewUser").dialog("close"); IsLoggedIn(); SessionID = $get(ClientIDs.txtSessionID).value } else updateTips("Feil brukernavn og/eller passord") } function OnUserSearch_Error() { } function OnUserSearch_Completed(a) { var b = []; $(a).find("string").each(function() { b[b.length] = { value: $(this).text()} }); RenderUserSearch(b) }
function RenderUserSearch(a) {
    var b = [], d = a.length, e = ""; e += '<table id="myTable" cellspacing="0px" cellpadding="2px" border="0px">'; e += "<tbody>"; for (var f = 0; f < d; f++) {
        b = a[f].value.split("=>"); e += "<tr><td>"; e += $.browser.msie ? "<A HREF=javascript:DoMySearchNew('" + escape(b[1]) + "','" + escape(b[2]) + "','" + escape(b[11]) + "','" + escape(b[14]) + "','" + escape(b[3]) + "','" + escape(b[4]) + "','" + escape(b[5]) + "','" + escape(b[6]) + "','" + escape(b[7]) + "','" + escape(b[8]) + "','1','1','1','0')>" + b[0] + "</A>" : "<A HREF=javascript:DoMySearchNew('" +
encodeURIComponent(b[1]) + "','" + encodeURIComponent(b[2]) + "','" + encodeURIComponent(b[11]) + "','" + encodeURIComponent(b[14]) + "','" + encodeURIComponent(b[3]) + "','" + encodeURIComponent(b[4]) + "','" + encodeURIComponent(b[5]) + "','" + encodeURIComponent(b[6]) + "','" + encodeURIComponent(b[7]) + "','" + encodeURIComponent(b[8]) + "','1','1','1','0')>" + b[0] + "</A>"; e += "</td></tr>"
    } e += "</tbody>"; e += "</table>"; if (d == 0) { $("#accUserSearch").accordion("destroy"); document.getElementById("accUserSearch").style.display = "none" } else {
        document.getElementById("accUserSearch").style.display =
"inline"; $("#accUserSearch").accordion("destroy"); $("#divLoggedInUserSearchResultTable").html(e); $("#accUserSearch").accordion({ active: 0 })
    }
} function SignOut() { window.location.href = "SignOut.aspx"; return false } function onLogoutCompleted() { UID = 0; loggedIn = Sys.Services.AuthenticationService.get_isLoggedIn(); IsLoggedIn(); return false } function updateTips(a) { var b = $("#validateTips"); b.text(a).addClass("ui-state-highlight"); setTimeout(function() { b.removeClass("ui-state-highlight", 1500) }, 500) }
function checkLength(a, b, d, e) { if (a.val().length > e || a.val().length < d) { a.addClass("ui-state-error"); updateTips("Lengden av " + b + " m\u00e5 v\u00e6re mellom " + d + " og " + e + "."); return false } else return true } function checkRegexp(a, b, d) { if (b.test(a.val())) return true; else { a.addClass("ui-state-error"); updateTips(d); return false } }
function mycarousel_initCallback(a) { a.buttonNext.bind("click", function() { a.startAuto(0) }); a.buttonPrev.bind("click", function() { a.startAuto(0) }); a.clip.hover(function() { a.stopAuto() }, function() { a.startAuto() }) }
$(document).ready(function() {
    $("#dialog:ui-dialog").dialog("destroy"); $tabs = $("#tabs").tabs(); SessionID = $get(ClientIDs.txtSessionID).value; window.fbAsyncInit = function() {
        FB.init({ appId: fbAppID, status: true, cookie: true, xfbml: true }); FB.Event.subscribe("auth.sessionChange", function(a) { if (a.session) { $("#dialog-formCreateNewUser").dialog("close"); loggedInFB = true; FBLogin(a) } else { loggedInFB = false; SignOut() } }); SessionID = $get(ClientIDs.txtSessionID).value; FB.getLoginStatus(function(a) {
            if (a.session) {
                loggedInFB =
true; FBLogin(a)
            } else { document.getElementById("fb_loggedin").style.display = "inline"; loggedInFB = false; IsLoggedIn() }
        })
    }; (function() { var a = document.createElement("script"); a.async = true; a.src = faceBookLink; document.getElementById("fb-root").appendChild(a) })(); $("#dialog-formCreateNewUser").dialog({ autoOpen: false, height: 380, width: 350, modal: true, close: function() { allFields.val("").removeClass("ui-state-error") } }); $("#create-user").button().click(function() {
        $("#email_register").val(""); $("#password_login").val("");
        $("#dialog-formCreateNewUser").dialog("open"); $("#validateTips").text(""); $("#validateTips").removeClass(); return false
    }); $("#register-user").click(function() { $("#email_register").val(""); $("#password_login").val(""); $("#dialog-formCreateNewUser").dialog("open"); $("#validateTips").text(""); $("#validateTips").removeClass(); return false }); $("#btnRegisterUser").button(); $("#btnLogin").button(); $("#btnGetPassword").button(); $("#btnRegisterUser").click(function() {
        var a = true; allFields.removeClass("ui-state-error");
        $("#validateTips").text(""); $("#validateTips").removeClass(); email_register = $("#email_register"); (a = (a = a && checkLength(email_register, "email", 6, 80)) && checkRegexp(email_register, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
"eks. ola@norge.no")) && OnRegister()
    }); $("#btnLogin").click(function() {
        var a = true; allFields.removeClass("ui-state-error"); $("#validateTips").text(""); $("#validateTips").removeClass(); email_register = $("#email_register"); password_login = $("#password_login"); (a = (a = a && checkLength(email_register, "email", 6, 80)) && checkRegexp(email_register, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
"eks. ola@norge.no")) && OnLogin()
    }); $("#btnGetPassword").click(function() {
        var a = true; allFields.removeClass("ui-state-error"); $("#validateTips").text(""); $("#validateTips").removeClass(); email_register = $("#email_register"); password_login = $("#password_login"); (a = (a = a && checkLength(email_register, "email", 6, 80)) && checkRegexp(email_register, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
"eks. ola@norge.no")) && OnPasswordResend()
    })
}); function onIsLoggedInCompleted(a) { alert(a) } function onIsLoggedInFailed() { }
function userLoginView() {
    $("#validateTips").text(""); $("#validateTips").removeClass(); document.getElementById("userPasswordResendLink").style.display = "inline"; document.getElementById("divUserLogin").style.display = "inline"; document.getElementById("divUserRegister").style.display = "none"; document.getElementById("btnLogin").style.display = "inline"; document.getElementById("btnRegisterUser").style.display = "none"; document.getElementById("btnGetPassword").style.display = "none"; document.getElementById("userPasswordLabel").style.display =
"inline"; document.getElementById("password_login").style.display = "inline"; document.getElementById("linkLogin").style.display = "none"; document.getElementById("spanLogin").style.display = "none"
}
function userRegisterView() {
    $("#validateTips").text(""); $("#validateTips").removeClass(); document.getElementById("userPasswordResendLink").style.display = "none"; document.getElementById("divUserLogin").style.display = "none"; document.getElementById("divUserRegister").style.display = "inline"; document.getElementById("btnLogin").style.display = "none"; document.getElementById("btnRegisterUser").style.display = "inline"; document.getElementById("btnGetPassword").style.display = "none"; document.getElementById("userPasswordLabel").style.display =
"none"; document.getElementById("password_login").style.display = "none"; document.getElementById("linkLogin").style.display = "none"; document.getElementById("spanLogin").style.display = "none"
}
function userResendPasswordView() {
    $("#validateTips").text(""); $("#validateTips").removeClass(); document.getElementById("userPasswordResendLink").style.display = "none"; document.getElementById("divUserLogin").style.display = "inline"; document.getElementById("divUserRegister").style.display = "none"; document.getElementById("btnLogin").style.display = "none"; document.getElementById("btnRegisterUser").style.display = "none"; document.getElementById("btnRegisterUser").style.display = "none"; document.getElementById("btnGetPassword").style.display =
"inline"; document.getElementById("userPasswordLabel").style.display = "none"; document.getElementById("password_login").style.display = "none"; document.getElementById("linkLogin").style.display = "inline"; document.getElementById("spanLogin").style.display = "inline"
} if (typeof Language != "object") Language = [];
if (SiteID == 1) {
    Language.UserSelected = "Brukervalgt"; Language.SortText = "Sorter etter"; Language.PleaseWait = "Henter priser, vennligst vent"; Language.FromText = "Fra"; Language.FilterNoResult_1 = "Ingen reiser passer til dine"; Language.FilterNoResult_1_1 = "anvendte filtre"; Language.FilterNoResult_2 = "Se resultater"; Language.FilterNoResult_3 = 'Klikk p\u00e5 "x" for \u00e5 fjerne et eller flere filtre'; Language.FilterNoResult_4 = "Tilpass et eller flere filter til venstre"; Language.FilterNoResult_5 = "Vis alle resultater";
    Language.TravelTime = "Reisetid"; Language.NoOfDays = "Antall dager"; Language.ShowDetails = "Vis detaljer"; Language.AllText = "Alle"; Language.Continue = "G\u00e5 videre"; Language.LowPriceGraph = "Lavprisgraf"; Language.LowPriceList = "Lavprisliste"; Language.FreshPrice = "Hent fersk pris"; Language.Depart = "Utreise"; Language.Return = "Hjemreise"; Language.LowPriceListDesc = "Velg utreise og hjemreise dato her, s\u00e5 oppdateres listen automatisk med lavpris destinasjoner"; Language.SelectedDates = "Dine valgte datoer"; Language.WeekBefore =
"Uke f\u00f8r"; Language.WeekAfter = "Uke etter"; Language.FlightSearch_OpenHotel = "Tilbake til s\u00f8keresultat og \u00e5pne nytt vindu med hoteller i "; Language.FlightSearch_OpenHotelRB = "Finn hotell i "; Language.FlightSearch_Return = "G\u00e5 tilbake til s\u00f8keresultatet"; Language.HotelRB_Teaser_UnknownCity = "Spar tid og penger ved \u00e5 s\u00f8ke priser p\u00e5 190 000 hoteller fra over 30 leverand\u00f8rer."; Language.HotelRB_Teaser_KnownCity = "Sammenlign priser p\u00e5 overnatting fra mer enn 30 leverand\u00f8rer"
}
if (SiteID == 2) {
    Language.UserSelected = "Anv\u00e4ndar valt"; Language.SortText = "Sortera efter"; Language.PleaseWait = "H\u00e4mtar priser, v\u00e4nligen v\u00e4nta"; Language.FromText = "Fr\u00e5n"; Language.FilterNoResult_1 = "Inga flyg matchar dina"; Language.FilterNoResult_1_1 = "anv\u00e4nda filter"; Language.FilterNoResult_2 = "Se resultat"; Language.FilterNoResult_3 = 'Klicka "x" f\u00f6r att ta bort ett eller flera filter'; Language.FilterNoResult_4 = "Anpassa ett eller flera filter till v\u00e4nster"; Language.FilterNoResult_5 =
"Se alla resultat"; Language.TravelTime = "Restid"; Language.NoOfDays = "Antal dagar"; Language.ShowDetails = "Visa detaljer"; Language.AllText = "Alla"; Language.Continue = "Forts\u00e4tt"; Language.LowPriceGraph = "L\u00e5gprisgraf"; Language.LowPriceList = "L\u00e5gpris\u00f6versikt"; Language.FreshPrice = "F\u00e5 f\u00e4rsk pris"; Language.Depart = "Avg\u00e5ng"; Language.Return = "Hemresa"; Language.LowPriceListDesc = "V\u00e4lj avg\u00e5ng och datum f\u00f6r \u00e5terresa h\u00e4r, s\u00e5 uppdateras listan automatiskt med l\u00e5gpris destinationer";
    Language.SelectedDates = "Dina valda datum"; Language.WeekBefore = "Vecka f\u00f6re"; Language.WeekAfter = "Vecka efter"; Language.FlightSearch_OpenHotel = "Tillbaka till s\u00f6kresultat och \u00f6ppna en ny sida med hotell i  "; Language.FlightSearch_OpenHotelRB = "Hitta hotell i  "; Language.FlightSearch_Return = "\u00c5terg\u00e5 till s\u00f6kresultat"; Language.HotelRB_Teaser_UnknownCity = "Spara tid och pengar genom att s\u00f6ka priser p\u00e5 190 000 hotell fr\u00e5n \u00f6ver 30 leverant\u00f6rer."; Language.HotelRB_Teaser_KnownCity =
"J\u00e4mf\u00f6r priser p\u00e5 boende fr\u00e5n 30 leverant\u00f6rer"
}
if (SiteID == 3) {
    Language.UserSelected = "Bruger Udvalgte"; Language.SortText = "Sorter efter"; Language.PleaseWait = "Henter priser, vent venligst"; Language.FromText = "Fra"; Language.FilterNoResult_1 = "Ingen ture, der passer til din"; Language.FilterNoResult_1_1 = "brugte filtre"; Language.FilterNoResult_2 = "Se resultater"; Language.FilterNoResult_3 = 'Klik p\u00e5 "x"for at fjerne et eller flere filtre'; Language.FilterNoResult_4 = "Tilpas en eller flere filter til venstre"; Language.FilterNoResult_5 = "Vis alle resultater";
    Language.TravelTime = "Rejstid"; Language.NoOfDays = "Antal dage"; Language.ShowDetails = "Se detaljer"; Language.AllText = "Alle"; Language.Continue = "Forts\u00e6t"; Language.LowPriceGraph = "Lavprisgraf"; Language.LowPriceList = "Lavprisliste"; Language.FreshPrice = "F\u00e5 ny pris"; Language.Depart = "Afgang"; Language.Return = "Tilbagevendende"; Language.LowPriceListDesc = "V\u00e6lg afgang og tilbagetr\u00e6kningsdatoerne her, s\u00e5 listen opdateres automatisk med lave omkostninger destinationer"; Language.SelectedDates =
"Dit valgte datoer"; Language.WeekBefore = "Uge f\u00f8r"; Language.WeekAfter = "Uge efter"; Language.FlightSearch_OpenHotel = "Tilbage til s\u00f8geresultater og \u00e5bne et nyt vindue med hoteller i "; Language.FlightSearch_OpenHotelRB = "Find hoteller i "; Language.FlightSearch_Return = "Retur til s\u00f8geresultater"; Language.HotelRB_Teaser_UnknownCity = "Spar tid og penge ved at s\u00f8ge sine priser p\u00e5 190 000 hoteller fra over 30 leverand\u00f8rer."; Language.HotelRB_Teaser_KnownCity = "Sammenlign priser p\u00e5 hoteller fra 30 leverand\u00f8rer"
}
var init_filterSameAirport = 1, init_filterMaxStops = 10, init_filterMinOutDepTime = 0, init_filterMaxOutDepTime = 1440, init_filterMinRetDepTime = 0, init_filterMaxRetDepTime = 1440;
jQuery(function(a) {
    a.datepicker.regional.no = { closeText: "Lukk", prevText: "&laquo;Forrige", nextText: "Neste&raquo;", currentText: "I dag", monthNames: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], dayNamesShort: ["S\u00f8n", "Man", "Tir", "Ons", "Tor", "Fre", "L\u00f8r"], dayNames: ["S\u00f8ndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "L\u00f8rdag"], dayNamesMin: ["S\u00f8\u00b8",
"Ma", "Ti", "On", "To", "Fr", "L\u00f8\u00b8"], weekHeader: "Uke", dateFormat: "yy-mm-dd", firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: ""
    }; a.datepicker.setDefaults(a.datepicker.regional.no)
});
jQuery(function(a) {
    a.datepicker.regional.sv = { closeText: "St\u00e4ng", prevText: "&laquo;F\u00f6rra", nextText: "N\u00e4sta&raquo;", currentText: "Idag", monthNames: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], dayNamesShort: ["S\u00f6n", "M\u00e5n", "Tis", "Ons", "Tor", "Fre", "L\u00f6r"], dayNames: ["S\u00f6ndag", "M\u00e5ndag", "Tisdag", "Onsdag", "Torsdag", "Fredag",
"L\u00f6rdag"], dayNamesMin: ["S\u00f6", "M\u00e5", "Ti", "On", "To", "Fr", "L\u00f6"], weekHeader: "Ve", dateFormat: "yy-mm-dd", firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ""
    }; a.datepicker.setDefaults(a.datepicker.regional.sv)
});
jQuery(function(a) {
    a.datepicker.regional.da = { closeText: "Luk", prevText: "&#x3c;Forrige", nextText: "N\u00e6ste&#x3e;", currentText: "Idag", monthNames: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], dayNames: ["S\u00f8ndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "L\u00f8rdag"], dayNamesShort: ["S\u00f8n", "Man", "Tir", "Ons", "Tor", "Fre", "L\u00f8r"], dayNamesMin: ["S\u00f8",
"Ma", "Ti", "On", "To", "Fr", "L\u00f8"], weekHeader: "Uge", dateFormat: "dd-mm-yy", firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ""
    }; a.datepicker.setDefaults(a.datepicker.regional.da)
});
(function(a) { a.fn.reportprogress = function(b, d) { var e = 100; if (d) e = d; return this.each(function() { var f = a(this), g = f.find(".progress"); if (g.length != 1) { g = a("<div class='progress'></div>"); f.append("<div class='text'>&nbsp;</div>"); a("<span class='text'>&nbsp;</span>").css("width", f.width()).appendTo(g); f.append(g) } var h = Math.round(b / e * 100); g.css("width", h + "%"); f.find(".text").html(h + " %") }) } })(jQuery); var pct = 0, handle = 0, currentLanguage, currentCulture; currentLanguage = "nb"; currentCulture = "nb-NO";
if (typeof SortText != "object") SortText = []; SortText.SortBy_price = "Pris"; SortText.SortBy_duration = Language.TravelTime; $.extend(Date.prototype, { toUTCDate: function() { var a = new Date; a.setUTCFullYear(this.getFullYear(), this.getMonth(), this.getDate()); a.setUTCHours(0, 0, 0, 0); return a } }); function updateProgress() { $("#progressbar").reportprogress(++pct); if (pct == 100) { clearInterval(handle); $("#run").val("start"); pct = 0; RBFlights.searchdone || stopFlightSearch() } } function applyRoundCorners() { }
function applyButtons() { $(".flightsredirect_main").button({ text: true, icons: { secondary: "ui-icon ui-icon-arrowthick-1-e"} }); $(".sortresult").button() } function filterClearAll() { clearSameAirportFilter(); RBFlights.setMaxStops(10); RBFlights.filterAll("Airline"); RBFlights.filterAll("Orig"); clearTimeFilter() } function clearTimeFilter() { document.getElementById("deptime").selectedIndex = 0; document.getElementById("rettime").selectedIndex = 0; $("#deptime").change(); $("#rettime").change() }
$(document).ready(function() { applyRoundCorners(); $(".searchButton").button(); $(function() { $(".clearFilter").button({ text: true, icons: { secondary: "ui-icon ui-icon-squaresmall-close"} }) }) }); function setMaxStops(a) { $("#noStopSlider").slider("value", a) } function DdlContainsValue(a, b) { var d, e; e = false; d = a[0].length - 1; for (var f = 0; f < d; f++) if (a[0][f].value == b) e = true; return e }
function RenderDepTimeLabels(a, b, d) { var e = Math.floor(a.slider("values", 0) / 60), f = a.slider("values", 0) - e * 60, g = Math.floor(a.slider("values", 1) / 60); a = a.slider("values", 1) - g * 60; if (e <= 9) e = "0" + e; if (f <= 9) f = "0" + f; if (g <= 9) g = "0" + g; if (a <= 9) a = "0" + a; b.html(e + ":" + f); d.html(g + ":" + a) } $.fn.__bindo = $.fn.bind; $.fn.bind = function(a, b, d) { var e, f = false; if (typeof d != "undefined") e = d; else { f = true; e = d = b } if (typeof e == "object") d = function(g, h) { g.args = e[2]; return e[0][e[1]](g, h) }; return f ? this.__bindo(a, d) : this.__bindo(a, b, d) };
function formatPrice(a) { return a }
jQuery.create = function() {
    if (arguments.length == 0) return []; var a = arguments[0] || {}, b = null, d = null, e = null; if (a == null) a = ""; if (a.constructor == String) if (arguments.length > 1) {
        d = arguments[1]; if (d.constructor == String) { b = document.createTextNode(a); d = []; d.push(b); e = jQuery.create.apply(null, Array.prototype.slice.call(arguments, 1)); return d = d.concat(e) } else {
            b = document.createElement(a); d = arguments[1]; for (var f in d) jQuery(b).attr(f, d[f]); a = arguments[2]; a = jQuery.create.apply(null, a); jQuery(b).append(a); if (arguments.length >
3) { e = jQuery.create.apply(null, Array.prototype.slice.call(arguments, 3)); return [b].concat(e) } return b
        }
    } else return document.createTextNode(a); else { d = []; d.push(a); e = jQuery.create.apply(null, Array.prototype.slice.call(arguments, 1)); return d = d.concat(e) }
}; Function.prototype.bind = function() { if (arguments.length < 2 && typeof arguments[0] == "undefined") return this; var a = this, b = Array.prototype.slice.call(arguments), d = b.shift(); return function() { return a.apply(d, b.concat(Array.prototype.slice.call(arguments))) } };
var city_Orig = null, city_Dest = null, geo_Orig = null, geo_Dest = null; jQuery(document).ready(function() { loaded() }); function hidePanel(a) { if (a != null) a.style.display = "none" } function showPanel(a) { if (a != null) a.style.display = "" } function setVisible(a, b) { b ? showPanel(a) : hidePanel(a) } function setInnerHtml(a, b) { if (a != null) a.innerHTML = b } function compare(a, b) { if (typeof a == "string") a = a.toLowerCase(); if (typeof b == "string") b = b.toLowerCase(); return a == b ? 0 : a > b ? 1 : -1 }
if (!String.format) String.format = function() { if (arguments.length == 0) return null; for (var a = arguments[0], b = 1; b < arguments.length; b++) a = a.replace(RegExp("\\{" + (b - 1) + "\\}", "gm"), arguments[b]); return a }; if (!String.compare) String.compare = compare; if (!Array.prototype.indexOf) Array.prototype.indexOf = function(a) { for (var b = 0, d = this.length; b < d; b++) if (this[b] == a) return b; return -1 }; if (!Array.prototype.contains) Array.prototype.contains = function(a) { return this.indexOf(a) >= 0 };
if (!Array.prototype.condAdd) Array.prototype.condAdd = function(a) { this.indexOf(a) < 0 && this.push(a) }; function dictionaryComparePairKeys(a, b) { return compare(a.key, b.key) } function dictionaryComparePairValues(a, b) { return compare(a.value, b.value) } function dictionaryComparePairValuesPrice(a, b) { return compare(a.value.bestPrice, b.value.bestPrice) } function dictionaryLookup(a) { return this[a] } function dictionaryAdd(a, b) { this[a] = b }
function dictionaryAddEx() { for (c = 0; c < dictionaryAddEx.arguments.length; c += 2) this[dictionaryAddEx.arguments[c]] = dictionaryAddEx.arguments[c + 1] } function dictionaryDelete(a) { this[a] = null } function dictionaryDeleteEx() { for (c = 0; c < dictionaryDeleteEx.arguments.length; c++) this[dictionaryDeleteEx.arguments[c]] = null } function dictionaryKeys() { var a = [], b; for (b in this) typeof this[b] != "function" && a.push(b); return a }
function dictionaryValues() { var a = [], b; for (b in this) { var d = this[b]; typeof d != "function" && a.push(d) } return a } function dictionaryPairs() { var a = [], b; for (b in this) { var d = this[b]; if (typeof d != "function") { var e = {}; e.key = b; e.value = d; a.push(e) } } return a } function Dictionary() { this.AddEx = this.Add = dictionaryAdd; this.Delete = dictionaryDelete; this.DeleteEx = dictionaryDeleteEx; this.Lookup = dictionaryLookup; this.Keys = dictionaryKeys; this.Values = dictionaryValues; this.Pairs = dictionaryPairs }
var FlightProductInfo = function(a, b, d, e, f, g, h, i, j, n) { this.id = a; this.supplierId = b; this.textType = d; this.priority = e; this.className = f; this.style = g; this.icon = h; this.text = i; this.displayUrl = j; this.redirUrl = n; if (this.textType == 0) this.textType = 2 }; FlightProductInfo.prototype = {}; function compareFlightProducts(a, b) { return a.priority - b.priority } function compareFlightProductsDesc(a, b) { return b.priority - a.priority }
var FlightSupplierInfo = function(a, b, d, e) { this.supplierId = a; this.priority = b; this.payoff = d; this.noLogo = e; this.products = []; this._sorted = true };
FlightSupplierInfo.prototype = { addProduct: function(a) { this.products.push(a); this._sorted = false }, getProducts: function(a) { if (typeof a == "undefined" || a == null) return this.getAllProducts(); this._sorted || this.sortProducts(); for (var b = [], d = 0; d < this.products.length; d++) { var e = this.products[d]; e.textType == a && b.push(e) } return b }, getAllProducts: function() { this._sorted || this.sortProducts(); return this.products }, productCount: function(a, b) { var d = this.getProducts(b); if (d != null) return d.length; return 0 }, sortProducts: function() {
    this.products.sort(compareFlightProductsDesc);
    this._sorted = true
}
}; var FlightSuppliers = function() { this.reset() }; FlightSuppliers.prototype = { reset: function() { this.suppliers = {} }, newSupplier: function(a) { this.suppliers[a.supplierId] = a }, getSupplier: function(a) { return this.suppliers[a] }, productCount: function(a) { return this.getSupplier(a).productCount } }; var GFlightSuppliers = new FlightSuppliers; function resetFlightProducts() { GFlightSuppliers.reset() }
function addFlightText(a, b, d, e, f, g, h, i, j, n) { a = new FlightProductInfo(a, b, d, e, f, g, h, i, j, n); if (d != 1) { d = GFlightSuppliers.getSupplier(b); if (d == null) { d = new FlightSupplierInfo(b, 0, null, false); GFlightSuppliers.newSupplier(d) } d.addProduct(a) } }
var RBFlightsClass = Class.extend({ init: function() {
    this.supplierLogos = true; this.enablePin = this.airlineLogos = false; this.enhanceSegments = true; this.monthNames = this.dayNames = null; this.resultsPerPage = 25; this.curPage = this.pages = 0; this.curView = 2; this.searchdone = this.searching = this.supplierView = false; this.flights = []; this.grouped = this.flightgroups = this.currentflights = null; this.groupstate = new Dictionary; this.topAdSuppliers = this.cheapestFlight = this.pinnedflights = null; this.combiOutSegs = []; this.combiRetSegs = [];
    this.combiFlight = null; this.updateFilters = false; this.flgStatusLevel = 0; this.supplierList = new Dictionary; this.suppliers = new Dictionary; this.airlines = new Dictionary; this.tickets = new Dictionary; this.origs = new Dictionary; this.dests = new Dictionary; this.updatingSuppliers = new Hashtable; this.routeSuppliers = []; this.routeSuppliersIndex = new Hashtable; this.filtersAnimating = false; this.searchdest = this.searchorig = null; this.searchoneway = false; this.maindest = this.mainorig = this.searchretdate = this.searchdepdate = null; if (SiteID ==
1) this.curCurrency = "NOK"; else if (SiteID == 2) this.curCurrency = "SEK"; else if (SiteID == 3) this.curCurrency = "DKK"; this.sortField = this.groupField = "price"; this.sortDirection = 1; this.sortBys = ["price", "duration"]; this.totalCount = this.matchCount = this.sumPrice = 0; this.filterSameAirport = 1; this.filterMinStops = 0; this.filterMaxStops = 10; this.filterMinOutDepTime = 0; this.filterMaxOutDepTime = 1440; this.filterMinRetDepTime = 0; this.filterMaxRetDepTime = 1440; this.filterPriceRangeCount = 4; this.filterStops = this.filterRetTime = this.filterOutTime =
this.filterPriceRange = 0; this.filterSupplier = []; this.filterAirline = []; this.filterTicket = []; this.filterOrig = []; this.filterDest = []; this.filterPriceRanges = []; this.filterPriceRangesText = []; this.logoPath = this.imagePath = this.themePath = this.appPath = ""; this.setAppPath("http://www.reisbilig.no")
}, domLoaded: function() { }, setAppPath: function(a) { this.appPath = a; this.logoPath = "images/suppliers/" }, pad: function(a, b, d) { for (; a.length < d; ) a = b + a; return a }, capText: function(a, b, d) {
    if (!a) return ""; if (typeof d == "undefined") d =
b; if (a.length > b) a = a.substr(0, d) + "..."; return a
}, FilterOnly: function(a, b) { this.filterOnly(a, b) }, FilterAll: function(a) { this.filterAll(a) }, doSelectView: function(a) { a = parseInt(a); this.selectView.bind(this).defer(a) }, GroupBySortBy: function(a, b) { this.setGroupBySortBy(a, b, this.curView) }, sortBy: function(a) { a = a.data.sortname; this.sortDirection = a == this.sortField ? -this.sortDirection : a == "rating" ? -1 : 1; this.sortField = a; this.curPage = 0; this.updateSortBy(); this.processFlightsWait() }, GroupBy: function(a) {
    if (a != this.groupField) {
        this.groupField =
a; this.curPage = 0; this.processFlightsWait()
    }
}, setDirectOnly: function(a) { a ? this.setMaxStops(0) : this.setMaxStops(10) }, NextPage: function() { this.setPage(this.curPage + 1) }, PrevPage: function() { this.setPage(this.curPage - 1) }, FlightBatchCompleted: function() { this.flightBatchCompleted() }, ResetFlights: function() { this.initFlights() }, initFlights: function() {
    this.flights = []; this.grouped = this.flightgroups = this.currentflights = null; this.groupstate = new Dictionary; this.cheapestFlight = this.topAdSuppliers = this.pinnedflights =
null; this.searchdone = false; this.supplierList = new Dictionary; this.suppliers = new Dictionary; this.airlines = new Dictionary; this.tickets = new Dictionary; this.origs = new Dictionary; this.dests = new Dictionary; this.updatingSuppliers = new Hashtable; this.routeSuppliers = []; this.routeSuppliersIndex = new Hashtable; this.combiOutSegs = []; this.combiRetSegs = []; this.combiFlight = null; this.filterSupplier = []; this.filterAirline = []; this.filterTicket = []; this.filterOrig = []; this.filterDest = []; this.filterPriceRange = this.curPage =
this.sumPrice = 0; this.setMaxStops(10); this.groupField = "supplier"; this.sortField = "price"; this.sortDirection = 1; this.searching = false; this.minStops = 999999; this.maxStops = 0; this.filterSameAirport = 1; this.filterMinStops = 0; this.filterMaxStops = 10; this.filterMinOutDepTime = 0; this.filterMaxOutDepTime = 1440; this.filterMinRetDepTime = 0; this.filterMaxRetDepTime = 1440; this.filterPriceRangeCount = 4; this.filterRetTime = this.filterOutTime = this.filterPriceRange = 0; this.suppressEventTracking = true; var a = $("#DropDownView"); if (a) a.selectedIndex =
0; if (a = $("#checkboxDirectOnly")) a.checked = false; this.firstFilterUpdate = true; this.processFlights(); this.updateTripCount(); this.updateTop(false); this.showFilters(); this.updateSortBy(); this.searchStart(); this.departHourSlider && this.departHourSlider.setValues(this.filterMinOutDepTime, this.filterMaxOutDepTime); this.returnHourSlider && this.returnHourSlider.setValues(this.filterMinRetDepTime, this.filterMaxRetDepTime); this.setupHourSliders()
}, lateInitFlights: function() { }, searchStart: function() {
    this.searching =
true; var a = $("#flightstatus"); a && $(a).removeClass("done"); $("#results").hide(); $("#noresults").hide(); pct = 0; handle = setInterval("updateProgress()", 800); $("#progressbar").show(); if (this.carousel) { $(this.carousel.element).html(""); this.carousel.suppliers = []; this.carousel.init() } $("#progresscompleted").hide(); $(".stopsearch").show()
}, updateTripCount: function() { var a = this.flights.length; $(".trip_count").each(function(b) { $(b).html(a) }) }, renderSupplierPrice: function() {
    var a = this.supplierList.Pairs(); a.sort(dictionaryComparePairValuesPrice);
    for (var b = "", d = a.length, e = 0; e < d; e++) {
        var f = a[e]; if (f.value.bestPrice != 0) {
            b = IsDebug == true ? b + "<div class='FlightPriceElement' id='FlightPrice" + e + "'><a rel='nofollow' href='/RBwww/xt_OnlineSearchRedirect.aspx?ID=" + f.value.url + "' target='_blank'>" + f.value.bestPrice + " " + this.curCurrency : b + "<div class='FlightPriceElement' id='FlightPrice" + e + "'><a rel='nofollow' href='/xt_OnlineSearchRedirect.aspx?ID=" + f.value.url + "' target='_blank'>" + f.value.bestPrice + " " + this.curCurrency; b = b + "<img src='images/suppliers/" +
f.key + ".gif' alt='" + f.key + "' border='0' /></a></div>"
        }
    } a = ""; a = "<table><tr><td style='width:40px'><div class='HotelPriceElementImage'><img src='images/meny_fly.gif' alt='Flybilletter' /></div></td>"; a = a + "<td>" + b + "</td></tr></table>"; $("#divSupplierResult").html(a); $(".FlightPriceElement").addClass("tdprice"); $(".FlightPriceElement").hover(function() { $(this).removeClass("tdprice"); $(this).addClass("ui-state-hover") }, function() { $(this).removeClass("ui-state-hover"); $(this).addClass("tdprice") })
}, appendSupplier: function(a,
b, d, e) { if (d != 0) { a = $("#ulMessageContent"); var f = "", g = "liInner" + Math.ceil(1E4 * Math.random()); f += '<li><div id="' + g + '" class="liInner" style=" display: none;"><span style=" color:Gray; "><b>' + b + "</b>"; f += " " + d + " priser, " + Language.FromText + " <b>" + e + "</b> " + this.curCurrency + "</span></div></li>"; $(a).append(f); $("#" + g).fadeIn(700); this.renderSupplierPrice() } }, searchDone: function() {
    if (!this.searchdone) {
        this.searchdone = true; this.searching = false; var a = $("#flightstatus"); a && $(a).addClass("done"); this.updateTripCount();
        this.flights.length != 0 && this.updateTop(true); $("#results").show(); $("#noresults").hide(); pct = 100; clearInterval(handle); $("#progressbar").reportprogress(pct); $("#progressbar").delay(2E3).hide("slow"); $(".stopsearch").hide(); $("#progresscompleted").delay(3E3).show("slow")
    }
}, searchCompleted: function() {
    searchdone = true; this.searchDone(); SiteID == 1 && IsDebug == false && refreshAd(); var a = this.updatingSuppliers; if (a && a.keys.length > 0) {
        for (var b = "Fant ingen priser", d = a.keys.length, e = 0; e < d; e++) {
            var f = this.getSupplier(a.keys[e]);
            b += f.name + "\n"
        } alert(b)
    } $("#results").show(); this.renderSupplierPrice(); $("#noresults").hide(); AuthService.GetUserSearch(SiteID, UID, SessionID, OnUserSearch_Completed, OnUserSearch_Error)
}, removeSupplier: function(a) { for (var b = [], d = this.flights.length, e = 0; e < d; e++) this.flights[e].supplier.id != a && b.push(this.flights[e]); this.flights = b }, addFlight: function(a, b, d, e, f, g, h, i, j, n, m, l, p, o, k) {
    if (!isNaN(i)) if (!(i < 1)) {
        var q = this.updatingSuppliers; if (q && typeof q.get(b) == "boolean") { this.removeSupplier(b); q.unset(b) } a =
{ key: a, oneway: h, outsegs: o, retsegs: k, supplier: this.getSupplier(b), orig: d, dest: e, depdate: f, retdate: g, price: i, quotehours: j, quotedate: n, quotetime: m, factor: l, priceurl: p, details: false }; return this.flights[this.flights.length] = a
    }
}, addCombiSegments: function(a, b) { this.combiOutSegs = this.combiOutSegs.concat(a); this.combiRetSegs = this.combiRetSegs.concat(b); this.combiOutSegs.sort(this.compareSegArraysByPrice.bind(this)); this.combiRetSegs.sort(this.compareSegArraysByPrice.bind(this)); this.setCombiFlight() }, newSupplier: function(a,
b, d, e, f, g) { var h = this.supplierList[a]; if (h == null) { h = { id: a, name: b, url: d, home: "", imgurl: "", iata: "", type: "", rating: e, ratingCount: e, segmentCount: f, bestPrice: g }; this.appendSupplier(a, b, f, g); this.supplierList[a] = h; this.addLookup(this.suppliers, a, b) } return h }, getSupplier: function(a) { return typeof a == "object" ? a : this.supplierList[a] }, getSupplierImg: function(a) { a = this.getSupplier(a); var b = ""; if (a.imgurl != null && a.imgurl != "") b = '<img width="1" height="1" src="' + a.imgurl + '" />'; return b }, copyFlight: function(a) {
    return { index: a.index,
        key: a.key, oneway: a.oneway, outsegs: a.outsegs, retsegs: a.retsegs, supplier: a.supplier, orig: a.orig, dest: a.dest, depdate: a.depdate, retdate: a.retdate, price: a.price, quotehours: a.quotehours, quotedate: a.quotedate, quotetime: a.quotetime, factor: a.factor, details: false
    }
}, createSegArray: function(a) { return [a] }, createSeg: function(a, b, d, e, f, g, h, i, j, n, m, l, p, o, k, q, r, s, t, u) {
    if (f == null || f == "") f = "UNK"; e = { outbound: a, airlinecode: b, airline: d, flightno: e, tkclass: f, tktype: g, origcode: h, orig: i, destcode: j, dest: n, origmatch: m, destmatch: l,
        deptime: p, arvtime: o, dur: k, stops: q, price: r, retbased: s, supplierid: t, airlinecode_org: u
    }; if (this.minStops > q) this.minStops = q; if (this.maxStops < q) this.maxStops = q; this.addLookupAirline(this.airlines, b, d); this.addLookup(this.tickets, f, this.ticketClassName(f)); if (a) { this.addLookup(this.origs, h, i); this.addLookup(this.dests, j, n) } else { this.addLookup(this.origs, j, n); this.addLookup(this.dests, h, i) } return e
}, addLookup: function(a, b, d) {
    var e = a[b]; if (e == null) { a[b] = d == null || d == "" ? b : d; this.updateFilters = true } else if (e ==
b) { a[b] = d; this.updateFilters = true }
}, addLookupAirline: function(a, b, d) { var e = a[b]; if (b == "ZZ") d = " Flere flyselskap"; if (e == null) { a[b] = d == null || d == "" ? b : d; this.updateFilters = true } else if (e == b) { a[b] = d; this.updateFilters = true } }, checkSegments: function(a, b) { for (var d = b.length, e = 0; e < d; e++) { var f = b[e]; if (e < a.length) { var g = a[e]; if (f.dur > 0 && g.dur <= 0) g.dur = f.dur; if (f.stops >= 0 && g.stops < 0) g.stops = f.stops } else a.push(f) } }, convertDate: function(a, b, d) {
    if (typeof b == "undefined" || typeof d == "undefined") return new Date(a.substr(0,
4), parseInt(a.substr(4, 2), 10) - 1, a.substr(6, 2)); return new Date(a.substr(0, 4), parseInt(a.substr(4, 2), 10) - 1, a.substr(6, 2), b, d)
}, compareNum: function(a, b, d, e) { d = this.sortDirection * (d - e); if (d == 0 || isNaN(d)) d = a.price - b.price; return d }, compareStr: function(a, b, d, e) { d = this.sortDirection * String.compare(d, e); if (d == 0) d = a.price - b.price; return d }, compareSegsByPrice: function(a, b) { return a.price - b.price }, compareSegArraysByPrice: function(a, b) { return a[0].price - b[0].price }, compareGroupsByPrice: function(a, b) {
    return this.sortDirection *
(a.fl.price - b.fl.price)
}, compareGroupsByRating: function(a, b) { var d = a.fl.supplier.rating, e = b.fl.supplier.rating; if (e == d) { d = a.fl.supplier.ratingCount; e = b.fl.supplier.ratingCount } return this.sortDirection * (d - e) }, compareFlightsByPriceAsc: function(a, b) { return a.price - b.price }, compareFlightsByPrice: function(a, b) { return (this.groupField == "" ? this.sortDirection : 1) * (a.price - b.price) }, compareFlightsByOutDepTime: function(a, b) { return this.compareNum(a, b, a.outsegs[0].deptime, b.outsegs[0].deptime) }, compareFlightsByRetDepTime: function(a,
b) { return a.retsegs && b.retsegs ? this.compareNum(a, b, a.retsegs[0].deptime, b.retsegs[0].deptime) : this.compareFlightsByOutDepTime(a, b) }, compareFlightsBySupplierId: function(a, b) { return this.compareStr(a, b, a.supplier.id.toLowerCase(), b.supplier.id.toLowerCase()) }, compareFlightsBySupplierName: function(a, b) { return this.compareStr(a, b, a.supplier.name.toLowerCase(), b.supplier.name.toLowerCase()) }, compareFlightsByAirline: function(a, b) {
    var d = b.outsegs[0].airlinecode + b.outsegs[0].flightno; return this.compareStr(a,
b, (a.outsegs[0].airlinecode + a.outsegs[0].flightno).toLowerCase(), d.toLowerCase())
}, compareFlightsByAirlineCode: function(a, b) { return this.compareStr(a, b, a.outsegs[0].airlinecode.toLowerCase(), b.outsegs[0].airlinecode.toLowerCase()) }, compareFlightsByStops: function(a, b) { return this.compareNum(a, b, a.outsegs[0].stops, b.outsegs[0].stops) }, compareFlightsByDuration: function(a, b) {
    return a.retsegs != undefined && b.retsegs != undefined ? this.compareNum(a, b, a.outsegs[0].dur + a.retsegs[0].dur, b.outsegs[0].dur + b.retsegs[0].dur) :
this.compareNum(a, b, a.outsegs[0].dur, b.outsegs[0].dur)
}, compareFlightsByKey: function(a, b) { return this.compareStr(a, b, a.key.toLowerCase(), b.key.toLowerCase()) }, compareFlightsByRating: function(a, b) { var d = this.compareNum(a, b, a.supplier.rating, b.supplier.rating); if (d == 0) d = this.compareNum(a, b, a.supplier.ratingCount, b.supplier.ratingCount); return d }, compareFlightsByScore: function(a, b) { return a.score == null || b.score == null ? this.compareFlightsByPrice(a, b) : -this.compareNum(a, b, a.score, b.score) }, compareFlightsByFactor: function(a,
b) { return a.factor == null || b.factor == null ? this.compareFlightsByPrice(a, b) : -this.compareNum(a, b, a.factor, b.factor) }, sortFlights: function(a, b) {
    if (b == "price") a.sort(this.compareFlightsByPrice.bind(this)); else if (b == "outdeptime") a.sort(this.compareFlightsByOutDepTime.bind(this)); else if (b == "retdeptime") a.sort(this.compareFlightsByRetDepTime.bind(this)); else if (b == "supplierid") a.sort(this.compareFlightsBySupplierId.bind(this)); else if (b == "suppliername") a.sort(this.compareFlightsBySupplierName.bind(this));
    else if (b == "airline") a.sort(this.compareFlightsByAirline.bind(this)); else if (b == "airlinecode") a.sort(this.compareFlightsByAirlineCode.bind(this)); else if (b == "stops") a.sort(this.compareFlightsByStops.bind(this)); else if (b == "duration") a.sort(this.compareFlightsByDuration.bind(this)); else if (b == "key") a.sort(this.compareFlightsByKey.bind(this)); else if (b == "rating") a.sort(this.compareFlightsByRating.bind(this)); else b == "score" && a.sort(this.compareFlightsByScore.bind(this))
}, includeFlight: function(a) {
    if (a.outsegs[0].stops <
this.filterMinStops) return false; if (a.outsegs[0].stops > this.filterMaxStops) return false; if (a.outsegs[0].deptime > this.filterMaxOutDepTime) return false; if (a.outsegs[0].deptime < this.filterMinOutDepTime) return false; if (this.filterSupplier.contains(a.supplier.id)) return false; if (this.filterAirline.contains(a.outsegs[0].airlinecode)) return false; if (this.filterTicket.contains(a.outsegs[0].tkclass)) return false; if (this.filterOrig.contains(a.outsegs[0].origcode)) return false; if (this.filterDest.contains(a.outsegs[0].destcode)) return false;
    if (!a.oneway) if (this.filterSameAirport == 1 && (a.outsegs[0].origmatch == 0 || a.outsegs[0].destmatch == 0 || a.retsegs[0].origmatch == 0 || a.retsegs[0].destmatch == 0)) return false; if (!a.oneway) { if (a.retsegs[0].stops > this.filterMaxStops) return false; if (a.retsegs[0].deptime > this.filterMaxRetDepTime) return false; if (a.retsegs[0].deptime < this.filterMinRetDepTime) return false; if (this.filterAirline.contains(a.retsegs[0].airlinecode)) return false; if (this.filterTicket.contains(a.retsegs[0].tkclass)) return false } return true
},
    syncAppliedFilters: function() {
        var a = false; if (this.filterMaxStops != init_filterMaxStops) { a = true; $("#aClearFilter_Stop").show() } else $("#aClearFilter_Stop").hide(); if (this.searchoneway) $("#aClearFilter_SameAirport").hide(); else if (this.filterSameAirport == 1) { a = true; $("#aClearFilter_SameAirport").show() } else $("#aClearFilter_SameAirport").hide(); if (this.filterAirline.length != 0) { a = true; $("#aClearFilter_Airlines").show() } else $("#aClearFilter_Airlines").hide(); if (this.filterOrig.length != 0 || this.filterDest.length !=
0) { a = true; $("#aClearFilter_Airports").show() } else $("#aClearFilter_Airports").hide(); if (this.filterMaxOutDepTime != init_filterMaxOutDepTime || this.filterMinOutDepTime != init_filterMinOutDepTime || this.filterMaxRetDepTime != init_filterMaxRetDepTime || this.filterMinRetDepTime != init_filterMinRetDepTime) { a = true; $("#aClearFilter_Traveltime").show() } else $("#aClearFilter_Traveltime").hide(); a ? $("#divFilterClear").show() : $("#divFilterClear").hide()
    }, filterFlights: function(a) {
        for (var b = [], d = a.length, e = 0; e < d; e++) {
            var f =
a[e]; this.includeFlight(f) && b.push(f)
        } return b
    }, groupFlights: function(a, b) {
        for (var d = new Dictionary, e = b.length, f = 0; f < e; f++) {
            var g = b[f], h; h = a == "supplier" ? g.supplier.id + g.orig + g.dest : a == "airline" ? this.getFlightAirline(g) : a == "price" ? g.price.toString() : g.key; var i = d[h]; if (i == null) { i = {}; i.flights = []; i.ident = h; i.fl = g; d[h] = i } else {
                if (g.price < i.fl.price || g.price == i.fl.price && g.supplier.rating > i.fl.supplier.rating) i.fl = g; if (this.enhanceSegments && a == "key") {
                    this.checkSegments(g.outsegs, i.fl.outsegs); this.checkSegments(i.fl.outsegs,
g.outsegs); if (!g.oneway) { this.checkSegments(g.retsegs, i.fl.retsegs); this.checkSegments(i.fl.retsegs, g.retsegs) }
                }
            } i.flights.push(g)
        } return d
    }, getGroupedByPrice: function(a) { for (var b = new Dictionary, d = a.length, e = 0; e < d; e++) { var f = a[e]; b[f.ident] = this.groupByPrice(f) } return b }, groupByPrice: function(a) {
        var b = { flights: [], ident: a.ident, fl: null }; a = this.groupFlights("price", a.flights).Values(); a.sort(this.compareGroupsByPrice.bind(this)); for (var d = a.length, e = 0; e < d; e++) {
            var f = a[e], g = [], h = null, i = false, j = -1; this.sortFlights(f.flights,
"outdeptime"); for (var n = f.flights.length, m = 0; m < n; m++) { var l = f.flights[m], p = l.outsegs[0]; p.deptime != j && g.push(p); j = p.deptime; i = i || !l.oneway } if (i) { h = []; j = -1; this.sortFlights(f.flights, "retdeptime"); n = f.flights.length; for (m = 0; m < n; m++) { l = f.flights[m]; if (this.includeFlight(l)) if (l.retsegs != null && l.retsegs.length > 0) { p = l.retsegs[0]; p.deptime != j && h.push(p); j = p.deptime } } } i = this.copyFlight(f.fl); i.outsegs = g; i.retsegs = h; i.groupfl = f.fl; b.flights.push(i)
        } b.fl = b.flights[0]; return b
    }, flightBatchCompleted: function() {
        this.flights.sort(this.compareFlightsByPriceAsc.bind(this));
        this.checkBest(); for (var a = this.flights.length, b = 0; b < a; b++) this.flights[b].index = b; this.processFlightsWait(); this.updateTripCount(); this.updateTop(false)
    }, receivedResults: function() { $(".hres").hide(); $(".sres").show(); this.resultsVisible() }, resultsVisible: function() { }, hideResults: function() { $(".hres").show(); $(".sres").hide() }, checkBest: function() { var a = this.flights[0]; a && a.supplier && this.updatingSuppliers.get(a.supplier.id) }, processFlightsWait: function() { this.processFlights() }, processFlights: function() {
        this.syncAppliedFilters();
        var a; a = this.getSingleFlightFromGroups(this.groupFlights("key", this.flights)); this.totalCount = a.length; a = this.filterFlights(this.flights); this.matchCount = a.length; this.flightgroups = this.groupFlights("key", a); this.supplierView || (a = this.getSingleFlightFromGroups(this.flightgroups)); this.matchCount = a.length; this.sortFlights(a, this.sortField); if (this.groupField != "" && this.curView == 0) {
            this.grouped = this.groupFlights(this.groupField, a); a = this.grouped.Values(); a.sort(this.compareGroupsByPrice.bind(this));
            if (this.supplierView) { this.grouped = this.getGroupedByPrice(a); a = this.grouped.Values(); this.sortField == "rating" ? a.sort(this.compareGroupsByRating.bind(this)) : a.sort(this.compareGroupsByPrice.bind(this)) }
        } if (this.renderPause) this.hasUnrenderedFlights = true; else { this.showFlights(a); this.hasUnrenderedFlights = false }
    }, getSingleFlightFromGroups: function(a) { a = a.Values(); for (var b = [], d = a.length, e = 0; e < d; e++) { var f = a[e].flights; f != null && f.length > 0 && b.push(f[0]) } return b }, showFlights: function(a) {
        if (a == null) a = this.currentflights;
        if (a != null) {
            this.currentflights = a; var b = $("#flightresults"), d = $("#results"), e = a.length; this.pages = Math.ceil(e / this.resultsPerPage); if (this.curPage >= this.pages) this.curPage = this.pages - 1; if (this.curPage < 0) this.curPage = 0; if (e == 0) {
                d = '<div style="white-space: nowrap;"><table><tr><td>' + Language.FilterNoResult_1 + '</td><td><span class="ui-icon ui-icon-arrowthick-1-n"></span></td><td>' + Language.FilterNoResult_1_1 + '</td><td><span class="ui-icon ui-icon-arrowthick-1-n"></span></td></tr>'; d += '<tr><td colspan="4">' +
Language.FilterNoResult_2 + ":</td></tr>"; d += '<tr><td colspan="4"><b>1.</b> ' + Language.FilterNoResult_3 + ".</td></tr>"; d += '<tr><td colspan="4">eller <b>2.</b> ' + Language.FilterNoResult_4 + ".</td></tr>"; d += '<tr><td colspan="4">eller <b>3.</b> <a href="#" onclick="javascript:filterClearAll(); return false;">' + Language.FilterNoResult_5 + "</a>.</td></tr></table></div>"; $(b).html(d); $("#filtermain").effect("highlight", {}, 2E3)
            } else {
                d.show(); this.lateInitFlights(); d = ""; var f = this.curPage * this.resultsPerPage;
                e = f + this.resultsPerPage; if (f < 0) f = 0; if (e > a.length) e = a.length; if (this.supplierView && this.curPage == 0) d += this.getBestCombinedHtml(); for (f = f; f < e; f++) d += this.getFlightHtml(a[f]); d != null && $(b).html(d)
            } this.updateNav(); this.updateFilterText(); this.showFilters(); applyButtons()
        }
    }, setGroupBySortBy: function(a, b, d) { var e = false; if (a != this.groupField) { this.groupField = a; e = true } if (d && d != this.curView) e = true; if (b != this.sortField) { this.sortDirection = 1; this.sortField = b; e = true } if (e) { this.curPage = 0; this.processFlightsWait() } },
    updateSortBy: function() {
        var a = $("#sortby"), b = $("#sortbyheading"); if (!this.sortBys || this.sortBys.length == 0) { a.hide(); b.hide() } else {
            a.show(); b.show(); $(b).html('<div class="heading">' + Language.SortText + ":</div>"); $(a).html("<span>" + Language.SortText + ":</span>&nbsp;&nbsp;"); b = this.sortBys.length; for (var d = 0; d < b; d++) {
                var e = this.sortBys[d], f = $.create("a", { href: "#", onclick: "return false;" }, []); $(f).addClass("sortresult_sort"); $(f).addClass("sortby"); d == 0 && $(f).addClass("first"); d == b - 1 && $(f).addClass("last");
                if (e == this.sortField) { $(f).addClass("selected"); this.sortDirection == 1 ? $(f).addClass("ascending") : $(f).addClass("descending") } $(f).html("<span>" + SortText["SortBy_" + e] + "</span>"); $(f).bind("click", { sortname: e }, [RBFlights, "sortBy"]); $(a).append($(f)); $(a).append("&nbsp;&nbsp;&nbsp;&nbsp;")
            }
        }
    }, stringPad: function(a, b, d) { for (var e = "", f = 0; f < b - a.length; f++) e += d; return e + a }, zeroPad: function(a, b) { return this.stringPad(a.toString(), b, "0") }, minToTime: function(a, b) {
        var d = Math.floor(a / 60), e = a - d * 60, f = ""; if (currentCulture ==
"en-US" && !b) { f = ""; f = d < 12 ? "AM" : "PM"; if (d == 0) d = 12; if (d > 12) d -= 12; f = this.zeroPad(d, 2) + ":" + this.zeroPad(e, 2) + " " + f } else f = this.zeroPad(d, 2) + ":" + this.zeroPad(e, 2); return f
    }, minToTimeText: function(a, b) { var d = Math.floor(a / 60), e = a - d * 60, f = ""; if (currentCulture == "en-US" && !b) { f = ""; f = d < 12 ? "AM" : "PM"; if (d == 0) d = 12; if (d > 12) d -= 12; f = this.zeroPad(d, 2) + ":" + this.zeroPad(e, 2) + " " + f } else f = this.zeroPad(d, 2) + "t " + this.zeroPad(e, 2) + "m"; return f }, getOrig: function(a) { return a.orig == null || a.orig == "" ? a.origcode : a.orig }, getOrigEx: function(a) {
        return a.orig ==
null || a.orig == "" || a.orig == a.origcode ? a.origcode : a.orig + " (" + a.origcode + ")"
    }, getOrigFormatted: function(a, b) { var d = ""; d = b ? this.getOrigEx(a) : this.getOrig(a); if (a.origmatch > 0) d = "<strong>" + d + "</strong>"; return d }, getDest: function(a) { return a.dest == null || a.dest == "" ? a.destcode : a.dest }, getDestEx: function(a) { return a.dest == null || a.dest == "" || a.dest == a.destcode ? a.destcode : a.dest + " (" + a.destcode + ")" }, getDestFormatted: function(a, b) {
        var d = ""; d = b ? this.getDestEx(a) : this.getDest(a); if (a.destmatch > 0) d = "<strong>" + d +
"</strong>"; return d
    }, getCodeFormatted: function(a, b, d) { var e = b ? a.origcode : a.destcode; return e = (b ? a.origmatch : a.destmatch) > 0 || d ? "<strong>" + e + "</strong>" : '<font style="background-color: yellow">' + e + "</font>" }, outputFlightNo: function(a) { return a.airlinecode == "" || a.airlinecode == "ZZ" ? "" : a.airlinecode + (a.flightno == 0 ? "" : this.zeroPad(a.flightno, 4)) }, outputAirline: function(a) { return a.airline }, getFlightAirline: function(a) { var b = a.outsegs[0].airlinecode; if (!a.oneway) if (b != a.retsegs[0].airlinecode) b = "ZZ"; return b },
    getAirlineLogoImg: function(a) { if (a == "FR") a = "ZZ"; if (!a || a == "ZZ") a = "UNK"; var b = ""; if (a != "UNK") b = '<img src="images/carrier/' + a + '.gif" width="26" height="23" alt="' + a + '" />'; return b }, getAirlineLogo: function(a) { if (!this.airlineLogos) return ""; var b = a.airlinecode; if (b == null) b = this.getFlightAirline(a); return this.getAirlineLogoImg(b) }, getSupplierLogo: function(a) { if (!a || !this.supplierLogos) return ""; return '<img src="' + this.logoPath + (a.supplier && a.supplier.id ? a.supplier.id : a) + '.gif" />' }, getFlightGroup: function(a,
b) { var d = null, e = this.flightgroups[a]; if (e) if (e.flights) if (b) { d = []; for (var f = new Dictionary, g = e.flights.length, h = 0; h < g; h++) { var i = e.flights[h], j = i.supplier.id; if (!f[j]) { f[j] = 1; d.push(i) } } } else d = e.flights; return d }, getFlightHtml: function(a) { return this.getFlightHtmlEx(a, "") }, getFlightHtmlEx: function(a, b) {
    var d = this.getAirlineLogo(a), e = false, f = a.outsegs, g = a.retsegs, h; h = a.key; var i = b + "divRow" + a.index.toString() + "_details", j = '<div id="' + b + "divRow" + a.index.toString() + '" class="flight_round_box">'; j += "<div>";
    j += '<table cellspacing="0" cellpadding="0" border="0" style="width: 100%"><tr>'; j += '<td  rowspan="2" class="airline">'; var n = "", m = "", l = "", p = ""; if (f) { d = 0; for (var o = f.length; d < o; d++) { var k = f[d]; n += this.getSegmentLogo(a, k, a.isReturn, d == 0, d == o - 1); e = e || k.airlinecode == "ZZ" } } if (!a.oneway && g) { d = 0; for (o = g.length; d < o; d++) { k = g[d]; m += this.getSegmentLogo(a, k, true, d == 0, d == o - 1); e = e || k.airlinecode == "ZZ" } } if (n != m && !a.oneway) {
        if (f) {
            d = 0; for (o = f.length; d < o; d++) {
                k = f[d]; l += this.getSegmentLogoOnly(a, k, a.isReturn, d == 0, d ==
o - 1)
            }
        } if (!a.oneway && g) { d = 0; for (o = g.length; d < o; d++) { k = g[d]; p += this.getSegmentLogoOnly(a, k, true, d == 0, d == o - 1) } } j += "<table><tr><td>" + l + '</td><td rowspan="2">Flere flyselskap</td></tr><tr><td>' + p + "</td></tr></table>"
    } else if (e == true) {
        if (f) { d = 0; for (o = f.length; d < o; d++) { k = f[d]; l += this.getSegmentLogoOnly(a, k, a.isReturn, d == 0, d == o - 1) } } if (!a.oneway && g) { d = 0; for (o = g.length; d < o; d++) { k = g[d]; p += this.getSegmentLogoOnly(a, k, true, d == 0, d == o - 1) } } j += "<table><tr><td>" + l + '</td><td rowspan="2">Flere flyselskap</td></tr><tr><td>' +
p + "</td></tr></table>"
    } else j += n; if (IsDebug) j += h; j += "</td>"; j += '<td class="flightsegments">'; j += '<div><table cellspacing="0" cellpadding="0" border="0" class="segments">'; if (f) { d = 0; for (o = f.length; d < o; d++) { k = f[d]; j += this.getSegmentHtml(a, k, a.isReturn, d == 0, d == o - 1) } } j += "</table></div></td>"; (f = this.getFlightGroup(a.key, true)) || (f = [a]); e = n = k = ""; o = f.length; j += '<td rowspan="2" class="priceinfo">'; h = a.priceurl; m = formatPrice(a.price) + " " + this.curCurrency; j += IsDebug ? "<div class='pricequote'><a onclick=javascript:ShowDialog('" +
escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "'); href=/RBwww/xt_OnlineSearchRedirect.aspx?ID=" + h + " target=_blank>" + m + "</a></div>" : "<div class='pricequote'><a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "'); href=/xt_OnlineSearchRedirect.aspx?ID=" + h + " target=_blank>" + m + "</a></div>"; h = a.priceurl; l = ""; if (!this.supplierView && o > 1) {
        k += "<div>"; k += "<div>"; e += '<table cellspacing="4" cellpadding="4" width="550px" style="vertical-align:top; text-align:center;">';
        for (var q = 0; q < o; q++) {
            p = f[q]; m = formatPrice(p.price) + " " + this.curCurrency; h = p.priceurl; k += IsDebug ? "<a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "'); href=/RBwww/xt_OnlineSearchRedirect.aspx?ID=" + h + " target=_blank>" + m + "</a>" : "<a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "'); href=/xt_OnlineSearchRedirect.aspx?ID=" + h + " target=_blank>" + m + "</a></div>"; k += "<div>" + m + "</div>"; k += "<div>" +
p.supplier.name + "</div>"; k += "</div></a>"; d = this.getSupplierLogo(p); l = "flightsredirect_details_" + i; if (IsDebug) {
                e += "<tr><td>" + d + "</td><td>" + p.supplier.name + "</td><td><a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "'); href=/RBwww/xt_OnlineSearchRedirect.aspx?ID=" + h + " target=_blank>" + m + "</a></td><td><a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "'); class=" + l + " href=/RBwww/xt_OnlineSearchRedirect.aspx?ID=" +
h + " target=_blank>" + Language.Continue + "</a></td></tr>"; n += "<a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "');  href=/RBwww/xt_OnlineSearchRedirect.aspx?ID=" + h + " target=_blank>" + p.supplier.name + " " + m + "</a>"
            } else {
                e += "<tr><td>" + d + "</td><td>" + p.supplier.name + "</td><td><a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "'); href=/xt_OnlineSearchRedirect.aspx?ID=" + h + " target=_blank>" + m + "</a></td><td><a onclick=javascript:ShowDialog('" +
escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "'); class=" + l + " href=/xt_OnlineSearchRedirect.aspx?ID=" + h + " target=_blank>" + Language.Continue + "</a></td></tr>"; n += "<a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "');  href=/xt_OnlineSearchRedirect.aspx?ID=" + h + " target=_blank>" + p.supplier.name + " " + m + "</a>"
            }
        } e += "</table>"; h = a.priceurl
    } j += this.visitButton(i, h, null, a.supplier.name + " : " + m); j += '</td></tr><tr><td class="flightsegments">';
    j += '<div class="homebound"><table cellspacing="0" cellpadding="0" border="0" class="segments">'; if (!a.oneway && g) { d = 0; for (o = g.length; d < o; d++) { k = g[d]; j += this.getSegmentHtml(a, k, true, d == 0, d == o - 1) } } j += "</table></div></td>"; j += "</tr>"; o = f.length; j += o > 1 ? '<tr><td class="pricelinksdetails"><a href="javascript:RBFlights.priceDetails(\'' + i + "')\">" + Language.ShowDetails + "</a>" : '<tr><td class="pricelinksdetails">'; j += '</td><td class="pricelinks"><div style="overflow:hidden"></div></td><td class="pricelinksall">';
    if (!this.supplierView) {
        g = o > 1 ? "<a href=\"javascript:RBFlights.priceDetails('" + i + "')\">" + Language.AllText + " " + o + " priser</a>" : IsDebug ? "<a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "');  href=/RBwww/xt_OnlineSearchRedirect.aspx?ID=" + h + " target=_blank>" + f[0].supplier.name + "</a>" : "<a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "');  href=/xt_OnlineSearchRedirect.aspx?ID=" + h + " target=_blank>" +
f[0].supplier.name + "</a>"; j += '<div class="supplierlogo">' + g + "</div>"
    } j += "</td></tr>"; j += "</table>"; j += '<div style="display:none" id="' + b + "divRow" + a.index.toString() + '_details" class="flight">'; j += e; j += "</div>"; j += "</div></div>"; j += "<br />"; return j
}, visitButton: function(a, b) {
    var d = ""; return d = IsDebug ? "<a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "'); class='flightsredirect_main' id='a" + a + "' href='/RBwww/xt_OnlineSearchRedirect.aspx?ID=" +
b + "' target='_blank'>" + Language.Continue + "</a>" : "<a onclick=javascript:ShowDialog('" + escape(strHotelsCom) + "','" + escape(strExpedia) + "','" + escape(strVenere) + "'); class='flightsredirect_main' id='a" + a + "' href='/xt_OnlineSearchRedirect.aspx?ID=" + b + "' target='_blank'>" + Language.Continue + "</a>"
}, getSegmentHtml: function(a, b, d, e, f) {
    this.getAirlineLogoImg(b.airlinecode); d = ""; if (f) d = "last"; f = ""; f += '<tr class="segment' + d + '">'; d = this.getOrigEx(b) + " - " + this.getDestEx(b); f += '<td class="orig"><span title="' + d +
'">' + this.getCodeFormatted(b, true, a.oneway) + "</span></td>"; f += '<td class="deptime"><span title="">' + this.minToTime(b.deptime) + "</span></td>"; f += '<td class="dest"><span title="' + d + '">' + this.getCodeFormatted(b, false, a.oneway) + "</span></td>"; f += '<td class="arvtime"><span title="">' + this.minToTime(b.arvtime) + "</span></td>"; a = ""; a = b.stops < 0 ? "" : b.stops > 1 ? b.stops.toString() + " stopp" : b.stops == 1 ? "1 stopp" : "Direkte"; f += '<td class="stops"><span>' + a + "</span></td>"; a = ""; if (b.dur > 0) a = "(" + this.minToTimeText(b.dur,
true) + ")"; f += '<td class="duration"><span>' + a + "</span></td>"; f += "</tr>"; return f
}, getSegmentLogo: function(a, b) { var d = this.getAirlineLogoImg(b.airlinecode), e = "", f = this.outputAirline(b); e += '<table cellspacing="0" cellpadding="0"><tr><td class="airlinelogo"><div>' + d + '</div></td><td class="airlinetext"><span>' + this.capText(f, 13, 11) + "</span></td></tr></table>"; return e }, getSegmentLogoOnly: function(a, b) {
    var d = this.getAirlineLogoImg(b.airlinecode_org), e = ""; this.outputAirline(b); e += '<table cellspacing="0" cellpadding="0"><tr><td class="airlinelogo"><div>' +
d + '</div></td><td class="airlinetext"></td></tr></table>'; return e
}, priceDetails: function(a) { $("#" + a).toggle(400); $(".flightsredirect_details_" + a).button({ text: true, icons: { secondary: "ui-icon ui-icon-arrowthick-1-e"} }) }, updateNav: function() { var a = $("#pagenav"); a != null && $(a).html(this.getNavHtml()) }, getNavHtml: function() {
    if (this.pages <= 1) return ""; var a = '<div class="pagemenu">'; a += '<ul id="pagination-clean">'; var b = this.curPage - 4, d = this.curPage + 5; b = Math.min(b, this.pages - 9); b = Math.max(b, 0); d = Math.max(d,
9); d = Math.min(d, this.pages); a += this.curPage < 1 ? '<li class="previous-off"><a href="#" onclick="return false;">\u00abForrige</a></li>' : '<li class="previous"><a href="#" onclick="RBFlights.prevPage();return false;">\u00abForrige</a></li>'; for (b = b; b < d; b++) a += b == this.curPage ? '<li class="active"><a href="#" onclick="return false;"><span>' + (b + 1).toString() + "</span></a></li>" : '<li><a onclick="RBFlights.setPage(' + b.toString() + ');return false;" href="#"><span>' + (b + 1).toString() + "</span></a></li>"; a += this.curPage >=
this.pages - 1 ? '<li class="next_off"><a onclick="return false;" href="#">Neste \u00bb</a></li>' : '<li class="next"><a onclick="RBFlights.nextPage();return false;" href="#">Neste \u00bb</a></li>'; a += "</ul></div>"; return a
}, nextPage: function() { this.setPage(this.curPage + 1) }, prevPage: function() { this.setPage(this.curPage - 1) }, setPage: function(a) { if (this.currentflights != null) if (a >= 0 && a < this.pages) { this.curPage = a; this.showFlights(this.currentflights) } }, setMaxStops: function(a) {
    if (a != this.filterMaxStops) {
        this.filterMaxStops =
a; a = this.filterMaxStops < 2 ? this.filterMaxStops : 2; $("#noStopSlider").slider("value", a); this.processFlightsWait()
    }
}, clearSameAirportFilter: function() { $("#chkSameAirport").attr("checked", false); this.filterSameAirport = 0; this.processFlightsWait() }, changeSameAirportFilter: function(a) { if (a == 1) $("#chkSameAirport").attr("checked") ? $("#chkSameAirport").attr("checked", false) : $("#chkSameAirport").attr("checked", true); this.filterSameAirport = $("#chkSameAirport").attr("checked") ? 1 : 0; this.processFlightsWait() }, ticketClassOrder: function(a) {
    if (a ==
null || a == "") return 0; if (a == "CCC") return 1; if (a == "ECO") return 2; if (a == "FLX") return 3; if (a == "BIZ") return 4; if (a == "FST") return 5; return -1
}, ticketClassName: function() { return "Economy" }, showFilters: function() {
    if (this.updateFilters) {
        this.searchoneway && $("#filter_sameairport").hide(); var a = $("#panelFilterAirline"); $(a).html(this.getAirlineFilterHtml()); a = $("#panelFilterOrig"); $(a).html(this.getOrigFilterHtml()); a = $("#panelFilterDest"); $(a).html(this.getDestFilterHtml()); this.firstFilterUpdate = this.updateFilters =
false; applyRoundCorners()
    }
}, setupHourSliders: function() {
    init_filterSameAirport == 1 && $("#chkSameAirport").attr("checked", true); $("#noStopSlider").slider({ value: 2, min: 0, max: 2, step: 1, slide: function(a, b) { RBFlights.setMaxStops(b.value) } }); $("#outTimeSlider").slider({ range: true, min: 0, max: 1440, step: 60, values: [0, 1440], slide: function(a, b) {
        var d = Math.floor(b.values[0] / 60), e = b.values[0] - d * 60, f = Math.floor(b.values[1] / 60), g = b.values[1] - f * 60; if (d <= 9) d = "0" + d; if (e <= 9) e = "0" + e; if (f <= 9) f = "0" + f; if (g <= 9) g = "0" + g; $("#outTimeSliderValueMin").html(d +
":" + e); $("#outTimeSliderValueMax").html(f + ":" + g); if (DdlContainsValue($("#deptime"), JSON.stringify(b.values))) { $("#deptime option[value='1']").remove(); $("#deptime").val(JSON.stringify(b.values)) } else { $("#deptime option[value='1']").remove(); $("#deptime").append($("<option></option>").attr("value", 1).text(Language.UserSelected)); $("#deptime").val(1) } RBFlights.sliderChanged("OutTime", b.values)
    }
    }); $("#retTimeSlider").slider({ range: true, min: 0, max: 1440, step: 60, values: [0, 1440], slide: function(a, b) {
        var d =
Math.floor(b.values[0] / 60), e = b.values[0] - d * 60, f = Math.floor(b.values[1] / 60), g = b.values[1] - f * 60; if (d <= 9) d = "0" + d; if (e <= 9) e = "0" + e; if (f <= 9) f = "0" + f; if (g <= 9) g = "0" + g; $("#retTimeSliderValueMin").html(d + ":" + e); $("#retTimeSliderValueMax").html(f + ":" + g); if (DdlContainsValue($("#rettime"), JSON.stringify(b.values))) { $("#rettime option[value='1']").remove(); $("#rettime").val(JSON.stringify(b.values)) } else {
            $("#rettime option[value='1']").remove(); $("#rettime").append($("<option></option>").attr("value", 1).text(Language.UserSelected));
            $("#rettime").val(1)
        } RBFlights.sliderChanged("RetTime", b.values)
    }
    }); RenderDepTimeLabels($("#outTimeSlider"), $("#outTimeSliderValueMin"), $("#outTimeSliderValueMax")); RenderDepTimeLabels($("#retTimeSlider"), $("#retTimeSliderValueMin"), $("#retTimeSliderValueMax")); $("#deptime").change(function() {
        $("#outTimeSlider").slider("values", eval(this.value)); RenderDepTimeLabels($("#outTimeSlider"), $("#outTimeSliderValueMin"), $("#outTimeSliderValueMax")); $('#deptime option[value="1"]').remove(); RBFlights.sliderChanged("OutTime",
eval(this.value))
    }); $("#rettime").change(function() { $("#retTimeSlider").slider("values", eval(this.value)); RenderDepTimeLabels($("#retTimeSlider"), $("#retTimeSliderValueMin"), $("#retTimeSliderValueMax")); $('#rettime option[value="1"]').remove(); RBFlights.sliderChanged("RetTime", eval(this.value)) })
}, changeSliderOutTime: function() {
    $("#outTimeSlider").slider("values", eval(this.value)); RenderDepTimeLabels($("#outTimeSlider"), $("#outTimeSliderValueMin"), $("#outTimeSliderValueMax")); $("#deptime option[value='1']").remove();
    RBFlights.sliderChanged("OutTime", eval(this.value))
}, changeSliderRetTime: function() { $("#retTimeSlider").slider("values", eval(this.value)); RenderDepTimeLabels($("#retTimeSlider"), $("#retTimeSliderValueMin"), $("#retTimeSliderValueMax")); $("#rettime option[value='1']").remove(); RBFlights.sliderChanged("RetTime", eval(this.value)) }, getSliderCombo: function(a) { return $(a == "OutTime" ? "panelFilterOutTime" : "panelFilterRetTime").children("select") }, setCustomEnabled: function(a, b) {
    this.getSliderCombo(a).options[5].disabled =
!b
}, sliderDragging: function(a) { this.setCombosFromSlider(a) }, sliderChanged: function(a, b) { if (a == "OutTime") { this.filterMinOutDepTime = b[0]; this.filterMaxOutDepTime = b[1] } else { this.filterMinRetDepTime = b[0]; this.filterMaxRetDepTime = b[1] } this.updateFilters = true; this.processFlightsWait() }, updateFilterText: function() { var a = $("#filterText"); this.flights.length == 0 ? a.hide() : a.show(); $(a).html(this.getFilterText()) }, getFilterText: function() {
    var a = ""; if (this.totalCount != 0) a = "<span>" + this.matchCount + "</span> av " +
this.totalCount + " reiser stemmer med dine filter kriterier."; return a
}, getLookup: function(a) { if (a == "Supplier") return this.suppliers; else if (a == "Airline") return this.airlines; else if (a == "Ticket") return this.tickets; else if (a == "Orig") return this.origs; else if (a == "Dest") return this.dests }, getFilterList: function(a) {
    if (a == "Supplier") return this.filterSupplier; else if (a == "Airline") return this.filterAirline; else if (a == "Ticket") return this.filterTicket; else if (a == "Orig") return this.filterOrig; else if (a ==
"Dest") return this.filterDest
}, filterCheckAll: function(a) { var b = this.getLookup(a).Keys(), d = this.getFilterList(a); d.splice(0, d.length); d = b.length; for (var e = 0; e < d; e++) { var f = b[e]; if (f != "") if (f = $("#filterCheck" + a + f)) { $(f).attr("checked", true); f = $(f).parent("td").next("td"); $(f).addClass("selected") } } }, filterAll: function(a) { this.filterCheckAll(a); this.processFlightsWait() }, filterOnly: function(a, b) {
    var d = this.getLookup(a).Keys(), e = this.getFilterList(a); e.splice(0, e.length); for (var f = d.length, g = 0; g < f; g++) {
        var h =
d[g]; if (h != "") { var i = $("#filterCheck" + a + h); if (i) { var j = $(i).parent("td").next("td"); if (h == b) { $(j).addClass("selected"); $(i).attr("checked", true) } else { $(j).removeClass("selected"); $(i).attr("checked", false); e.push(h) } } }
    } this.processFlightsWait()
}, CheckedFilter: function(a, b) { this.filterOnly(a, b) }, filterChanged: function(a, b, d) { a = this.getFilterList(a); if (d) { b = a.indexOf(b); b >= 0 && a.splice(b, 1) } else a.condAdd(b); this.processFlightsWait() }, filterClicked: function(a, b) {
    if (b) {
        var d = $(b).parent("td").next("td");
        b.checked ? $(d).addClass("selected") : $(d).removeClass("selected")
    } this.filterChanged(a, b.value, b.checked)
}, checkboxHtmlEx: function(a, b, d, e, f, g, h, i) { return '<tr><td><input id="' + ("filterCheck" + a + f) + '" class="filter" value="' + f + '" type="checkbox" ' + (b ? "checked" : "") + ' onclick="' + e + "('" + a + '\',this)" title="' + h + '" /></td><td' + (b ? ' class="selected"' : "") + ">" + ('<a href="javascript:' + d + "('" + a + "','" + f + '\',this)" title="' + h + '">') + (g + (i ? " (" + f + ")" : "")) + "</a></td></tr>" }, checkboxHtml: function(a, b, d, e, f) {
    return this.checkboxHtmlEx(a,
b, "RBFlights.CheckedFilter", "RBFlights.filterClicked", d, e, f)
}, ticketComparePairValues: function(a, b) { var d = this.ticketClassOrder(a.key), e = this.ticketClassOrder(b.key); if (d == e) return 0; if (d > e) return 1; return -1 }, getFilterHtml: function(a, b, d, e, f) {
    var g = '<table cellspacing="0" cellpadding="0">'; b = b.Pairs(); f == null ? b.sort(dictionaryComparePairValues) : b.sort(f); f = b.length; for (var h = 0; h < f; h++) {
        var i = b[h]; if (!(a == "Supplier" && i.key.length == 2)) if (i.key && i.value) g += this.checkboxHtml(a, !d.contains(i.key), i.key,
i.value, i.value + " (" + i.key + ")", e)
    } g += "</table>"; return g
}, getSupplierFilterHtml: function() { return this.getFilterHtml("Supplier", this.suppliers, this.filterSupplier, false) }, getAirlineFilterHtml: function() { return this.getFilterHtml("Airline", this.airlines, this.filterAirline, false) }, getOrigFilterHtml: function() { return this.getFilterHtml("Orig", this.origs, this.filterOrig, false) }, getDestFilterHtml: function() { return this.getFilterHtml("Dest", this.dests, this.filterDest, false) }, renderPrice: function(a, b) {
    return String.format("{1} {0}",
Math.round(a), b == 0)
}, setCombosFromSlider: function(a) { var b = 0, d = 0; if (a == "OutTime") { b = this.departHourSlider.slider.values[0]; d = this.departHourSlider.slider.values[1] } else { b = this.returnHourSlider.slider.values[0]; d = this.returnHourSlider.slider.values[1] } var e = this.getSliderCombo(a); e.selectedIndex = b == 0 && d == 10 ? 1 : b == 10 && d == 14 ? 2 : b == 14 && d == 18 ? 3 : b == 18 && d == 24 ? 4 : b == 0 && d == 24 ? 0 : 5; this.setCustomEnabled(a, e.selectedIndex == 5) }, setFilterTime: function(a, b) {
    var d = 0, e = 0; switch (b) {
        case 1: d = 0; e = 600; break; case 2: d = 600;
            e = 840; break; case 3: d = 840; e = 1080; break; case 4: d = 1080; e = 1440; break; case 5: if (a == "OutTime") { d = this.filterMinOutDepTime; e = this.filterMaxOutDepTime } else { d = this.filterMinRetDepTime; e = this.filterMaxRetDepTime } break; default: d = 0; e = 1440
    } var f = d / 60, g = e / 60; this.suppressEventTracking = true; if (a == "OutTime") { this.filterMinOutDepTime = d; this.filterMaxOutDepTime = e; this.filterOutTime = b; this.departHourSlider.setValues(f, g) } else {
        this.filterMinRetDepTime = d; this.filterMaxRetDepTime = e; this.filterRetTime = b; this.returnHourSlider.setValues(f,
g)
    } this.updateFilters = true
}, filterTimeChanged: function(a, b) { var d = parseInt(b); this.setFilterTime(a, d); this.processFlightsWait() }, filterTimeClicked: function(a, b) { this.setCustomEnabled(a, false); this.filterTimeChanged.bind(this).defer(a, b) }, getDur: function(a) { var b = 0; if (a.length > 0) for (var d = a.length, e = 0; e < d; e++) b += a[e].dur; return b }, getStops: function(a) { if (a.length == 1) return a[0].stops; return a.length - 1 }, getDays: function(a) {
    var b = this.convertDate(a.depdate); a = this.convertDate(a.retdate); return Math.floor((a.getTime() -
b.getTime()) / 864E5)
}, getFlightPrice: function(a) { return formatPrice(a.price) + " " + this.curCurrency }, getFlightSubject: function(a) { return "Flybillet " + this.getOrig(a.outsegs[0]) + " - " + this.getDest(a.outsegs[0]) + ", " + Language.FromText + " " + formatPrice(a.price) + " " + this.curCurrency }, updateTop: function() { this.cheapestFlight = this.flights[0] }, addRouteSuppliers: function(a) {
    this.routeSuppliers = a; a = 0; for (var b = this.routeSuppliers.length; a < b; a++) {
        var d = this.routeSuppliers[a]; this.routeSuppliersIndex.set(d.id + d.orig +
d.dest, a)
    }
}
}), RBFlights = new RBFlightsClass; _flightsCollection = RBFlights.createSegArray.bind(RBFlights); _fs = RBFlights.createSeg.bind(RBFlights); _fl = RBFlights.addFlight.bind(RBFlights); _newSupplier = RBFlights.newSupplier.bind(RBFlights); function error(a, b) { if (b != null) a = a.replace("{0}", b); alert(a); return false } function getToday() { var a = new Date; a.setHours(0); a.setMinutes(0); a.setSeconds(0); a.setMilliseconds(0); return a }
function getReturnTrip() { var a = true; if ($get(ClientIDs.RadioButtonReturn) != null) a = $get(ClientIDs.RadioButtonReturn).checked; return a } function showDepartDate() { return false } function showReturnDate() { return false } function setTripType(a) { var b = $("#returndatetext"), d = $("#returndateinput"), e = $("#returntimeinput"), f = a ? "hidden" : ""; if (b) b.style.visibility = f; if (d) d.style.visibility = f; if (e) e.style.visibility = f; $(".returnrelated").each(function(g) { g.style.visibility = f }) }
var currentSearch = null, resultsTimer = null, searchdone = false, updateCounter = 0, bigProgressShown = false, hideBigProgressId = 0;
function startSearch(a, b, d, e, f, g, h, i, j, n, m) {
    RBFlights.searchorig = b; RBFlights.searchdest = d; RBFlights.searchdepdate = e; RBFlights.searchdepdatejs = g; RBFlights.searchretdate = f; RBFlights.searchretdatejs = h; RBFlights.searchoneway = i; RBFlights.mainorig = b; RBFlights.maindest = d; RBFlights.origairport = b; RBFlights.destairport = d; RBFlights.origdisplay = b; RBFlights.destdisplay = d; initSearch(); e = g.toUTCDate(); h = h.toUTCDate(); $("#divSupplierResult").html(""); strExpedia = strVenere = strHotelsCom = HotelResultRB = HotelResult = "";
    SessionID = $get(ClientIDs.txtSessionID).value; RB.StartSearchFlight(a, UID, SessionID, b, d, e, h, i, j, n, m, startSearchSuccess, startSearchFailure); RB.GetHotelsInCity(a, UID, b, d, e, h, i, j, n, m, startHotelInCitySearchSuccess, startHotelInCitySearchFailure)
} function startHotelSearchSuccess(a) { HotelResult = eval(a); renderHotels(HotelResult) } function startHotelSearchFailure() { } function startHotelInCitySearchSuccess(a) { HotelResultRB = eval(a); renderHotelsRB(HotelResultRB) } function startHotelInCitySearchFailure() { }
function renderHotelsRB(a) {
    HotelCityURL = ""; var b = "<tr><td>", d = ""; d = true; if (a.Hotels.length == 0) { $(".aHotelTeaserRB").attr("href", HotelLinkAddress); $("#HotelTeaserDesctiption").html(Language.HotelRB_Teaser_UnknownCity) } else {
        $("#HotelTeaserDesctiption").html(Language.HotelRB_Teaser_KnownCity); for (var e = "", f = 0; f < a.Hotels.length; f++) { HotelCityURL = a.Hotels[f].HotelCityURL; e = a.Hotels[f].NoOfElements + " " + a.Hotels[f].PropertyTypeDescription; if (d == true) { d = false; b = b + "   " + e } else b = b + "  ," + e } b += "</td></tr>";
        $(".aHotelTeaserRB").attr("href", HotelCityURL)
    } d = "<table cellpadding='3' cellspacing='6'>" + b + "</table>"; $("#divSupplierResultHotelText").html(d)
} function isEven(a) { return a % 2 == 0 ? true : false }
function renderHotels(a) {
    for (var b = strVenere = strExpedia = strHotelsCom = "", d = 0, e = 0; e < a.Hotels.length; e++) {
        imgName = a.Hotels[e].Name; if (a.Hotels[e].Name == "HotelsCom") strHotelsCom = a.Hotels[e].Url; else if (a.Hotels[e].Name == "Expedia") strExpedia = a.Hotels[e].Url; else if (a.Hotels[e].Name == "Venere") strVenere = a.Hotels[e].Url; b = IsDebug == true ? b + "<div class='HotelPriceElement' id='HotelPrice" + d + "'><a rel='nofollow' href='/RBwww/xt_OnlineSearchRedirect.aspx?ID=" + a.Hotels[e].Url + "' target='_blank'>" + a.Hotels[e].NoOfHotels +
" hotell, " + Language.FromText + " " + a.Hotels[e].Price + " Kr<img class='HotelImage' src='images/hotel_" + imgName + ".gif' alt='" + a.Hotels[e].Name + "' border='0' /></a></div>" : imgName == "Finn hotell hos ReisBillig.no" ? b + "<div class='HotelPriceElement' id='HotelPrice" + d + "'><a rel='nofollow' href='/xt_OnlineSearchRedirect.aspx?ID=" + a.Hotels[e].Url + "' target='_blank'>" + imgName + "</a></div>" : b + "<div class='HotelPriceElement' id='HotelPrice" + d + "'><a rel='nofollow' href='/xt_OnlineSearchRedirect.aspx?ID=" + a.Hotels[e].Url +
"' target='_blank'>" + a.Hotels[e].NoOfHotels + " hotell, " + Language.FromText + " " + a.Hotels[e].Price + " Kr<img class='HotelImage' src='images/hotel_" + imgName + ".gif' alt='" + a.Hotels[e].Name + "' border='0' /></a></div>"; d += 1
    } a = ""; if (d != 0) { a = "<table><tr><td style='width:40px'><div class='HotelPriceElementImage'><img src='images/meny_hotell.gif' alt='Hotell' /></div></td>"; a = a + "<td>" + b + "</td></tr></table>" } $("#divSupplierResultHotel").html(a); $(".HotelPriceElement").addClass("tdprice"); $(".HotelPriceElement").hover(function() {
        $(this).removeClass("tdprice");
        $(this).addClass("ui-state-hover")
    }, function() { $(this).removeClass("ui-state-hover"); $(this).addClass("tdprice") })
} function setCurrentSearch(a) { currentSearch = a } function initSearch() { typeof showStatus == "function" && showStatus(); stopResultsTimer(); RBFlights.initFlights(); startSearching(); $("#searchresults").show() } function startSearchSuccess() { searchdone = false; SiteID == 1 && IsDebug == false && refreshAd(); startResultsTimer(); SavePropertiesOnSearch() } function startSearchFailure() { }
function startResultsTimer() { resultsTimer || (resultsTimer = setTimeout(flightResults_get, updateCounter < 9 ? 3E3 : 6E3)) } function stopResultsTimer() { resultsTimer != null && clearTimeout(resultsTimer); resultsTimer = null; updateCounter = 0 } function stopFlightSearch() { stopResultsTimer(); RBFlights.searchdone || RBFlights.searchDone(); stopSearching() } function flightResults_get() { updateCounter++; RB.FlightResults_Get(flightResults_get_Success, flightResults_get_Failure) }
function flightResults_get_Success(a) { if (a != "") { RBFlights.receivedResults(); try { eval(a) } catch (b) { alert(b) } } resultsTimer = null; searchdone ? stopSearching() : startResultsTimer() } function flightResults_get_Failure() { } function addFareAlert() { (new IFrameDialog("addFareAlert", 500, 390, "/AddFareAlert.aspx")).show() } var priceGraphDisplayDelay = 10;
function startSearching() { showSearchingControlsInit(); searchBeginTime = new Date; showSearchingControls(true); RBFlights.hideResults(); hideBigProgressId = hideBigProgress.bind(this, function() { RBFlights.receivedResults() }); showBigProgress() } function stopSearching() { typeof hideStatus == "function" && hideStatus(); showSearchingControls(false); unblockPage(); unblockList(); unblockCalendar(); unblockGraph(); $("html,body").animate({ scrollTop: $("#divSupplierResult").offset().top }, { duration: "slow", easing: "swing" }) }
function showSearchingControlsInit() { $(".show-on-search-init").each(function() { }); $(".hide-on-search-init").each(function() { }) } function showBigProgress() { bigProgressShown || (bigProgressShown = true) } function hideBigProgress(a) { if (bigProgressShown) { a(); bigProgressShown = false } } function showSearchingControls() { $(".show-on-search").each(function(a) { $(a).show() }); $(".hide-on-search").each(function(a) { $(a).hide() }) }
var IE7 = navigator.appVersion.indexOf("MSIE 7.") == -1 ? false : true, IE = navigator.appName == "Microsoft Internet Explorer" ? true : false, effectsEnabled = !IE7, initOneway = false, autoSearch = false, searchReady = false, showPG = false, pgMode = "";
function loaded() { var a = $("#buttonSearch"); $(a).removeClass("disabled"); $("#buttonSearch").bind("click", function() { searchClicked($(this)) }); $("#flightsearch input").each(function(b) { b.disabled = "" }); $("#flightsearch .radio").each(function(b) { b.disabled = "" }); searchReady = true; doAutoSearch() } function searchClicked() { } function pgInit() { } function pgHide() { } function checkShowGraph() { city_Orig.getCode(); city_Dest.getCode() } function updateSearch() { } function check() { }
function clearSelection() { pg.clearSelection() } function doAutoSearch() { autoSearch && search() } function showStatus() { searchReady = true } var mySearch = [], iNoOfSearch, orgdest, dtDateOut, dtDateBack; orgdest = ""; var ShownOnce; var WeekendListRefresh = ShownOnce = false, FirstWeekendLoad = true, aWeekendList = Array(38); aWeekendList[0] = "AAL"; aWeekendList[1] = "AAR"; aWeekendList[2] = "AES"; aWeekendList[3] = "AGH"; aWeekendList[4] = "ALF"; aWeekendList[5] = "BDU"; aWeekendList[6] = "BGO"; aWeekendList[7] = "BLL"; aWeekendList[8] = "BOO";
aWeekendList[9] = "CPH"; aWeekendList[10] = "EBJ"; aWeekendList[11] = "EVE"; aWeekendList[12] = "GOT"; aWeekendList[13] = "HAU"; aWeekendList[14] = "KKN"; aWeekendList[15] = "KLR"; aWeekendList[16] = "KRN"; aWeekendList[17] = "KRP"; aWeekendList[18] = "KRS"; aWeekendList[19] = "KSU"; aWeekendList[20] = "LKL"; aWeekendList[21] = "LLA"; aWeekendList[22] = "LYR"; aWeekendList[23] = "MMA"; aWeekendList[24] = "MMX"; aWeekendList[25] = "MOL"; aWeekendList[26] = "OSD"; aWeekendList[27] = "OSL"; aWeekendList[28] = "RNB"; aWeekendList[29] = "RYG"; aWeekendList[30] = "SDL";
aWeekendList[31] = "SFT"; aWeekendList[32] = "STO"; aWeekendList[33] = "SVG"; aWeekendList[34] = "TOS"; aWeekendList[35] = "TRD"; aWeekendList[36] = "TRF"; aWeekendList[37] = "UME";
var ClientIDs = { ctl00: "ctl00", ctl09: "ctl00_ctl09", Head1: "ctl00_Head1", ctl00: "ctl00_ctl00", ctl01: "ctl00_ctl01", description: "ctl00_description", keywords: "ctl00_keywords", ctl02: "ctl00_ctl02", ctl03: "ctl00_ctl03", ctl04: "ctl00_ctl04", ctl05: "ctl00_ctl05", ctl06: "ctl00_ctl06", ctl07: "ctl00_ctl07", ctl08: "ctl00_ctl08", ctl10: "ctl00_ctl10", form1: "aspnetForm", ScriptManager2: "ctl00_ScriptManager2", cphHeader: "ctl00_cphHeader", hypHome: "ctl00_cphHeader_hypHome", ImageMap222: "ctl00_cphHeader_ImageMap222", cphRightTop: "ctl00_cphRightTop",
    ctl00: "ctl00_cphRightTop_ctl00", cpRight: "ctl00_cpRight", ctl00: "ctl00_cpRight_ctl00", cphLeftMenu: "ctl00_cphLeftMenu", ctl00: "ctl00_cphLeftMenu_ctl00", DestinationSearch1: "ctl00_cphLeftMenu_DestinationSearch1", ss2: "ctl00_cphLeftMenu_DestinationSearch1_ss2", ctl00: "ctl00_cphLeftMenu_DestinationSearch1_ctl00", pnlSearch: "ctl00_cphLeftMenu_DestinationSearch1_pnlSearch", ctl01: "ctl00_cphLeftMenu_DestinationSearch1_ctl01", ig1: "ctl00_cphLeftMenu_DestinationSearch1_ig1", ctl02: "ctl00_cphLeftMenu_DestinationSearch1_ctl02",
    txtDestination: "ctl00_cphLeftMenu_DestinationSearch1_txtDestination", ctl03: "ctl00_cphLeftMenu_DestinationSearch1_ctl03", cmdFindDestination: "ctl00_cphLeftMenu_DestinationSearch1_cmdFindDestination", ctl04: "ctl00_cphLeftMenu_DestinationSearch1_ctl04", ctl01: "ctl00_cphLeftMenu_ctl01", NavMenu1: "ctl00_cphLeftMenu_NavMenu1", ctl01: "ctl00_cphLeftMenu_NavMenu1_ctl01", Img1: "ctl00_cphLeftMenu_NavMenu1_Img1", ctl02: "ctl00_cphLeftMenu_NavMenu1_ctl02", Img2: "ctl00_cphLeftMenu_NavMenu1_Img2", ctl03: "ctl00_cphLeftMenu_NavMenu1_ctl03",
    Img3: "ctl00_cphLeftMenu_NavMenu1_Img3", ctl04: "ctl00_cphLeftMenu_NavMenu1_ctl04", Img4: "ctl00_cphLeftMenu_NavMenu1_Img4", ctl05: "ctl00_cphLeftMenu_NavMenu1_ctl05", HyperLink2: "ctl00_cphLeftMenu_NavMenu1_HyperLink2", ctl06: "ctl00_cphLeftMenu_NavMenu1_ctl06", pnlDestination: "ctl00_cphLeftMenu_NavMenu1_pnlDestination", ctl07: "ctl00_cphLeftMenu_NavMenu1_ctl07", HyperLink12: "ctl00_cphLeftMenu_NavMenu1_HyperLink12", ctl08: "ctl00_cphLeftMenu_NavMenu1_ctl08", HyperLink13: "ctl00_cphLeftMenu_NavMenu1_HyperLink13", ctl09: "ctl00_cphLeftMenu_NavMenu1_ctl09",
    ctl10: "ctl00_cphLeftMenu_NavMenu1_ctl10", ctl00: "ctl00_cphLeftMenu_NavMenu1_ctl00", LowPriceListMenu1: "ctl00_cphLeftMenu_NavMenu1_LowPriceListMenu1", ctl11: "ctl00_cphLeftMenu_NavMenu1_ctl11", ctl02: "ctl00_cphLeftMenu_ctl02", cpMain: "ctl00_cpMain", ctl00: "ctl00_cpMain_ctl00", ucSearch1: "ctl00_cpMain_ucSearch1", ctl00: "ctl00_cpMain_ucSearch1_ctl00", rbReturn: "ctl00_cpMain_ucSearch1_rbReturn", ctl01: "ctl00_cpMain_ucSearch1_ctl01", rbOneWay: "ctl00_cpMain_ucSearch1_rbOneWay", ctl02: "ctl00_cpMain_ucSearch1_ctl02",
    ddlNoOfAdults: "ctl00_cpMain_ucSearch1_ddlNoOfAdults", ctl03: "ctl00_cpMain_ucSearch1_ctl03", ddlNoOfChildren: "ctl00_cpMain_ucSearch1_ddlNoOfChildren", ctl04: "ctl00_cpMain_ucSearch1_ctl04", ddlNoOfInfants: "ctl00_cpMain_ucSearch1_ddlNoOfInfants", ctl05: "ctl00_cpMain_ucSearch1_ctl05", lblTravelDays: "ctl00_cpMain_ucSearch1_lblTravelDays", ctl06: "ctl00_cpMain_ucSearch1_ctl06", pnlOut: "ctl00_cpMain_ucSearch1_pnlOut", ctl07: "ctl00_cpMain_ucSearch1_ctl07", lblOutTextDestination: "ctl00_cpMain_ucSearch1_lblOutTextDestination",
    ctl08: "ctl00_cpMain_ucSearch1_ctl08", lblBackTextDestination: "ctl00_cpMain_ucSearch1_lblBackTextDestination", ctl09: "ctl00_cpMain_ucSearch1_ctl09", ctl10: "ctl00_cpMain_ucSearch1_ctl10", lblOutDescription: "ctl00_cpMain_ucSearch1_lblOutDescription", ctl11: "ctl00_cpMain_ucSearch1_ctl11", lblBackDescription: "ctl00_cpMain_ucSearch1_lblBackDescription", ctl12: "ctl00_cpMain_ucSearch1_ctl12", lblOtherFlights: "ctl00_cpMain_ucSearch1_lblOtherFlights", ctl13: "ctl00_cpMain_ucSearch1_ctl13", lblTotal: "ctl00_cpMain_ucSearch1_lblTotal",
    ctl14: "ctl00_cpMain_ucSearch1_ctl14", txtOutDate: "ctl00_cpMain_ucSearch1_txtOutDate", ctl15: "ctl00_cpMain_ucSearch1_ctl15", txtBackDate: "ctl00_cpMain_ucSearch1_txtBackDate", ctl16: "ctl00_cpMain_ucSearch1_ctl16", txtOriginValLoad: "ctl00_cpMain_ucSearch1_txtOriginValLoad", ctl17: "ctl00_cpMain_ucSearch1_ctl17", txtOriginLoad: "ctl00_cpMain_ucSearch1_txtOriginLoad", ctl18: "ctl00_cpMain_ucSearch1_ctl18", txtDestinationValLoad: "ctl00_cpMain_ucSearch1_txtDestinationValLoad", ctl19: "ctl00_cpMain_ucSearch1_ctl19", txtDestinationLoad: "ctl00_cpMain_ucSearch1_txtDestinationLoad",
    ctl20: "ctl00_cpMain_ucSearch1_ctl20", txtLowPriceListLoad: "ctl00_cpMain_ucSearch1_txtLowPriceListLoad", ctl21: "ctl00_cpMain_ucSearch1_ctl21", txtSessionID: "ctl00_cpMain_ucSearch1_txtSessionID", ctl22: "ctl00_cpMain_ucSearch1_ctl22", txtUID: "ctl00_cpMain_ucSearch1_txtUID", ctl23: "ctl00_cpMain_ucSearch1_ctl23", ctl01: "ctl00_cpMain_ctl01", pnlSite1Sponsor: "ctl00_cpMain_pnlSite1Sponsor", ctl02: "ctl00_cpMain_ctl02", ctl03: "ctl00_cpMain_ctl03", ctl05: "ctl00_cpMain_ctl05", ctl09: "ctl00_cpMain_ctl09", ctl11: "ctl00_ctl11",
    txtWeekendLoad: "ctl00_cpMain_ucSearch1_txtWeekendLoad"
};
$(document).ready(function() {
    eraseCookie("hc1"); eraseCookie("hc2"); eraseCookie("hc3"); document.getElementById("content-wrapper").style.display = "inline"; $("#accLeftMenu2").accordion({ active: 0 }); iNoOfSearch = 0; $(function() {
        $(".fg-button:not(.ui-state-disabled)").hover(function() { $(this).addClass("ui-state-hover") }, function() { $(this).removeClass("ui-state-hover") }).mousedown(function() {
            $(this).parents(".fg-buttonset-single:first").find(".fg-button.ui-state-active").removeClass("ui-state-active"); $(this).is(".ui-state-active.fg-button-toggleable, .fg-buttonset-multi .ui-state-active") ?
$(this).removeClass("ui-state-active") : $(this).addClass("ui-state-active")
        }).mouseup(function() { $(this).is(".fg-button-toggleable, .fg-buttonset-single .fg-button,  .fg-buttonset-multi .fg-button") || $(this).removeClass("ui-state-active") })
    }); var a = window.location, b, d; b = a.host; d = IsDebug == true ? a.protocol + "//" + b + "/RBwww/Autocomplete.asmx/GetCompletionListJSON" : a.protocol + "//" + b + "/Autocomplete.asmx/GetCompletionListJSON"; $("#txtOrigin").autocomplete({ source: function(e, f) {
        var g = e.term.toLowerCase(), h =
this.element, i = this.element.data("autocompleteCache") || {}, j = false; $.each(i, function(n, m) { if (g == n && m.length > 0) { f($.map(m, function(l) { return { value: l.value, label: l.label, id: l.id} })); j = true } }); j || $.ajax({ url: d, data: "{ 'q': '" + e.term + "' }", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", dataFilter: function(n) { return n }, success: function(n) { n = n.d + ";"; n = eval(n); i[g] = n; h.data("autocompleteCache", i); f($.map(n, function(m) { return { value: m.value, label: m.label, id: m.id} })) }, error: function(n,
m) { alert(m) }
})
    }, minLength: 2, selectFirst: true, delay: 300, select: function() { $("#txtOriginVal").val("") }, change: function(e, f) { if (f.item == null) { $("#txtOrigin").val(""); $("#txtOriginVal").val(""); originSelected("") } else originSelected(f.item.id) }
    }); $("#txtDestination").autocomplete({ source: function(e, f) {
        var g = e.term.toLowerCase(), h = this.element, i = this.element.data("autocompleteCache") || {}, j = false; $.each(i, function(n, m) {
            if (g == n && m.length > 0) {
                f($.map(m, function(l) { return { value: l.value, label: l.label, id: l.id} }));
                j = true
            }
        }); j || $.ajax({ url: d, data: "{ 'q': '" + e.term + "' }", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", dataFilter: function(n) { return n }, success: function(n) { n = n.d + ";"; n = eval(n); i[g] = n; h.data("autocompleteCache", i); f($.map(n, function(m) { return { value: m.value, label: m.label, id: m.id} })) }, error: function(n, m) { alert(m) } })
    }, minLength: 2, selectFirst: true, delay: 300, select: function() { $("#txtDestination").val("") }, change: function(e, f) {
        if (f.item == null) {
            $("#txtDestination").val(""); $("#txtDestinationVal").val("");
            destinationSelected("")
        } else destinationSelected(f.item.id)
    }
    }); $(function() { $("#tabs").tabs() }); if (SiteID == 1) $.datepicker.setDefaults($.datepicker.regional.no); else if (SiteID == 2) $.datepicker.setDefaults($.datepicker.regional.sv); else SiteID == 3 && $.datepicker.setDefaults($.datepicker.regional.da); $("#dtOut").datepicker({ numberOfMonths: 2, firstDay: 1, dateFormat: "dd-mm-yy", showWeek: true, changeMonth: true, changeYear: true, minDate: 1, maxDate: "+1Y +3M", onSelect: SelectedDepatureDate, beforeShowDay: getOutDate });
    if (SiteID == 1) $("#dtOut").datepicker($.datepicker.regional.no); else if (SiteID == 2) $("#dtOut").datepicker($.datepicker.regional.sv); else SiteID == 3 && $("#dtOut").datepicker($.datepicker.regional.da); $("#dtBack").datepicker({ numberOfMonths: 2, firstDay: 1, dateFormat: "dd-mm-yy", showWeek: true, changeMonth: true, changeYear: true, minDate: 1, maxDate: "+1Y +3M", onSelect: SelectedArrivalDate, beforeShowDay: getInDate }); if (SiteID == 1) $("#dtBack").datepicker($.datepicker.regional.no); else if (SiteID == 2) $("#dtBack").datepicker($.datepicker.regional.sv);
    else SiteID == 3 && $("#dtBack").datepicker($.datepicker.regional.da); $get("txtOrigin").value = $get(ClientIDs.txtOriginLoad).value; $get("txtOriginVal").value = $get(ClientIDs.txtOriginValLoad).value; $get("txtDestination").value = $get(ClientIDs.txtDestinationLoad).value; $get("txtDestinationVal").value = $get(ClientIDs.txtDestinationValLoad).value; $get("txtLowPriceList").value = $get(ClientIDs.txtLowPriceListLoad).value; $get("txtWeekend").value = $get(ClientIDs.txtWeekendLoad).value; ClearAllResult(); HideCompleteResult();
    $tabs.bind("tabsenable", function(e, f) { var g, h; g = $get("txtOrigin").value.split(",")[0]; h = $get("txtDestination").value.split(",")[0]; if (f.index == 0) $("a#aTab2").text(Language.LowPriceGraph + " " + h); else if (f.index == 1) $("a#aTab3").text(Language.LowPriceList + " " + Language.FromText + " " + g); else f.index == 2 && $("a#aTab4").text("Weekendliste " + Language.FromText + " " + g) }); $tabs.bind("tabsdisable", function(e, f) {
        if (f.index == 0) $("a#aTab2").text(Language.LowPriceGraph); else if (f.index == 1) $("a#aTab3").text(Language.LowPriceList);
        else f.index == 2 && $("a#aTab4").text("Weekend")
    }); $tabs.bind("tabsshow", function(e, f) {
        if (f.index == 0) { DeleteCalendarSearchResultRows(); ClearAllResult(); ShowCompleteResult(); HideOutResult(); HideBackResult(); HidePriceList(); SetResultHeaderText(); GetData() } if (f.index == 1) { DeleteCalendarSearchResultRows(); ClearAllResult(); HideOutResult(); HideBackResult(); HidePriceList(); HideCompleteResult(); HideSearchButton(); HidePriceResult(); UpdateTravelDays(); SetResultHeaderText(); GetOtherFlightsOnDateProxy() } if (f.index ==
2) { DeleteCalendarSearchResultRows(); ClearAllResult(); HideOutResult(); HideBackResult(); HidePriceList(); HideCompleteResult(); HideSearchButton(); HidePriceResult(); SetResultHeaderText() }
    }); a = false; if (IsLowPriceList() == true) { $tabs.tabs("disable", 0); $tabs.tabs("enable", 1); $tabs.tabs("select", 1) } else if (IsWeekendList() == true) { $tabs.tabs("disable", 0); $tabs.tabs("disable", 1); $tabs.tabs("enable", 1); $tabs.tabs("disable", 2); $tabs.tabs("enable", 2); $tabs.tabs("select", 2); blockList() } else if (CheckIfLowPricelistExist() ==
true) { $tabs.tabs("enable", 0); $tabs.tabs("select", 0); GetData() } else if (CheckIfWeekendPricelistExist() == true) { $tabs.tabs("select", 1); $tabs.tabs("enable", 0); $("a#aTab2").text(Language.LowPriceGraph); $tabs.tabs("disable", 0) } else { $tabs.tabs("disable", 0); a = true } if (a) { $("#tabscontainer").hide(); $("#tabscontainerDummy").show() } else { $("#tabscontainer").show(); $("#tabscontainerDummy").hide() } if (CheckIfWeekendPricelistExist() == true) {
        a = $get(ClientIDs.txtOutDate); b = $get(ClientIDs.txtBackDate); dtDateOut = parseDate(a.value);
        dtDateBack = parseDate(b.value); $tabs.tabs("enable", 1)
    } SetResultHeaderText(); if (CheckIfWeekendPricelistExist() == true) { $tabs.tabs("disable", 2); $tabs.tabs("enable", 2) } else $tabs.tabs("disable", 2); $tabs.tabs("option", "spinner", "Henter data..."); $tabs.tabs("option", "ajaxOptions", { async: false }); $tabs.tabs("option", "ajaxOptions", { cache: false }); $tabs.tabs("option", "cache", { cache: true }); $tabs.bind("tabsselect", function(e, f) { f.index == 2 && blockList() }); $tabs.bind("tabsload", function() { unblockList() }); $tabs.bind("tabsshow",
function(e, f) { if (f.index == 2) { unblockList(); if (CheckIfWeekendPricelistExist() == true && WeekendListRefresh == true) { WeekendListRefresh = false; $tabs.tabs("load", 2) } else if (FirstWeekendLoad == true) { FirstWeekendLoad = false; blockList() } } }); $("#dialog").dialog({ resizeable: false, modal: true, bgiframe: true, autoOpen: false }); ShownOnce = false; $("#txtDestination").focus()
});
function SetResultHeaderText() {
    $("#dtOut").datepicker("getDate"); $("#dtBack").datepicker("getDate"); var a = $get("divResultHeader"), b, d; b = $get("txtOrigin").value.split(",")[0]; d = $get("txtDestination").value.split(",")[0]; a.innerHTML = "<span id='spanOriginDestination'>" + b + " -  " + d + "</span><span id='spanDate'>"; if (dtDateOut != null && dtDateBack != null) a.innerHTML = dtDateOut.valueOf() < dtDateBack.valueOf() ? a.innerHTML + "" + GetPrettyDateNoYear2(dtDateOut) + " - " + GetPrettyDateNoYear2(dtDateBack) : a.innerHTML + "" + GetPrettyDateNoYear2(dtDateOut);
    else if (dtDateOut != null) a.innerHTML = a.innerHTML + "" + GetPrettyDateNoYear2(dtDateOut); else if (dtDateBack != null) a.innerHTML = a.innerHTML + "" + GetPrettyDateNoYear2(dtDateBack); if (dtDateOut == null && dtDateBack == null) a.innerHTML += ""; a.innerHTML += "</span>"; b = document.getElementById("accordionCurrentHeader"); d = document.getElementById("accordionCurrentContent"); if (b != undefined) {
        var e = ""; if ($tabs.tabs("option", "selected") == 1) e = "Trykk Hent Fersk Pris knappen </BR> for \u00e5 sammenligne priser"; $(b).children().remove();
        $(d).children().remove(); $(b).append("<a href='#'>" + a.innerHTML + "</a>"); $(d).append("<div id='divt'><h2>" + e + "</h2></div>"); $("#accordionCurrent").accordion("activate", 0)
    }
} function callback() { } $.blockUI.defaults.css.border = "0px solid black"; $.blockUI.defaults.fadeOut = 200; function unblockList() { $("#divSearchHolder").unblock() }
function blockPage() { $("html").css({ overflow: "hidden" }); appendSearchHeader(); $.blockUI({ message: $("#divMessageContent"), overlayCSS: { backgroundColor: "whitesmoke" }, css: { border: "none", background: "transparent url(Images/bgPopupRedBorder.png) no-repeat", opacity: 0.9, color: "white", width: "800px", height: "800px"} }) }
function appendSearchHeader() { var a = $("#divMessageContent"), b = ""; b += '<table><tr><td align="center"><img src="Images/ajax-loader-small1.gif" /></td><td align="center"><span style=" font-weight:bolder; font-size:large; color:Gray;">' + Language.PleaseWait + "</span></td></tr></table>"; b += '<ul id="ulMessageContent"></ul>'; $(a).html(b) } function unblockPage() { $.unblockUI(); $("html").css({ overflow: "scroll" }) }
function blockList() { var a = $("#divSearchHolder"); $.browser.msie && a[0].style.removeAttribute("filter"); $.browser.msie && ($.browser.version.substr(0, 1) == "5" || $.browser.version.substr(0, 1) == "6" || $.browser.version.substr(0, 1) == "7") ? a.block({ message: "", css: { backgroundColor: "lightgray" }, overlayCSS: { backgroundColor: "#000", opacity: 0.2} }) : a.block({ message: $("img#displayLargeLoad"), css: { backgroundColor: "lightgray" }, overlayCSS: { backgroundColor: "#000", opacity: 0.2} }) }
function unblockGraph() { $("#divSearchHolder").unblock() }
function blockGraph() { var a = $("#divSearchHolder"); $.browser.msie && a[0].style.removeAttribute("filter"); $.browser.msie && (jQuery.browser.version.substr(0, 1) == "5" || $.browser.version.substr(0, 1) == "6" || $.browser.version.substr(0, 1) == "7") ? a.block({ message: "", css: { backgroundColor: "lightgray" }, overlayCSS: { backgroundColor: "#000", opacity: 0.2} }) : a.block({ message: $("img#displayLargeLoad"), css: { backgroundColor: "lightgray" }, overlayCSS: { backgroundColor: "#000", opacity: 0.2} }) }
function unblockCalendar() { $("#divSearchHolder").unblock() }
function blockCalendar() { var a = $("#divSearchHolder"); $.browser.msie && a[0].style.removeAttribute("filter"); $.browser.msie && ($.browser.version.substr(0, 1) == "5" || $.browser.version.substr(0, 1) == "6" || $.browser.version.substr(0, 1) == "7") ? a.block({ message: "", css: { backgroundColor: "lightgray" }, overlayCSS: { backgroundColor: "#000", opacity: 0.2} }) : a.block({ message: $("img#displayLargeLoad"), css: { backgroundColor: "lightgray" }, overlayCSS: { backgroundColor: "#000", opacity: 0.2} }) }
function SelectDestination(a, b, d, e) { $get("txtOrigin").value = d; $get("txtDestination").value = e; $get("txtOriginVal").value = a; $get("txtDestinationVal").value = b; $tabs.tabs("enable", 0); SetResultHeaderText(); if ($tabs.tabs("option", "selected") != 0) $("#tabs").tabs("select", 0); else { DeleteCalendarSearchResultRows(); ClearAllResult(); ShowCompleteResult(); HideOutResult(); HideBackResult(); HidePriceList(); GetData() } } var weekdays = []; weekdays[0] = "S\u00f8ndag"; weekdays[1] = "Mandag"; weekdays[2] = "Tirsdag"; weekdays[3] = "Onsdag";
weekdays[4] = "Torsdag"; weekdays[5] = "Fredag"; weekdays[6] = "L\u00f8rdag"; var weekdays2Char = []; weekdays2Char[0] = "s\u00f8"; weekdays2Char[1] = "ma"; weekdays2Char[2] = "ti"; weekdays2Char[3] = "on"; weekdays2Char[4] = "to"; weekdays2Char[5] = "fr"; weekdays2Char[6] = "l\u00f8"; var weekdays3Char = []; weekdays3Char[0] = "s\u00f8n"; weekdays3Char[1] = "man"; weekdays3Char[2] = "tir"; weekdays3Char[3] = "ons"; weekdays3Char[4] = "tor"; weekdays3Char[5] = "fre"; weekdays3Char[6] = "l\u00f8r"; var months3Char = []; months3Char[0] = "jan";
months3Char[1] = "feb"; months3Char[2] = "mar"; months3Char[3] = "apr"; months3Char[4] = "mai"; months3Char[5] = "jun"; months3Char[6] = "jul"; months3Char[7] = "aug"; months3Char[8] = "sep"; months3Char[9] = "okt"; months3Char[10] = "nov"; months3Char[11] = "des"; var monthNames = []; monthNames[0] = "Januar"; monthNames[1] = "Februar"; monthNames[2] = "Mars"; monthNames[3] = "April"; monthNames[4] = "Mai"; monthNames[5] = "Juni"; monthNames[6] = "Juli"; monthNames[7] = "August"; monthNames[8] = "September"; monthNames[9] = "Okttober"; monthNames[10] = "November";
monthNames[11] = "Desember"; function GetPrettyDate(a) { var b = a.getDay(), d = a.getMonth(); return weekdays2Char[b] + " " + a.getDate() + ". " + months3Char[d] + " " + a.getFullYear() } function GetPrettyDateNoYear(a) { var b = a.getDay(), d = a.getMonth(); return weekdays2Char[b] + " " + a.getDate() + " " + months3Char[d] } function GetPrettyDateNoYear2(a) { var b = a.getDay(), d = a.getMonth(); return weekdays3Char[b] + " " + a.getDate() + " " + monthNames[d] }
function SetOutPrice(a, b) { var d = $get(ClientIDs.lblOutDescription); d.innerHTML = b; d.value = a; UpdateTotalPrice() } function SetBackPrice(a, b) { var d = $get(ClientIDs.lblBackDescription); d.innerHTML = b; d.value = a; UpdateTotalPrice() }
function UpdateTotalPrice() {
    var a = $get(ClientIDs.lblOutDescription), b = $get(ClientIDs.lblBackDescription), d = $get(ClientIDs.lblTotal), e = $get(ClientIDs.rbReturn); ShowResGraph(); if (e.checked == true) if (a.value != undefined && b.value != undefined && a.value != "" && b.value != "") { a = parseInt(a.value) + parseInt(b.value); a += ""; d.innerHTML = "<b>Totalt: " + a + " Kr</b>"; ShowPriceResult(); ShowSearchButton(); $tabs.tabs("enable", 1) } else { d.innerHTML = ""; HideSearchButton() } else {
        $tabs.tabs("disable", 1); if (a.value != "") {
            d.innerHTML = "<b>Totalt: " +
a.value + " Kr</b>"; ShowPriceResult(); ShowSearchButton()
        } else { d.innerHTML = ""; HideSearchButton() }
    } SetResultHeaderText()
} function calendarPicker(a) { window.open("DatePicker.aspx?field=" + a, "calendarPopup", "width=250,height=190,resizable=yes") } var dout, dback;
function RbSelected(a) { if (a == "return") document.getElementById("placeholderBackContainer").style.display = "inline"; else { document.getElementById("placeholderBackContainer").style.display = "none"; a = $get(ClientIDs.txtBackDate); if ($tabs.tabs("option", "selected") == 0) { SetBackPrice("", ""); HideBackResult() } a.value = ""; dback = null } }
function GetData() { SetOutPrice("", ""); SetBackPrice("", ""); var a = $get("txtOriginVal").value, b = $get("txtDestinationVal").value; if (a != "" && b != "") if (adresPre != undefined) { if (adresPre != null) { RenderData(adresPre); adresPre = null } } else { blockGraph(); FlightData.GetPriceData(a, b, OnSucceeded_GetData, OnFailed_GetData) } return false }
function CallPageMethod(a, b, d) { var e = "", f = arguments.length; if (f > 3) for (var g = 3; g < f - 1; g += 2) { if (e.length != 0) e += ","; e += '"' + arguments[g] + '":"' + arguments[g + 1] + '"' } $.ajax({ type: "POST", url: window.location.href + "/" + a, data: "{" + e + "}", contentType: "application/json; charset=utf-8", dataType: "json", success: b, fail: d }) } function OnSucceeded_GetData(a) { unblockGraph(); RenderData(a) } function OnFailed_GetData() { unblockGraph(); $("#tabscontainer").hide() }
function RenderData(a) {
    function b(p, o, k) { $('<div id="tooltip">' + k + "</div>").css({ position: "absolute", display: "block", top: o + 1, left: p + 15, border: "1px solid #fdd", padding: "2px", "background-color": "#fee", opacity: 1 }).appendTo("body") } var d = a[0], e = a[1]; a = a[2]; var f = ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"]; d = eval(d); e = eval(e); a = eval(a); if (a != 0) { document.getElementById("placeholderOut").style.width = 480 * a + "px"; document.getElementById("placeholderBack").style.width = 480 * a + "px" } else {
        document.getElementById("placeholderOut").style.width =
"500px"; document.getElementById("placeholderBack").style.width = "500px"
    } document.getElementById("divGraphContainer").style.width = "590px"; var g; a = { xaxis: { mode: "time", labelWidth: 15, tickSize: [1, "day"], tickFormatter: function(p) { p = new Date(p); g = p.getUTCDate(); var o; o = g == 15 ? p.getUTCDate() + "<br>" + f[p.getUTCMonth()] : g; return p.getUTCMonth() % 2 == 0 ? "<DIV class='alt'>" + o + "</DIV>" : "<DIV class='reg'>" + o + "</DIV>" } }, selection: { mode: "null" }, grid: { markings: function(p) {
        var o = [], k = new Date(p.xaxis.min); k.setUTCDate(k.getUTCDate() -
(k.getUTCDay() + 1) % 7); k.setUTCDate(k.getUTCDate() - (k.getUTCDay() + 1) % 6); k.setUTCSeconds(0); k.setUTCMinutes(0); k.setUTCHours(0); k = k.getTime(); do { o.push({ xaxis: { from: k, to: k + 1728E5} }); k += 6048E5 } while (k < p.xaxis.max); return o
    }, hoverable: true, clickable: true
    }, lines: { show: true }, points: { show: true, radius: 4 }, bars: { show: false, barWidth: 6, align: "center" }, yaxis: { min: 0 }, colors: ["#CC0000", "#dba255", "#919733"]
    }; var h = $.plot($("#placeholderOut"), [{ data: d}], a), i = $.plot($("#placeholderBack"), [{ data: e}], a), j = null; $("#placeholderOut").bind("plothover",
function(p, o, k) { if (k) { if (j != k.datapoint[0].toFixed(2)) { j = k.datapoint[0].toFixed(2); $("#tooltip").remove(); p = k.datapoint[0].toFixed(2); o = k.datapoint[1].toFixed(2); var q = new Date(p); q.setTime(p); q.getDay(); b(k.pageX, k.pageY, o + " Kr <BR>Dato: " + GetPrettyDate(q)) } } else { $("#tooltip").remove(); j = null } }); var n = null; $("#placeholderBack").bind("plothover", function(p, o, k) {
    if (k) {
        if (n != k.datapoint[0].toFixed(2)) {
            n = k.datapoint[0].toFixed(2); $("#tooltip").remove(); p = k.datapoint[0].toFixed(2); o = k.datapoint[1].toFixed(2);
            var q = new Date(p); q.setTime(p); b(k.pageX, k.pageY, o + " Kr <BR>Dato: " + GetPrettyDate(q))
        }
    } else { $("#tooltip").remove(); n = null }
}); var m = null; $("#placeholderOut").bind("plotclick", function(p, o, k) {
    dtDateOut = null; if (k) {
        p = $get(ClientIDs.txtOutDate); o = k.datapoint[0].toFixed(2); var q = k.datapoint[1].toFixed(2), r = new Date(o); r.setTime(o); if (m != k.datapoint) {
            ShowOutResult(); $("#clickdataoutDate").text("" + GetPrettyDate(r) + ""); $("#clickdataoutPrice").text("" + parseInt(q) + ""); SetOutPrice(q, r.toLocaleDateString() + " : " +
q + " Kr"); p.value = r.toDateString(); dtDateOut = r; dout = o; m != null && h.unhighlight(k.series, m); h.highlight(k.series, k.datapoint)
        } else { SetOutPrice("", ""); p.value = ""; dout = dtDateOut = null; $("#clickdataoutDate").text(""); $("#clickdataoutPrice").text(""); ClearOutResult(); HideOutResult(); h.unhighlight(k.series, k.datapoint) } m = k.datapoint
    } else m = m; if (dtDateOut != null && dtDateBack != null) dtDateOut.valueOf() >= dtDateBack.valueOf() || $tabs.tabs("enable", 1); $("#dtOut").datepicker("setDate", dtDateOut); UpdateTravelDays(); SetResultHeaderText()
});
    var l = null; $("#placeholderBack").bind("plotclick", function(p, o, k) {
        dtDateBack = null; if (k) {
            p = $get(ClientIDs.txtBackDate); o = k.datapoint[0].toFixed(2); var q = k.datapoint[1].toFixed(2), r = new Date(o); r.setTime(o); if (l != k.datapoint) { ShowBackResult(); $("#clickdatabackDate").text("" + GetPrettyDate(r) + ""); $("#clickdatabackPrice").text("" + parseInt(q) + ""); SetBackPrice(q, r.toLocaleDateString() + " : " + q + " Kr"); p.value = r.toDateString(); dtDateBack = r; dback = o; l != null && i.unhighlight(k.series, l); i.highlight(k.series, k.datapoint) } else {
                $("#clickdatabackDate").text("");
                $("#clickdatabackPrice").text(""); p.value = ""; dback = dtDateBack = null; SetBackPrice("", ""); ClearBackResult(); HideBackResult(); i.unhighlight(k.series, k.datapoint)
            } l = k.datapoint
        } else l = l; if (dtDateOut != null && dtDateBack != null) { dtDateOut.valueOf(); dtDateBack.valueOf() } $("#dtBack").datepicker("setDate", dtDateBack); UpdateTravelDays(); SetResultHeaderText()
    })
}
function DateOutSelected() { var a = $("#dtOut").datepicker("getDate"), b = $("#dtBack").datepicker("getDate"); if (a == null || b == null) { if (a != null && b == null) { $("#dtBack").datepicker("setDate", a); dtDateBack = $("#dtOut").datepicker("getDate") } } else if (a.valueOf() > b.valueOf()) { $("#dtBack").datepicker("setDate", a); dtDateBack = $("#dtOut").datepicker("getDate") } dtDateOut = $("#dtOut").datepicker("getDate"); UpdateTravelDays() }
function DateHomeSelected() { var a = $("#dtOut").datepicker("getDate"), b = $("#dtBack").datepicker("getDate"); if (a == null || b == null) { if (a == null && b != null) { $("#dtOut").datepicker("setDate", b); dtDateOut = $("#dtOut").datepicker("getDate") } } else if (a.valueOf() > b.valueOf()) { $("#dtOut").datepicker("setDate", b); dtDateOut = $("#dtOut").datepicker("getDate") } dtDateBack = $("#dtBack").datepicker("getDate"); UpdateTravelDays() }
function UpdateTravelDays() { var a = $("#dtOut").datepicker("getDate"), b = $("#dtBack").datepicker("getDate"), d = $get(ClientIDs.lblTravelDays); d.innerHTML = ""; if (!(a == null || b == null)) if (a.valueOf() < b.valueOf()) { d.innerHTML = Language.NoOfDays + ":&nbsp;<b>" + Math.round((b - a) / 864E5) + "</b>"; $tabs.tabs("enable", 1); $("#btnSearchCalendar").effect("highlight", {}, 150, callback) } $tabs.tabs("option", "selected") == 1 && GetOtherFlightsOnDateProxy(); SetResultHeaderText() }
function getOutDate(a) { var b = new Date; b = new Date(b.getFullYear(), b.getMonth(), b.getDate()); var d; d = $("#dtBack").datepicker("getDate"); return b.getTime() == a.getTime() ? [false, "today"] : d != null ? a.getMonth() == d.getMonth() && a.getDate() == d.getDate() ? [true, "out_day"] : [true, ""] : [true, ""] }
function getInDate(a) { var b = new Date; b = new Date(b.getFullYear(), b.getMonth(), b.getDate()); var d; d = $("#dtOut").datepicker("getDate"); return b.getTime() == a.getTime() ? [false, "today"] : d != null ? a.getMonth() == d.getMonth() && a.getDate() == d.getDate() ? [true, "in_day"] : a < d ? [true, "beforein_day"] : [true, ""] : [true, ""] } function SelectedArrivalDate() { DateHomeSelected(Date) } function SelectedDepatureDate() { DateOutSelected(Date) } function ClearAllResult() { ClearOutResult(); ClearBackResult() }
function HideAllResult() { HideOutResult(); HideBackResult(); HidePriceList(); HidePriceResult(); HideSearchButton() } function ClearOutResult() { $("#clickdataoutDate").text(""); $("#clickdataoutPrice").text("") } function ClearBackResult() { $("#clickdatabackDate").text(""); $("#clickdatabackPrice").text("") } function ShowResGraph() { $("#resGraph:hidden").removeAttr("style").hide().fadeIn() } function HideCompleteResult() { document.getElementById("divResult").style.display = "none" }
function ShowCompleteResult() { document.getElementById("divResult").style.display = "inline" } function HideOutResult() { document.getElementById("divResultOut").style.display = "none" } function HideBackResult() { document.getElementById("divResultBack").style.display = "none" } function ShowOutResult() { document.getElementById("divResultOut").style.display = "inline" } function ShowBackResult() { document.getElementById("divResultBack").style.display = "inline" }
function HidePriceResult() { document.getElementById("divResultTotal").style.display = "none" } function ShowPriceResult() { document.getElementById("divResultTotal").style.display = "inline" } function HideSearchButton() { document.getElementById("divResultSearch").style.display = "none" } function ShowSearchButton() { document.getElementById("divResultSearch").style.display = "inline"; $("#btnSearchGraph").effect("highlight", {}, 150, callback) }
function ShowCityDescription() { document.getElementById("divCityDescription").style.display = "inline" } function HideCityDescription() { $("#divCityDescription").fadeOut("normal"); $("#divCityCountryLinks").fadeOut("normal"); $("#divCountryDescription").fadeOut("normal") } function HidePriceList() { document.getElementById("divResultPriceList").style.display = "none" } function ShowPriceList() { document.getElementById("divResultPriceList").style.display = "inline" }
function DeleteAllOtherFlights() { for (var a = document.getElementById("tOtherFlights"), b = a.rows; b.length > 0; ) a.deleteRow(b.length - 1) } function DeleteCalendarSearchResultRows() { } function RenderResultData(a) { mySearch[iNoOfSearch] = a; iNoOfSearch != 0 && DeleteCalendarSearchResultRows(); RenderResultDataCurrent(a) } var priceArray = [], searchArray = [];
function RenderResultDataCurrent(a) {
    var b, d, e, f = document.getElementById("accordionCurrent"); $("#accordionCurrent").children().remove(); $("#accordionCurrent").accordion("destroy"); var g = [], h, i, j; i = h = 0; priceArray[iNoOfSearch] = a; var n, m; m = n = ""; var l, p; l = priceArray.length > 5 ? priceArray.length - 5 : 0; for (var o = priceArray.length - 1; o >= l; --o) {
        p = m = n = ""; i = h = 0; a = priceArray[o]; b = d = e = ""; for (x in a) {
            g = a[x].value.split("=>"); if (g[4] != "flights") if (g[0] == "HotelsCom") b = g[3]; else if (g[0] == "Expedia") d = g[3]; else if (g[0] ==
"Venere") e = g[3]
        } for (x in a) {
            g = a[x].value.split("=>"); if (g[4] == "flights") {
                if (h == 0) p = g[2]; h += 1; j = g[0]; n = IsDebug == true ? n + "<div class='FlightPriceElement' id='FlightPrice" + h + "'><a onclick=javascript:ShowDialog('" + escape(b) + "','" + escape(d) + "','" + escape(e) + "'); rel='nofollow' href='/RBwww/xt_OnlineSearchRedirect.aspx?ID=" + g[3] + "' target='_blank'>" + g[2] + "" : n + "<div class='FlightPriceElement' id='FlightPrice" + h + "'><a onclick=javascript:ShowDialog('" + escape(b) + "','" + escape(d) + "','" + escape(e) + "'); rel='nofollow' href='/xt_OnlineSearchRedirect.aspx?ID=" +
g[3] + "' target='_blank'>" + g[2] + ""; n = n + "<img src='images/" + j + ".gif' alt='" + g[0] + "' border='0' /></a></div>"
            } else {
                i += 1; j = g[0]; m = IsDebug == true ? m + "<div class='HotelPriceElement' id='HotelPrice" + i + "'><a rel='nofollow' href='/RBwww/xt_OnlineSearchRedirect.aspx?ID=" + g[3] + "' target='_blank'>" + g[4] + g[2] + "<img class='HotelImage' src='images/hotel_" + j + ".gif' alt='" + g[0] + "' border='0' /></a></div>" : j == "Finn hotell hos ReisBillig.no" ? m + "<div class='HotelPriceElement' id='HotelPrice" + i + "'><a rel='nofollow' href='/xt_OnlineSearchRedirect.aspx?ID=" +
g[3] + "' target='_blank'>" + j + "</a></div>" : m + "<div class='HotelPriceElement' id='HotelPrice" + i + "'><a rel='nofollow' href='/xt_OnlineSearchRedirect.aspx?ID=" + g[3] + "' target='_blank'>" + g[4] + g[2] + "<img class='HotelImage' src='images/hotel_" + j + ".gif' alt='" + g[0] + "' border='0' /></a></div>"
            }
        } a = "<h3 id='accordionCurrentHeader'><a href='#'>" + searchArray[o] + "<span id='spanPrice'> Fra " + p + "</span></a></h3>"; n = "<div id ='accordionCurrentContent'><table cellpadding='0px' cellspacing='0px' width='100%' id='tblResult'><tr><td style='width:30px'><div class='FlightPriceElementImage'><img src='images/meny_fly.gif' alt='Fly' /></div></td><td style='width:550px;' align='left'><div id ='accordionCurrentContentFlights' style='text-align:left;'><ul><li><div class='FlightPriceElements'>" +
n + "</div></li></ul></div></td></tr><tr><td><hr /></td><td><hr /></td></tr><tr><td style='width:40px'><div class='HotelPriceElementImage'><img src='images/meny_hotell.gif' alt='Hotell' /></div></td><td style='width:540px' align='left'><div id ='accordionCurrentContentHotels'><ul><li><div class='HotelPriceElements'>" + m + "</div></li></ul></div></td></tr></table></div>"; $(f).append(a); $(f).append(n)
    } iNoOfSearch += 1; ShowCompleteResult(); ShowPriceList(); $(".FlightPriceElement").addClass("tdprice"); $(".FlightPriceElement").hover(function() {
        $(this).removeClass("tdprice");
        $(this).addClass("ui-state-hover")
    }, function() { $(this).removeClass("ui-state-hover"); $(this).addClass("tdprice") }); $(".HotelPriceElement").addClass("tdprice"); $(".HotelPriceElement").hover(function() { $(this).removeClass("tdprice"); $(this).addClass("ui-state-hover") }, function() { $(this).removeClass("ui-state-hover"); $(this).addClass("tdprice") }); $("#accordionCurrent").accordion()
}
function OnFlightSearch__Completed(a) { SearchInProgress = 0; $tabs.tabs("option", "selected"); unblockList(); var b = []; $(a).find("string").each(function() { b[b.length] = { value: $(this).text()} }); RenderResultData(b); $(".adload").colorbox.close(); $("#HotelPrice1").effect("highlight", {}, 200, callback) } function OnFlightSearch__Error(a) { SearchInProgress = 0; $tabs.tabs("option", "selected"); unblockList(); $(".adload").colorbox.close(); alert("Error fs: " + a.get_message()) }
function OnOtherFlightsOnDate_Completed(a) { var b = $tabs.tabs("option", "selected"); if (b == 0) unblockGraph(); else b == 1 && unblockList(); var d = []; $(a).find("string").each(function() { d[d.length] = { value: $(this).text()} }); RenderOtherFlights(d) } function OnOtherFlightsOnDate_Error(a) { $tabs.tabs("option", "selected"); unblockList(); alert("Error of: " + a.get_message()) }
function GetOtherFlightsOnDateProxy() { var a = $("#dtOut").datepicker("getDate"), b = $("#dtBack").datepicker("getDate"); if (a == null || b == null) { DeleteAllOtherFlights(); document.getElementById("divOtherFlightsMessage").style.display = "inline" } else if (a.valueOf() < b.valueOf()) { document.getElementById("divOtherFlightsMessage").style.display = "none"; GetOtherFlightsOnDate() } else { DeleteAllOtherFlights(); document.getElementById("divOtherFlightsMessage").style.display = "inline" } }
function GetOtherFlightsOnDate() {
    var a = $get("txtOriginVal").value, b = $get("txtDestinationVal").value, d = $("#dtOut").datepicker("getDate"), e = $("#dtBack").datepicker("getDate"); if (d != null && e != null) { d = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate(); IsRoundTrip(); e = e.getFullYear() + "-" + (e.getMonth() + 1) + "-" + e.getDate(); var f = $tabs.tabs("option", "selected"); if (f == 0) blockGraph(); else f == 1 && blockList(); FlightData.GetOtherFlightsOnDate(1, a, b, d, e, OnOtherFlightsOnDate_Completed, OnOtherFlightsOnDate_Error) } DeleteCalendarSearchResultRows();
    HidePriceList()
} var SearchInProgress; SearchInProgress = 0;
function SearchFlights() {
    if (ValidateBeforeSearch() == true) {
        HideCityDescription(); var a = $get(ClientIDs.ddlNoOfAdults).value, b = $get(ClientIDs.ddlNoOfChildren).value, d = $get(ClientIDs.ddlNoOfInfants).value, e = $get("txtOriginVal").value, f = $get("txtDestinationVal").value; SessionID = $get(ClientIDs.txtSessionID).value; var g = $("#dtOut").datepicker("getDate"), h = g.getFullYear() + "-" + (g.getMonth() + 1) + "-" + g.getDate(), i = IsRoundTrip(); i == false && $("#dtBack").datepicker("setDate", g); g = $("#dtBack").datepicker("getDate");
        g = g.getFullYear() + "-" + (g.getMonth() + 1) + "-" + g.getDate(); SearchInProgress = 1; var j = $tabs.tabs("option", "selected"); if (j == 0) blockGraph(); else j == 1 && blockList(); j = $get("divResultHeader"); searchArray[iNoOfSearch] = j.innerHTML; ShownOnce = false; $(".adload").colorbox({ overlayClose: false, open: true, iframe: true, innerWidth: 380, innerHeight: 380 }); FlightData.StartSnag(1, UID, "", e, f, h, g, a, b, d, i, SessionID, "", OnFlightSearch__Completed, OnFlightSearch__Error); searchReady = false; DeleteCalendarSearchResultRows(); HidePriceList()
    } return false
}
function SearchFlightsNew() {
    if (ValidateBeforeSearch() == true) {
        HideCityDescription(); var a = $get(ClientIDs.ddlNoOfAdults).value, b = $get(ClientIDs.ddlNoOfChildren).value, d = $get(ClientIDs.ddlNoOfInfants).value, e = $get("txtOriginVal").value, f = $get("txtDestinationVal").value; SessionID = $get(ClientIDs.txtSessionID).value; var g = $("#dtOut").datepicker("getDate"), h = g.getFullYear(), i = g.getMonth() + 1, j = g.getDate(); if (i >= 10) i += ""; else i = "0" + i; if (j >= 10) j += ""; else j = "0" + j; h = h + "" + i + "" + j; i = IsRoundTrip(); i == false && $("#dtBack").datepicker("setDate",
g); j = $("#dtBack").datepicker("getDate"); var n = j.getFullYear(), m = j.getMonth() + 1, l = j.getDate(); if (m >= 10) m += ""; else m = "0" + m; if (l >= 10) l += ""; else l = "0" + l; n = n + "" + m + "" + l; SearchInProgress = 1; $tabs.tabs("option", "selected"); blockPage(); ShownOnce = false; startSearch(SiteID, e, f, h, n, g, j, !i, a, b, d)
    } return false
}
function ValidateBeforeSearch() {
    var a = $get("txtOrigin").value, b = $get("txtDestination").value, d = IsRoundTrip(); if ($tabs.tabs("option", "selected") == 0) { $("#dtOut").datepicker("setDate", dtDateOut); $("#dtBack").datepicker("setDate", dtDateBack) } var e = $("#dtOut").datepicker("getDate"), f = $("#dtBack").datepicker("getDate"), g = new Date, h = new Date; h.setFullYear(h.getFullYear() + 1); ShownOnce = false; if (a == b) { alert("Kan ikke ha samme flyplass for avreise og ankomst"); return false } if (a.length <= 2) {
        alert("Vennligst anngi avreise by/flyplass");
        return false
    } else if (b.length <= 2) { alert("Vennligst anngi ankomst by/flyplass"); return false } else if (e == null) { alert("Vennligst anngi dato for utreise"); return false } else if (d == true && f == null) { alert("Vennligst anngi dato for hjemmreise"); return false } else if (d == true && f < e) { alert("Utreise dato m\u00e5 v\u00e6re tidligere enn hjemmreise dato"); return false } else if (d == true && f != null && e != null) if (Math.round((f - e) / 864E5) <= 0) { alert("Hjemmreise dato m\u00e5 v\u00e6re senere enn utreisedato"); return false } else return true;
    else if (d == true && f > h) { alert("Utreise dato kan ikke v\u00e6re mer enn 1 \u00e5r frem i tid"); return false } else if (e < g) { alert("Utreise dato kan ikke v\u00e6re tidligere enn dagens dato"); return false } else return true
} function IsRoundTrip() { return $get(ClientIDs.rbReturn).checked == true ? true : false }
function RenderOtherFlights(a) {
    var b, d; $get("txtOriginVal"); $get("txtDestinationVal"); var e = $("#dtOut").datepicker("getDate"), f = $("#dtOut").datepicker("getDate"), g = $("#dtOut").datepicker("getDate"), h = $("#dtBack").datepicker("getDate"), i = $("#dtBack").datepicker("getDate"), j = $("#dtBack").datepicker("getDate"), n = e.getFullYear() + "-" + (e.getMonth() + 1) + "-" + e.getDate(), m = h.getFullYear() + "-" + (h.getMonth() + 1) + "-" + h.getDate(); f.setDate(f.getDate() - 7); g.setDate(g.getDate() + 7); i.setDate(i.getDate() - 7); j.setDate(j.getDate() +
7); IsRoundTrip(); DeleteAllOtherFlights(); var l = []; tbody = document.getElementById("tOtherFlightsBody"); b = tbody.insertRow(tbody.rows.length); d = b.insertCell(b.cells.length); d.colSpan = 6; d.innerHTML = "<br>"; b = tbody.insertRow(tbody.rows.length); b.style.color = "#6BBA65"; d = b.insertCell(b.cells.length); d.setAttribute("align", "left"); d.innerHTML = ""; d = b.insertCell(b.cells.length); d.setAttribute("align", "center"); d.innerHTML = GetPrettyDateNoYear(f) + " - " + GetPrettyDateNoYear(i); d = b.insertCell(b.cells.length); d.setAttribute("align",
"center"); d.innerHTML = "<b>" + GetPrettyDateNoYear(e) + " - " + GetPrettyDateNoYear(h) + "</b>"; d = b.insertCell(b.cells.length); d.setAttribute("align", "center"); d.innerHTML = GetPrettyDateNoYear(g) + " - " + GetPrettyDateNoYear(j); b = tbody.insertRow(tbody.rows.length); d = b.insertCell(b.cells.length); b.style.color = "#6BBA65"; d.setAttribute("align", "left"); d.innerHTML = ""; d = b.insertCell(b.cells.length); d.setAttribute("align", "center"); d.innerHTML = "(1 " + Language.WeekBefore + ")"; d = b.insertCell(b.cells.length); d.setAttribute("align",
"center"); d.innerHTML = "<h1><b>" + Language.SelectedDates + "</b><h1>"; d = b.insertCell(b.cells.length); d.setAttribute("align", "center"); d.innerHTML = "(1 " + Language.WeekAfter + ")"; b = tbody.insertRow(tbody.rows.length); d = b.insertCell(b.cells.length); d.setAttribute("align", "left"); d.style.color = "#6BBA65"; d.innerHTML = "Fra <b>" + $get("txtOrigin").value + "</b> til:"; d = b.insertCell(b.cells.length); d.setAttribute("align", "center"); d.innerHTML = "Antatt pris"; d = b.insertCell(b.cells.length); d.setAttribute("align", "center");
    d.innerHTML = "Antatt pris"; d = b.insertCell(b.cells.length); d.setAttribute("align", "center"); d.innerHTML = "Antatt pris"; for (var p = $get(ClientIDs.ddlNoOfAdults).value, o = $get(ClientIDs.ddlNoOfChildren).value, k = $get(ClientIDs.ddlNoOfInfants).value, q = a.length, r = 0; r < q; r++) {
        l = a[r].value.split("=>"); b = tbody.insertRow(tbody.rows.length); d = b.insertCell(b.cells.length); d.setAttribute("align", "left"); d.innerHTML = l[3]; d = b.insertCell(b.cells.length); d.setAttribute("align", "center"); d.innerHTML = l[5]; n = f.getFullYear() +
"-" + (f.getMonth() + 1) + "-" + f.getDate(); m = i.getFullYear() + "-" + (i.getMonth() + 1) + "-" + i.getDate(); d.innerHTML = l[5] != "" ? $.browser.msie ? "<A HREF=javascript:DoMySearchNew('" + escape(l[0]) + "','" + escape(l[1]) + "','" + escape(l[2]) + "','" + escape(l[3]) + "','" + n + "','" + m + "','1','" + p + "','" + o + "','" + k + "','1','1','1','0')>" + l[5] + " " + seletecCurrency + "</A>" : "<A HREF=javascript:DoMySearchNew('" + encodeURIComponent(l[0]) + "','" + encodeURIComponent(l[1]) + "','" + encodeURIComponent(l[2]) + "','" + encodeURIComponent(l[3]) + "','" + n + "','" +
m + "','1','" + p + "','" + o + "','" + k + "','1','1','1','0')>" + l[5] + " " + seletecCurrency + "</A>" : ""; d = b.insertCell(b.cells.length); d.setAttribute("align", "center"); d.innerHTML = "<b>" + l[6] + "</b>"; n = e.getFullYear() + "-" + (e.getMonth() + 1) + "-" + e.getDate(); m = h.getFullYear() + "-" + (h.getMonth() + 1) + "-" + h.getDate(); d.innerHTML = l[6] != "" ? $.browser.msie ? "<b><A HREF=javascript:DoMySearchNew('" + escape(l[0]) + "','" + escape(l[1]) + "','" + escape(l[2]) + "','" + escape(l[3]) + "','" + n + "','" + m + "','1','" + p + "','" + o + "','" + k + "','1','1','1','0')>" +
l[6] + " " + seletecCurrency + "</A></b>" : "<b><A HREF=javascript:DoMySearchNew('" + encodeURIComponent(l[0]) + "','" + encodeURIComponent(l[1]) + "','" + encodeURIComponent(l[2]) + "','" + encodeURIComponent(l[3]) + "','" + n + "','" + m + "','1','" + p + "','" + o + "','" + k + "','1','1','1','0')>" + l[6] + " " + seletecCurrency + "</A></b>" : ""; d = b.insertCell(b.cells.length); d.setAttribute("align", "center"); d.innerHTML = l[7]; n = g.getFullYear() + "-" + (g.getMonth() + 1) + "-" + g.getDate(); m = j.getFullYear() + "-" + (j.getMonth() + 1) + "-" + j.getDate(); d.innerHTML =
l[7] != "" ? $.browser.msie ? "<A HREF=javascript:DoMySearchNew('" + escape(l[0]) + "','" + escape(l[1]) + "','" + escape(l[2]) + "','" + escape(l[3]) + "','" + n + "','" + m + "','1','" + p + "','" + o + "','" + k + "','1','1','1','0')>" + l[7] + " " + seletecCurrency + "</A>" : "<A HREF=javascript:DoMySearchNew('" + encodeURIComponent(l[0]) + "','" + encodeURIComponent(l[1]) + "','" + encodeURIComponent(l[2]) + "','" + encodeURIComponent(l[3]) + "','" + n + "','" + m + "','1','" + p + "','" + o + "','" + k + "','1','1','1','0')>" + l[7] + " " + seletecCurrency + "</A>" : ""
    }
}
function DisableOtherFlights() { DeleteAllOtherFlights() } function DateAdd(a, b, d) { switch (a) { case "d": b.setDate(b.getDate() + d); break; case "m": b.setMonth(b.getMonth() + d); break; case "y": b.setYear(b.getFullYear() + d); break; case "h": b.setHours(b.getHours() + d); break; case "n": b.setMinutes(b.getMinutes() + d); break; case "s": b.setSeconds(b.getSeconds() + d) } return b }
function DoMySearchNew(a, b, d, e, f, g, h, i, j, n) {
    $get(ClientIDs.ddlNoOfAdults).value = i; $get(ClientIDs.ddlNoOfChildren).value = j; $get(ClientIDs.ddlNoOfInfants).value = n; if ($.browser.msie) { $get("txtOriginVal").value = unescape(a); $get("txtDestinationVal").value = unescape(b); $get("txtOrigin").value = unescape(d); $get("txtDestination").value = unescape(e) } else {
        $get("txtOriginVal").value = decodeURIComponent(a); $get("txtDestinationVal").value = decodeURIComponent(b); $get("txtOrigin").value = decodeURIComponent(d); $get("txtDestination").value =
decodeURIComponent(e)
    } originSelected($get("txtOriginVal").value); destinationSelected($get("txtDestinationVal").value); if (CheckIfLowPricelistExist() == true) { $tabs.tabs("disable", 0); $tabs.tabs("enable", 0) } else $tabs.tabs("disable", 0); a = $get(ClientIDs.rbReturn); b = $get(ClientIDs.rbOneWay); if (a.checked == true) var m = IsRoundTrip(); if (m == true) { a.checked = true; b.checked = false; $("#dtOut").datepicker("setDate", parseDate(f)); DateOutSelected(); $("#dtBack").datepicker("setDate", parseDate(g)); DateHomeSelected() } else {
        a.checked =
false; b.checked = true; $("#dtOut").datepicker("setDate", parseDate(f)); DateOutSelected(); $("#dtBack").datepicker("setDate", $("#dtOut").datepicker("getDate"))
    } GetOtherFlightsOnDateProxy(); SetResultHeaderText(); SearchFlightsNew()
} function CheckIfLowPricelistExist() { var a = $get("txtOriginVal").value, b = $get("txtDestinationVal").value; return jQuery.inArray(a + b, aLowPriceList) != -1 ? true : false }
function IsLowPriceList() { if ($get("txtLowPriceList").value == 1) { var a = $get(ClientIDs.txtOutDate), b = $get(ClientIDs.txtBackDate); dtDateOut = parseDate(a.value); dtDateBack = parseDate(b.value); return true } else return false } function IsWeekendList() { if ($get("txtWeekend").value == 1) { var a = $get(ClientIDs.txtOutDate), b = $get(ClientIDs.txtBackDate); dtDateOut = parseDate(a.value); dtDateBack = parseDate(b.value); return true } else return false }
function ShowDialog(a) { a = unescape(a); Sys.Services.ProfileService.load(null, onLoadSuccess, onLoadError, a) } function onLoadSuccess(a, b) { ShowDialogC(b, b, b) } function onLoadError() { }
function ShowDialogC(a) {
    var b; b = $get("txtDestination").value.split(",")[0]; if (IsDebug == true) if (a != "") $("#aHotelLink")[0].href = "/RBwww/xt_OnlineSearchRedirect.aspx?ID=" + a; else $("#aHotelLink")[0].href = "/RBwww/Hotell-" + b + ".aspx"; else if (a != "") $("#aHotelLink")[0].href = "/xt_OnlineSearchRedirect.aspx?ID=" + a; else $("#aHotelLink")[0].href = "/Hotell-" + b + ".aspx"; if (HotelCityURL.length != 0) $("#aHotelLink")[0].href = HotelCityURL; else $("#aHotelLink")[0].href = HotelLinkAddress; $("#aHotelBack").html(Language.FlightSearch_Return);
    $("#aHotelLink").html("<h2>" + Language.FlightSearch_OpenHotelRB + b + "</h2>"); ShownOnce = true
} function CloseDialog() { $("#dialog").dialog("close") } function SaveProperties() { Sys.Services.ProfileService.properties.OriginCity = $get("txtOrigin").value; Sys.Services.ProfileService.properties.Origin = $get("txtOriginVal").value; Sys.Services.ProfileService.save(["OriginCity", "Origin"], onSaveSuccess, onSaveError, null) } function SaveProperties_Destination() { }
function SavePropertiesOnSearch() {
    var a = $("#dtOut").datepicker("getDate"); a = a.getFullYear() + "-" + (a.getMonth() + 1) + "-" + a.getDate(); var b = $("#dtBack").datepicker("getDate"); b = b.getFullYear() + "-" + (b.getMonth() + 1) + "-" + b.getDate(); Sys.Services.ProfileService.properties.OriginCity = $get("txtOrigin").value; Sys.Services.ProfileService.properties.Origin = $get("txtOriginVal").value; Sys.Services.ProfileService.properties.DestinationCity = $get("txtDestination").value; Sys.Services.ProfileService.properties.Destination =
$get("txtDestinationVal").value; Sys.Services.ProfileService.properties.DepatureDate = a; Sys.Services.ProfileService.properties.ReturnDate = b; Sys.Services.ProfileService.save(["OriginCity", "Origin", "DestinationCity", "Destination", "DepatureDate", "ReturnDate"], onSaveSuccessOnSearch, onSaveErrorOnSearch, null)
} function onSaveSuccessOnSearch() { } function onSaveErrorOnSearch() { alert("origin profile failed") }
function onSaveSuccess() { if (CheckIfWeekendPricelistExist() == true) { $tabs.tabs("disable", 1); $tabs.tabs("enable", 1); $tabs.tabs("disable", 2); $tabs.tabs("enable", 2); if ($tabs.tabs("option", "selected") == 2) { blockList(); $tabs.tabs("load", 2) } else WeekendListRefresh = true } else $tabs.tabs("disable", 2) } function onSaveError() { alert("origin profile failed") } function CheckIfWeekendPricelistExist() { var a; a = $get("txtOriginVal").value; return jQuery.inArray(a, aWeekendList) != -1 ? true : false }
function createCookie(a, b, d) { if (d) { var e = new Date; e.setTime(e.getTime() + d * 24 * 60 * 60 * 1E3); d = "; expires=" + e.toGMTString() } else d = ""; document.cookie = a + "=" + b + d + "; path=/" } function readCookie(a) { a = a + "="; for (var b = document.cookie.split(";"), d = 0; d < b.length; d++) { for (var e = b[d]; e.charAt(0) == " "; ) e = e.substring(1, e.length); if (e.indexOf(a) == 0) return e.substring(a.length, e.length) } return null } function eraseCookie(a) { createCookie(a, "", -1) } function refreshAd() { }
function originSelected(a) {
    var b, d; b = $get("txtOrigin").value.split(",")[0]; d = $get("txtDestination").value.split(",")[0]; $("#txtOriginVal").val(a); $("#txtDestination").focus(); a = false; var e = $tabs.tabs("option", "selected"); if (e == 1 || e == 2) {
        if (CheckIfWeekendPricelistExist() == true) {
            if (e == 1) { $tabs.tabs("disable", 1); $("a#aTab3").text(Language.LowPriceList + " " + Language.FromText + " " + b); $tabs.tabs("enable", 1); $tabs.tabs("select", 1); GetOtherFlightsOnDateProxy() } else {
                $tabs.tabs("disable", 1); $("a#aTab3").text(Language.LowPriceList +
" " + Language.FromText + " " + b); $tabs.tabs("enable", 1)
            } if (e == 2) { $tabs.tabs("disable", 2); $("a#aTab4").text("Weekendliste " + Language.FromText + " " + b); $tabs.tabs("enable", 2); $tabs.tabs("select", 2) } else { $tabs.tabs("disable", 2); $("a#aTab4").text("Weekendliste " + Language.FromText + " " + b); $tabs.tabs("enable", 2) }
        } else {
            $tabs.tabs("disable", 1); $tabs.tabs("disable", 2); if (CheckIfLowPricelistExist() == true) { $tabs.tabs("disable", 0); $("a#aTab2").text(Language.LowPriceGraph + " " + d); $tabs.tabs("enable", 0) } else {
                $tabs.tabs("enable",
0); $("a#aTab2").text(Language.LowPriceGraph); $tabs.tabs("disable", 0); a = true
            }
        } if (CheckIfLowPricelistExist() == true) { $tabs.tabs("disable", 0); $("a#aTab2").text(Language.LowPriceGraph + " " + d); $tabs.tabs("enable", 0) } else { $tabs.tabs("enable", 0); $("a#aTab2").text(Language.LowPriceGraph); $tabs.tabs("disable", 0) }
    } else if (e == 0) if (CheckIfLowPricelistExist() == true) {
        $("a#aTab2").text(Language.LowPriceGraph + " " + d); $tabs.tabs("disable", 0); $("a#aTab2").text(Language.LowPriceGraph + " " + d); $tabs.tabs("enable", 0); $tabs.tabs("select",
0); GetData()
    } else { if (CheckIfWeekendPricelistExist() == true) $tabs.tabs("select", 1); else a = true; $tabs.tabs("enable", 0); $("a#aTab2").text(Language.LowPriceGraph); $tabs.tabs("disable", 0) } if (a) { $("#tabscontainer").hide(); $("#tabscontainerDummy").show() } else { $("#tabscontainer").show(); $("#tabscontainerDummy").hide() } HideOutResult(); HideBackResult(); SaveProperties(); SetResultHeaderText()
}
function destinationSelected(a) {
    HideCityDescription(); $("#txtDestinationVal").val(a); $get("txtOrigin").value.split(","); a = $get("txtDestination").value.split(",")[0]; var b = false, d = $tabs.tabs("option", "selected"); if (d == 1 || d == 2) {
        if (CheckIfWeekendPricelistExist() != true) {
            $tabs.tabs("disable", 1); $tabs.tabs("disable", 2); if (CheckIfLowPricelistExist() == true) { $tabs.tabs("disable", 0); $("a#aTab2").text(Language.LowPriceGraph + " " + a); $tabs.tabs("enable", 0) } else {
                $tabs.tabs("enable", 0); $("a#aTab2").text(Language.LowPriceGraph);
                $tabs.tabs("disable", 0); b = true
            }
        } if (CheckIfLowPricelistExist() == true) { $tabs.tabs("disable", 0); $("a#aTab2").text(Language.LowPriceGraph + " " + a); $tabs.tabs("enable", 0) } else { $tabs.tabs("enable", 0); $("a#aTab2").text(Language.LowPriceGraph); $tabs.tabs("disable", 0) }
    } else if (d == 0) if (CheckIfLowPricelistExist() == true) { $("a#aTab2").text(Language.LowPriceGraph + " " + a); $tabs.tabs("disable", 0); $("a#aTab2").text(Language.LowPriceGraph + " " + a); $tabs.tabs("enable", 0); $tabs.tabs("select", 0); GetData() } else {
        if (CheckIfWeekendPricelistExist() ==
true) $tabs.tabs("select", 1); else b = true; $tabs.tabs("enable", 0); $("a#aTab2").text(Language.LowPriceGraph); $tabs.tabs("disable", 0)
    } if (b) { $("#tabscontainer").hide(); $("#tabscontainerDummy").show() } else { $("#tabscontainer").show(); $("#tabscontainerDummy").hide() } HideOutResult(); HideBackResult(); SaveProperties_Destination(); SetResultHeaderText()
};
