function whichAnalyticsGoogle() { var scripts = document.getElementsByTagName('script'), len = scripts.length, i, s; for (i = 0; i < len; i += 1) { s = scripts[i].src; if (s.indexOf('google-analytics.com/ga.js')>-1) { return "ga"; } else if (s.indexOf('google-analytics.com/analytics.js')>-1) { return "ua"; } } return null; } function addiframeproviderwrapper0IFrame(whichGA, opt_hash) { return function(tracker) { var iframeproviderwrapper0IFrame = document.createElement("iframe"); iframeproviderwrapper0IFrame.frameBorder=0; iframeproviderwrapper0IFrame.scrolling="no"; iframeproviderwrapper0IFrame.marginHeight=0; iframeproviderwrapper0IFrame.marginWidth=0; iframeproviderwrapper0IFrame.width=300; iframeproviderwrapper0IFrame.height=500; iframeproviderwrapper0IFrame.name="iframeproviderwrapper0IFrame"; iframeproviderwrapper0IFrame.id="iframeproviderwrapper0IFrame"; var div = document.getElementById("iframeprovider-wrapper0"); var url = 'http://www.touristonline.dk/visitdenmarkbooking/bookingboks/hotelVDK2.do?language=en&tilbageUrl=http%3A%2F%2Fwww.visitdenmark.com%2Fdenmark%2Ftourist-frontpage&tableset=http%3A%2F%2Fwww.visitdenmark.com%2Fdenmark%2Ftourist-online-skabelon'; if (whichGA == 'ua') { var trackers = ga.getAll(); var linkerParam; if(trackers.length) { var linkerParam = '&'+trackers[0].get('linkerParam'); } iframeproviderwrapper0IFrame.src=url+linkerParam; } else if (whichGA == 'ga') { _gaq.push(function() { var pageTracker = _gat._getTrackerByName(); iframeproviderwrapper0IFrame.src = pageTracker._getLinkerUrl(url); }); } else { iframeproviderwrapper0IFrame.src = url; } div.innerHTML = ''; div.appendChild(iframeproviderwrapper0IFrame); }; } function initiframeproviderwrapper0IFrame() { var whichGA = whichAnalyticsGoogle(); if (whichGA == 'ua' && typeof ga !== undefined && typeof ga.getAll === 'function') { ga(addiframeproviderwrapper0IFrame(whichGA)); } else if (whichGA == 'ga') { // && typeof _gat !== undefined && typeof _gat._getTrackers === 'function') { _gaq.push(function() { addiframeproviderwrapper0IFrame(whichGA)(); }); } else { addiframeproviderwrapper0IFrame()(); } } (function(){ initiframeproviderwrapper0IFrame(); })();