var myEleCurrncy = document.getElementById("adivaha-currency-container"); console.log('myEleCurrncy:'+myEleCurrncy); if(myEleCurrncy){ document.getElementById("adivaha-currency-container").innerHTML='
'; } var myEleCurrncy = document.getElementById("adivaha-currency-container1"); if(myEleCurrncy){ document.getElementById("adivaha-currency-container1").innerHTML=''; } /*=== onload show currency ===*/ var urlParams = new URLSearchParams(window.location.search); var active_currency = urlParams.get('currency'); var tt =document.getElementById("currency_"+active_currency); if ( typeof(active_currency) !== "undefined" && active_currency !== null && typeof(active_currency) !== "tt" && tt !== null){ var active_currency_symbol = document.getElementById("currency_"+active_currency).getAttribute("data-symbol"); var active_currency_title = document.getElementById("currency_"+active_currency).getAttribute("data-title"); /*===document.getElementById("adh_currSymbol").innerHTML=active_currency_symbol;===*/ document.getElementById("adh_currTitle").innerHTML=active_currency_title; document.getElementById("adh_currName").innerHTML=active_currency; } /*=== End onload show currency ===*/ function changeCurrency(currency){ var pageURL = window.location.href; if( (pageURL.indexOf('currency=') != -1) || (pageURL.indexOf('curr=') != -1) ){ var newUrl = pageURL.replace(/\bcurrency=[0-9a-zA-Z_@.#+-]{1,50}\b/, 'currency=' + currency); newUrl = newUrl.replace(/\bcurr=[0-9a-zA-Z_@.#+-]{1,50}\b/, 'curr=' + currency); window.location.href=newUrl; } else{ if(pageURL.indexOf('?') != -1){ var newUrl = pageURL +'¤cy='+currency; } else{ var newUrl = pageURL +'?currency='+currency; } window.location.href=newUrl; } } var parent_idle_timeout_over ='No'; var child_idle_timeout_over='No'; console.clear(); console.log("IPAddress:3.144.227.146"); LoadAdivaha(); function LoadAdivaha(){ var qs = window.location.search; qs = qs.replace("?", ''); var urlParams = new URLSearchParams(qs); var getToken =urlParams.get('token'); if( getToken=='' || getToken === null || typeof getToken==='undefined' ){ getToken =''; } console.log('getToken from url:'+getToken); if(qs=='action=logout'){ delete_cookie('userid'); delete_cookie('useremail'); delete_cookie('username'); delete_cookie('usertype'); delete_cookie('login_page'); delete_cookie('user_token'); } if(qs=='action=adhlogout'){ delete_cookie('userid'); delete_cookie('useremail'); delete_cookie('username'); delete_cookie('usertype'); delete_cookie('login_page'); delete_cookie('user_token'); } var aid=''; var userid =getCookie('userid'); var usertype =getCookie('usertype'); if( (userid!='') && (typeof userid !== 'undefined') && (userid != 'null') ){ var aid=userid; var usertype =usertype; } var ParentRestParam=''; if(document.getElementById("ParentRestParam")){ var ParentRestParam= document.getElementById("ParentRestParam").value; } document.getElementById("adivaha-wrapper").style.width = "100%"; var mt = urlParams.get('mt'); var bgcolor = '#0c2e60'; if(getToken != '') { /* dashboard */ bgcolor = '#0c2e60'; } else if( (mt == '') || (typeof mt == 'undefined') || (mt == null) ) { bgcolor='#FFF'; } else if(mt == 'mt') { bgcolor = '#FFF'; } else { bgcolor='#0c2e60'; } /* jq162 = jQuery.noConflict( false );*/ var attr_lang = document.getElementById("adivaha-wrapper").getAttribute('language'); var attr_curr = document.getElementById("adivaha-wrapper").getAttribute('currency'); var adh_language=''; if(attr_lang != '' && attr_lang !== null) { var adh_language = attr_lang; } else if(document.getElementById("adh_language")) { var adh_language = document.getElementById("adh_language").value; } var attribute_currency=''; if(attr_curr != '' && attr_curr !== null) { var attribute_currency = '¤cy=' + attr_curr; } var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0]; s1.async=false; s1.src='https://www.abengines.com//wp-content/plugins/adivaha/iframe-resizer-master/js/iframeResizer.min.js'; s1.charset='UTF-8'; s1.setAttribute('crossorigin','*'); s1.setAttribute('id','iFrameresizer'); s0.parentNode.insertBefore(s1,s0); if(document.querySelector('#adivaha-wrapper').getAttribute('jquery') == 'false'){ if(!window.jQuery) { var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0]; s1.async=false; s1.src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'; s1.charset='UTF-8';s1.setAttribute('crossorigin','*');s0.parentNode.insertBefore(s1,s0); } } if(qs.indexOf('tphotel=Yes') != -1) { var srcz = "https://www.abengines.com/tp-hotel-search/?version=v2&pid=77A91548&mid=combo&mt=&"+qs+"/#/hotels?"+qs; } else if(qs.indexOf('tpflight=Yes') != -1) { var srcz = "https://www.abengines.com/tp-flights-search/?version=v2&pid=77A91548&mid=combo&mt=&"+qs+"/#/flights?"+qs; } else { var srcz = "https://www.abengines.com//?version=v2&pid=77A91548&mid=combo&mt=&wlaid=&aid="+aid+"&lang="+adh_language+""+attribute_currency+"&usertype="+usertype+"&"+qs+"&ip=172.70.131.93&ParentRestParam="+ParentRestParam; } var readyStateCheckInterval = setInterval(function() {iFrameResize({ onMessage: function(messageData) { var mydata =JSON.stringify(messageData.message); /* console.log("Testing..."); console.log(messageData.message); id = document.getlementbyi("TCID"); console.log("Testsdds : "+messageData.message.TC_action); if(messageData.message.TC_action == "save_TC_Cookie_ID"){ var TC_ID = getCookie('TC_ID'); if(typeof(TC_ID) == "undefined"){ setCookie("TC_ID","AEXPRL",'1'); console.log("Getting Cookie: "+getCookie('TC_ID')); }else{ console.log("User Already Logged in : "+TC_ID); } } var TC_ID = getCookie('TC_ID'); if(TC_ID == ""){ if(messageData.message.TC_action == "save_TC_Cookie_ID"){ setCookie("TC_ID","AEXPRL",'1'); } }else{ console.log("User Already Logged in : "+TC_ID); } */ if(messageData.message.iframeLoaded == 'Yes') { // console.log("Iframe Loaded : "+messageData.message.iframeLoaded); /*document.getElementById("adivahaloading").innerHTML='';*//*== Remove Loader==*/ var elems = document.getElementsByClassName("adivahaloading"); for(var i = 0; i < elems.length; i++) { elems[i].innerHTML = ''; } } if(messageData.message.child_idle_timeout_over!=''){ child_idle_timeout_over=messageData.message.child_idle_timeout_over; } if(messageData.message.p=='reload_parent_url'){ window.location.href=''; } if(messageData.message.p=='login'){ var user_id =messageData.message.user_id; var user_email =messageData.message.user_email; var user_name =messageData.message.user_name; var user_type =messageData.message.user_type; var loginpage =messageData.message.loginpage; var token = messageData.message.token; var parent_token = messageData.message.parent_token; var newtab = messageData.message.newtab; var nextpage =messageData.message.nextpage; setCookie("userid",user_id,'1'); setCookie("useremail",user_email,'1'); setCookie("username",user_name,'1'); setCookie("usertype",user_type,'1'); setCookie("login_page",loginpage,'1'); setCookie("mybooking_page",nextpage,'1'); setCookie("user_token",token,'1'); setCookie("parent_token",parent_token,'1'); if(typeof token =='undefined'){ window.location.href=nextpage; } else{ if(newtab=='Yes'){ var taburl =nextpage + "?token="+token+"&subagent=yes"; window.open(taburl); } else { if(parent_token!='' && typeof parent_token!='undefined'){ window.location.href=nextpage + "?token="+token+"&parent_token="+parent_token; } else{ window.location.href=nextpage + "?token="+token; } } } } else if(messageData.message.p=='paymentform'){ /*ifrm.style.height = "550px"; */ } else if (messageData.message.p=='recheckAuthentication'){ var message = JSON.stringify({channel: 'FROM_FRAME_A'}); } else if (messageData.message.p=='trip_composer'){ var elemDiv = document.createElement("div"); elemDiv.setAttribute("id", "trip_comp_map"); document.body.appendChild(elemDiv); var head = document.getElementsByTagName('HEAD')[0]; var link = document.createElement('link'); link.rel = 'stylesheet'; link.type = 'text/css'; link.href = 'https://www.abengines.com/ui/trip-composer.css?var=132'; head.appendChild(link); var elemDiv_load = document.createElement("div"); elemDiv_load.setAttribute("id", "trip_comp_map_load"); elemDiv_load.innerHTML = "Please Wait!
We are busy searching for the
BEST DEALS!