//Layercode v1.6.5 var layerWidth = "300"; var layerHeight = "300"; if (!layerTop) {var layerTop = 100;} var layerBarHeight = 20; var layerTitle="Unikt tilbud! GRATIS Visitkort!"; var layerUrl="flashad.html"; var layerOpenUrl="http://tracking.euroads.dk/system/tracking.php?sid=1&cpid=776&adid=116618&acid=1190"; var layerCountUrl=""; var layerShowTimeout = 3000; var layerLeft; var layerObj; function getWindowWidth(win) { if (win == undefined) win = window; if (win.innerWidth) { return win.innerWidth; } else { if (win.document.documentElement && win.document.documentElement.clientWidth) { return win.document.documentElement.clientWidth; } return win.document.body.offsetWidth; } } function getWindowHeight(win) { if (win == undefined) win = window; if (win.innerHeight) { return win.innerHeight; } else { if (win.document.documentElement && win.document.documentElement.clientHeight) { return win.document.documentElement.clientHeight; } return win.document.body.offsetHeight; } } function toInt(stri) { return parseInt(stri.replace("px","")); } function initLayer(){ document.write(unescape(layercode)); layerObj = document.getElementById('adlayerad'); document.getElementById('adlayerad').style.width = layerWidth + "px"; document.getElementById('adlayerad').style.height = layerHeight + "px"; var layerAx = (-layerWidth - 10); document.getElementById('adlayerad').style.top = layerTop + "px"; document.getElementById('adlayerad').style.left = layerAx + "px"; document.getElementById('layerBar').style.height = layerBarHeight + "px" document.getElementById('layerFrame').style.width = layerWidth + "px"; document.getElementById('layerFrame').style.height = (layerHeight - layerBarHeight) + "px"; document.getElementById('layerFrame').src = layerUrl; document.getElementById('layerTitle').innerHTML = layerTitle; layerLeft = (getWindowWidth() / 2) - (layerWidth / 2) setTimeout("aniOpenLayer()", layerShowTimeout); } function closeLayer(){ window.onresize = null; document.getElementById('layerFrame2').style.display = "block"; document.getElementById('layerFrame2').src = layerCountUrl; setTimeout("aniCloseLayer()", 100); } function aniOpenLayer(){ var layerAx = toInt(layerObj.style.left); if (layerAx < layerLeft){ var step = Math.round((layerAx * (-1) + layerLeft) / 4); if (step < 1){ step = 1; } layerAx = layerAx + step; layerObj.style.left = layerAx + "px"; setTimeout("aniOpenLayer()", 25); }else{ layerObj.style.left = layerLeft + "px"; window.onresize = reposLayer; reposLayer(); } } function aniCloseLayer(){ var layerEnd = (-layerWidth - 10); var layerAx = toInt(layerObj.style.left); if (layerAx > layerEnd){ var step = Math.round((layerAx + layerEnd * (-1)) / 4); if (step < 10){ step = 10; } layerAx = layerAx - step; layerObj.style.left = layerAx + "px"; setTimeout("aniCloseLayer()", 25); }else{ layerObj.style.display = "none"; } } function btnLayerOpen(){ if (layerOpenUrl){ window.open(layerOpenUrl); }else{ window.open(layerUrl); } closeLayer(); } function btnLayerClose(){ closeLayer(); } function reposLayer() { layerObj.style.left = (getWindowWidth() / 2) - (layerWidth / 2) + "px"; } //absolute //http://publisher.to/images/ var layercode = "%3Cdiv%20id%3D%22adlayerad%22%20style%3D%22z-index%3A%2010000%3B%20background-color%3A%23FFFFFF%3B%20font-family%3A%20Arial%2C%20Helvetica%2C%20sans-serif%3B%20font-style%3A%20normal%3B%20font-size%3A%2012px%3B%20font-weight%3A%20normal%3B%20color%3A%20%23000000%3B%20line-height%3A%20normal%3B%20border%3A%201px%20solid%20%23666666%3B%22%3E%0D%0A%09%3Cdiv%20id%3D%22layerBar%22%20style%3D%22height%3A%2020px%3B%20background-color%3A%23FBFBF9%3B%20line-height%3A%2020px%3B%22%3E%0D%0A%09%09%3Cdiv%20id%3D%22layerTitle%22%20style%3D%22float%3A%20left%3B%20margin-left%3A%205px%3B%20font-weight%3A%20bold%3B%22%3ETestlayer%3C%2Fdiv%3E%0D%0A%09%09%3Cdiv%20id%3D%22layerButtons%22%20style%3D%22float%3A%20right%3B%20margin-right%3A%205px%3B%22%3E%0D%0A%09%09%09%3Ca%20href%3D%22javascript%3AbtnLayerOpen%28%29%3B%22%20id%3D%22layerBtnOpen%22%20style%3D%22color%3A%20%23505050%3B%20font-weight%3A%20bold%3B%20text-decoration%3A%20none%3B%20font-size%3A%2012px%3B%20font-family%3A%20Arial%2C%20Helvetica%2C%20sans-serif%3B%22%3Emaksimer%3C%2Fa%3E%20%2F%20%0D%0A%09%09%09%3Ca%20href%3D%22javascript%3AbtnLayerClose%28%29%3B%22%20id%3D%22layerBtnClose%22%20style%3D%22color%3A%20%23505050%3B%20font-weight%3A%20bold%3B%20text-decoration%3A%20none%3B%20font-size%3A%2012px%3B%20font-family%3A%20Arial%2C%20Helvetica%2C%20sans-serif%3B%22%3Eluk%3C%2Fa%3E%0D%0A%09%09%3C%2Fdiv%3E%0D%0A%09%3C%2Fdiv%3E%0D%0A%09%3Ciframe%20id%3D%22layerFrame%22%20src%3D%22about%3Ablank%22%20border%3D%220%22%20frameborder%3D%220%22%20scrolling%3D%22no%22%20style%3D%22border-style%3A%20none%3B%20border-width%3A%200px%3B%22%3E%3C%2Fiframe%3E%0D%0A%09%3Ciframe%20id%3D%22layerFrame2%22%20src%3D%22about%3Ablank%22%20border%3D%220%22%20frameborder%3D%220%22%20scrolling%3D%22no%22%20style%3D%22border-style%3A%20none%3B%20border-width%3A%200px%3B%20display%3A%20none%3B%22%20width%3D%221%22%20height%3D%221%22%3E%3C%2Fiframe%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3Cstyle%20type%3D%22text%2Fcss%22%3E%0D%0A%09%23adlayerad%20%7Bposition%3A%20fixed%3B%7D%0D%0A%3C%2Fstyle%3E%0D%0A%3C%21--%5Bif%20lt%20IE%207%5D%3E%0D%0A%3Cstyle%20type%3D%22text%2Fcss%22%3E%0D%0A%09%23adlayerad%20%20%7Bposition%3A%20absolute%3B%20display%3A%20block%3B%20%7D%0D%0A%3C%2Fstyle%3E%0D%0A%3C%21%5Bendif%5D--%3E"; initLayer();