var OnAds_489e7a62878bd95994196ad763035c69_mraid = false;
document.write("
Loading...
");
var OnAds_489e7a62878bd95994196ad763035c69readyStateCheckInterval;
function OnAds_489e7a62878bd95994196ad763035c69politeListen ()
{
OnAds_489e7a62878bd95994196ad763035c69readyStateCheckInterval = setInterval(function() {
if (document.readyState === "complete") {
clearInterval(OnAds_489e7a62878bd95994196ad763035c69readyStateCheckInterval);
document.getElementById('OnAds_489e7a62878bd95994196ad763035c69').contentWindow.politeInit();
}
}, 10);
}
var OnAds_489e7a62878bd95994196ad763035c69AutoReadyStateCheckInterval;
function OnAds_489e7a62878bd95994196ad763035c69_autoPolite ()
{
document.getElementById('OnAds_489e7a62878bd95994196ad763035c69_banner').innerHTML = '';
OnAds_489e7a62878bd95994196ad763035c69AutoReadyStateCheckInterval = setInterval(function() {
if (document.readyState === "complete") {
clearInterval(OnAds_489e7a62878bd95994196ad763035c69AutoReadyStateCheckInterval);
OnAds_489e7a62878bd95994196ad763035c69_init();
}
}, 10);
}
function OnAds_489e7a62878bd95994196ad763035c69_init ()
{
document.getElementById('OnAds_489e7a62878bd95994196ad763035c69_banner').innerHTML = '';
var OnAds_489e7a62878bd95994196ad763035c69 = document.createElement('iframe');
OnAds_489e7a62878bd95994196ad763035c69.width = '940';
OnAds_489e7a62878bd95994196ad763035c69.height = '600';
OnAds_489e7a62878bd95994196ad763035c69.setAttribute('frameborder', '0');
OnAds_489e7a62878bd95994196ad763035c69.setAttribute('border', '0');
OnAds_489e7a62878bd95994196ad763035c69.setAttribute('scrolling', 'no');
OnAds_489e7a62878bd95994196ad763035c69.setAttribute('style', 'width: 940px; height: 600px; overflow: hidden; border: none; outline: none;');
OnAds_489e7a62878bd95994196ad763035c69.src = 'about:blank';
OnAds_489e7a62878bd95994196ad763035c69.id = "OnAds_489e7a62878bd95994196ad763035c69";
document.getElementById('OnAds_489e7a62878bd95994196ad763035c69_banner').appendChild(OnAds_489e7a62878bd95994196ad763035c69);
OnAds_489e7a62878bd95994196ad763035c69.contentWindow.contents = '' + "\n" +
'' + "\n" +
'' + "\n" +
'var API; var clickTAG = \'\'; window.onload = function() { API = new OnAdsStatsAPI(); API.init(\'73ca1d54e716358400bb4c093f47e2c6\'); API.trackElement(\'container\'); parent.OnAds_489e7a62878bd95994196ad763035c69_isInScreen(); init(); }; function mouseOver (e) { var obj=e.relatedTarget; while(obj!=null){ if(obj==this){ return; }; obj=obj.parentNode; }; if (typeof mouseOverListener == \'function\') { mouseOverListener(); }; API.registerEvent(API.EVENT_MOUSE_OVER); }; function mouseOut (e) { var obj=e.relatedTarget; while(obj!=null){ if(obj==this){ return; }; obj=obj.parentNode; }; API.registerEvent(API.EVENT_MOUSE_OUT); if (typeof mouseOutListener == \'function\') { mouseOutListener(); }; }; ' + "\n" +
' ' + "\n" +
' ' + "\n" +
' ' + "\n" +
'' + "\n" +
'' + "\n" +
'' + "\n" +
'' + "\n" +
'
' + "\n" +
'
' + "\n" +
'
' + "\n" +
'' + "\n" +
'
' + "\n" +
'' + "\n" +
'
' + "\n" +
'' + "\n" +
'' + "\n" +
'' + "\n" +
' var landingUrl = \'http://www.topas.dk\';' + "\n" +
' var autoTimeout = 3000;' + "\n" +
' var autoStart;' + "\n" +
'' + "\n" +
' var tl1 = new TimelineMax({repeatDelay:0, repeat:7, paused:true});' + "\n" +
' var tl2 = new TimelineMax({repeatDelay:0, repeat:6, paused:true});' + "\n" +
' var tl3 = new TimelineMax({repeatDelay:1, repeat:6, paused:true});' + "\n" +
' var tl4 = new TimelineMax({repeatDelay:0, repeat:15, paused:true});' + "\n" +
'' + "\n" +
' tl1.to(balloon1, 5, {top: -250, left: 650, ease:Linear.easeNone}, 2);' + "\n" +
' tl2.to(balloon2, 9, {top: -250, left: 300, ease:Linear.easeNone}, 1);' + "\n" +
' tl3.to(balloon3, 8, {top: -250, left: 700, ease:Linear.easeNone}, .5);' + "\n" +
' tl4.to(button, 0.2, {scale: 0.92, ease:Linear.easeNone}, 2.5);' + "\n" +
' tl4.to(button, 0.2, {scale: 1, ease:Linear.easeNone});' + "\n" +
'' + "\n" +
' function init ()' + "\n" +
' {' + "\n" +
' API.registerImpression();' + "\n" +
'' + "\n" +
' document.getElementById("container").onmouseover=mouseOver;' + "\n" +
' document.getElementById("container").onmouseout=mouseOut;' + "\n" +
'' + "\n" +
' $("#cycle").cycle({' + "\n" +
' fx: \'fade\',' + "\n" +
' speed: 500,' + "\n" +
' timeoutFn: getAutoTimeout,' + "\n" +
' next: \'#next\',' + "\n" +
' prev: \'#prev\'' + "\n" +
' });' + "\n" +
'' + "\n" +
' setTimeout("autoTimeout = 99999999999; clearTimeout(autoStart);", 42000);' + "\n" +
'' + "\n" +
' parent.OnAds_489e7a62878bd95994196ad763035c69_isInViewport();' + "\n" +
' }' + "\n" +
'' + "\n" +
' function getAutoTimeout ()' + "\n" +
' {' + "\n" +
' return autoTimeout;' + "\n" +
' }' + "\n" +
'' + "\n" +
' function setAutoTimeout ()' + "\n" +
' {' + "\n" +
' clearTimeout(autoStart);' + "\n" +
' autoStart = setTimeout("autoTimeout = 3000; $(\'#cycle\').cycle(\'next\');", 20000);' + "\n" +
' autoTimeout = 99999999999;' + "\n" +
' }' + "\n" +
'' + "\n" +
' function inViewport ()' + "\n" +
' {' + "\n" +
' tl1.resume();' + "\n" +
' tl2.resume();' + "\n" +
' tl3.resume();' + "\n" +
' tl4.resume();' + "\n" +
' }' + "\n" +
'' + "\n" +
' var lastClick = new Date().getTime();' + "\n" +
'' + "\n" +
' function redir (url, itemId)' + "\n" +
' {' + "\n" +
' if (lastClick+500 > new Date().getTime())' + "\n" +
' {' + "\n" +
' return;' + "\n" +
' }' + "\n" +
' lastClick = new Date().getTime();' + "\n" +
'' + "\n" +
' if (url == undefined)' + "\n" +
' {' + "\n" +
' var url = landingUrl;' + "\n" +
' var itemId = 0;' + "\n" +
' }' + "\n" +
' window.open(clickTAG + url);' + "\n" +
' API.registerEvent(API.EVENT_CLICK, clickTAG + url, itemId, clickTAG + url);' + "\n" +
' }' + "\n" +
'' + "\n" +
'' + "\n" +
'' + "\n";
OnAds_489e7a62878bd95994196ad763035c69.src = 'javascript:window["contents"]';
}
function OnAds_489e7a62878bd95994196ad763035c69_scroll (intMove)
{
document.body.scrollTop = document.body.scrollTop + intMove;
}
function OnAds_489e7a62878bd95994196ad763035c69_isInScreen ()
{
if (OnAds_489e7a62878bd95994196ad763035c69_isElementInViewport('OnAds_489e7a62878bd95994196ad763035c69'))
{
// register inscreen view
document.getElementById('OnAds_489e7a62878bd95994196ad763035c69').contentWindow.API.registerEvent(4);
}
else
{
setTimeout("OnAds_489e7a62878bd95994196ad763035c69_isInScreen();", 500);
}
}
function OnAds_489e7a62878bd95994196ad763035c69_isInViewport ()
{
if (OnAds_489e7a62878bd95994196ad763035c69_isElementInViewport('OnAds_489e7a62878bd95994196ad763035c69'))
{
document.getElementById('OnAds_489e7a62878bd95994196ad763035c69').contentWindow.inViewport();
}
else
{
setTimeout("OnAds_489e7a62878bd95994196ad763035c69_isInViewport()", 500);
}
}
function OnAds_489e7a62878bd95994196ad763035c69_isElementInViewport(el) {
var rect = document.getElementById(el).getBoundingClientRect();
//tmp dba fix
if (rect.top == -15)
{
return true;
}
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.top <= (window.innerHeight || document. documentElement.clientHeight) &&
rect.left <= (window.innerWidth || document. documentElement.clientWidth)
);
}
if (OnAds_489e7a62878bd95994196ad763035c69_mraid)
{
mraid.addEventListener('stateChange', function(state)
{
if (state == 'default')
{
OnAds_489e7a62878bd95994196ad763035c69_collapse ();
}
});
if (mraid.getState() === 'loading')
{
mraid.addEventListener('ready', OnAds_489e7a62878bd95994196ad763035c69_init);
}
else
{
OnAds_489e7a62878bd95994196ad763035c69_init();
}
}
else
{
var OnAds_489e7a62878bd95994196ad763035c69_AutoPolite = 0;
if (OnAds_489e7a62878bd95994196ad763035c69_AutoPolite == 1)
{
OnAds_489e7a62878bd95994196ad763035c69_autoPolite();
}
else
{
setTimeout("OnAds_489e7a62878bd95994196ad763035c69_init();", 500);
}
}
function OnAds_489e7a62878bd95994196ad763035c69_mraid_open (url)
{
mraid.open(url);
}
function OnAds_489e7a62878bd95994196ad763035c69_setCookie(c_name, value, exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
function OnAds_489e7a62878bd95994196ad763035c69_getCookie(c_name)
{
var c_value = document.cookie;
var c_start = c_value.indexOf(" " + c_name + "=");
if (c_start == -1)
{
c_start = c_value.indexOf(c_name + "=");
}
if (c_start == -1)
{
c_value = null;
}
else
{
c_start = c_value.indexOf("=", c_start) + 1;
var c_end = c_value.indexOf(";", c_start);
if (c_end == -1)
{
c_end = c_value.length;
}
c_value = unescape(c_value.substring(c_start,c_end));
}
return c_value;
}