<div id="logs"><!-- --></div> <iframe id="travelstartIframe-33a431b3-5163-4684-a937-78d1e5deee15" style="margin: 0px; padding: 0px; border: 0px; height: 1000px;" src="https://www.geziko.com?affId=195244&amp;isiframe=true" width="1000" height="1000" frameborder="0" scrolling="no"> <!-- :-) -->&nbsp; &nbsp; </iframe> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script> <script src="https://www.geziko.com/resources/js/jquery.ba-postmessage.min.js" type="text/javascript"></script> <script type="text/javascript">// <![CDATA[ // these variables can be configured var travelstartIframeId = 'travelstartIframe-33a431b3-5163-4684-a937-78d1e5deee15'; var iframeUrl = 'https://www.geziko.com'; var logMessages = false; var showBanners = false; var affId = '195244'; var affCampaign = 'Default'; var cpy_source='tstraff' var affCurrency = 'Default'; // ZAR / USD / NAD / ... var height = '0px'; var width = '800px'; // do not change these var iframe = $('#' + travelstartIframeId); var iframeVersion = '08'; var autoSearch = false; var affiliateIdExist = false; var urlParams = {}; var alreadyExist = []; var iframeParams = []; var match, pl = /+/g, search = /([^&=]+)=?([^&]*)/g, decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); }, query = window.location.search.substring(1); while (match = search.exec(query)){ urlParams[decode(match[1])] = decode(match[2]); } for (var key in urlParams){ if (urlParams.hasOwnProperty(key)){ if (key == 'search' && urlParams[key] == 'true'){ autoSearch = true; } if( key == 'affId' || key == 'affid' || key == 'aff_id'){ affiliateIdExist = true ; } iframeParams.push(key + '=' + urlParams[key]); alreadyExist.push(key); } } if(!('show_banners' in alreadyExist)){ iframeParams.push('show_banners=' + showBanners); } if(!('log' in alreadyExist)){ iframeParams.push('log=' + logMessages); } if(! affiliateIdExist){ iframeParams.push('affId=' + affId); } if(!('affCampaign' in alreadyExist)){ iframeParams.push('affCampaign=' + affCampaign); } if(!('cpy_source' in alreadyExist)){ iframeParams.push('cpy_source=' + cpy_source); } if(!('utm_source' in alreadyExist)){ iframeParams.push('utm_source=affiliate'); } if(!('utm_medium' in alreadyExist)){ iframeParams.push('utm_medium=' + affId); } if(!('isiframe' in alreadyExist)){ iframeParams.push('isiframe=true'); } if(!('landing_page' in alreadyExist)){ iframeParams.push('landing_page=false'); } if (affCurrency.length == 3){ iframeParams.push('currency=' + affCurrency); } if(!('iframeVersion' in alreadyExist)){ iframeParams.push('iframeVersion=' + iframeVersion); } if(!('host' in alreadyExist)){ iframeParams.push('host=' + window.location.href.split('?')[0]); } var newIframeUrl = iframeUrl + (autoSearch ? '/search-on-index?search=true' : '/search-on-index?search=false') + '&' + iframeParams.join('&'); iframe.attr('src', newIframeUrl); function setIframeSize(newWidth, newHeight){ iframe.css('width', newWidth); iframe.width(newWidth); iframe.css('height', newHeight); iframe.height(newHeight); } setIframeSize(width, height); $.receiveMessage(function(e, host){ if (logMessages){ $('#logs').text('RECEIVED *** ' + new Date() + ' *** ' + 'message=' + e.data + ' *** iframeUrl=' + newIframeUrl); } var dataElements = e.data.split('&'); if(dataElements && dataElements.length === 1) { setIframeSize(width, e.data + 'px'); } else { var elementKey = dataElements[0].split('='); var elementValue = dataElements[1].split('='); if(elementKey[1] === 'resize') { setIframeSize(width, elementValue[1] + 'px'); } if(elementKey[1] === 'deeplink') { window.location.replace(unescape(elementValue[1])); } } }, iframeUrl); // ]]></script>