There was unfortunately an error trying to retrieve your data.
Error: -'+errorThrown+response+'';
if (errorThrown == 'Service Unavailable')
textToShow += '
Note: A "service is unavailable" error either means that your wifi or mobile data is experiencing difficulties or that we are performing systems maintenance. Please try again in 10-15 minutes.'
showInfoBar(textToShow, true, true);
}
function ssJSONResult(data, textStatus, jqXHR){
//expects JSON structure to have a result: then these are optional errormessage: successmessage: successinfo: htmls
try {
var result = jQuery.parseJSON(data);
} catch(error) {
return;
}
if (result.result && result.result != "OK" && result.result != "CONFIRM" && result.result != "HTML" && result.result != "Error") showInfoBar(result.result, false, true);
if (result.htmlCart) $(".cl_be__cart").html(result.htmlCart);
if (result.htmlCartFooter) $(".cartFooter").html(result.htmlCartFooter);
if (result.htmlContentCartFooter) $("#divContentCartFooter").html(result.htmlContentCartFooter);
if (result.htmls){
var lHtmlObj = {};
for (lInd = 0; lInd < result.htmls.length; lInd++) {
lHtmlObj = result.htmls[lInd];
$(lHtmlObj.htmlName).html(lHtmlObj.htmlContent);
}
}
if (result.successAction){
try {
window[result.successAction];
} catch(error) {
return;
}
}
if (result.successmessage) {
showModal("Success", unescape(result.successmessage));
}
if (result.successinfo) showInfoBar(result.successinfo, false, false);
if (result.script) jQuery.globalEval(decodeURI(result.script));
if (result.url) location.href = result.url;
if (result.hasOwnProperty("valid")) validPage = result.valid;
if (result.errormessage) {
showInfoBar(result.errormessage, false, true);
}
if (result.errorinfo) showInfoBar(result.errorinfo, false, true);
if (result.scrollTo){
//$(result.scrollTo + ":first").scrollIntoView();
//$(result.scrollTo).get(0).scrollTop(300);
var vScrollTo = document.querySelector(result.scrollTo);
vScrollTo.scrollIntoView();
}
if (result.confirm){
var lConfirm = {};
lConfirm = result.confirm;
var lFunctionYes = gCallbacks[lConfirm.functionYes];
var lFunctionNo = gCallbacks[lConfirm.functionNo];
if (lFunctionYes == null) {
showModal(lConfirm.title, lConfirm.body, lFunctionNo);
} else {
showModalConfirm(lConfirm.title, lConfirm.body, lFunctionYes, lFunctionNo, lConfirm.labelYes, lConfirm.labelNo);
}
}
if (result.refreshPageForCheckout) {
showModal("Warning", result.refreshPageForCheckout, refreshPageForCheckout);
}
return result;
}
function refreshPageForCheckout() {
location.href = location.href;
}
function translateErrorMessage(vError) {
var replaceError = vError.includes("OVERLAND Booking exceeds available Pax of 0");
if (replaceError) {
return "Unfortunately this date is now fully booked, please select another date";
}
return vError;
}
function setCookie(cname, cvalue, exdays) {
var expires = "";
if (exdays){ //not passing a days to expire creates a session cookie
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
expires = "expires="+d.toUTCString();
}
//document.cookie = cname + "=" + cvalue + "; " + expires;
document.cookie = cname + "=" + encodeURIComponent(cvalue) + "; path=/; " + expires; //change to enable sessionid cookie to last longer than just the current session.
}
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i=0; iLogon - BridgeClimb