function getViewportSize() { if (typeof window.innerWidth != 'undefined') return [window.innerWidth,window.innerHeight]; else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0) return [document.documentElement.clientWidth,document.documentElement.clientHeight]; else return [document.getElementsByTagName('body')[0].clientWidth,document.getElementsByTagName('body')[0].clientHeight]; } function show() { if(navigator.userAgent.match(/Opera 8/) != null) // totally broken in opera8 return; if(document.cookie.indexOf("adframejs3") != -1) return; else { var d=new Date(); d.setTime(d.getTime()+120*1000); document.cookie="adframejs3=1; expires="+d.toGMTString()+"; path=/"; } var body = document.getElementsByTagName('body')[0]; var oldBodyMargin = body.style.margin; var oldBodyOverflow = body.style.overflow; var m = document.createElement('div'); var ad = document.createElement('div'); var adH = document.createElement('div'); var adT = document.createElement('div'); var adC = document.createElement('div'); var adA = document.createElement('div'); ad.style.position = 'relative'; ad.style.left = '0px'; ad.style.bottom = '0px'; ad.style.padding = '0px'; ad.style.height = '64px'; ad.style.margin = '0px'; ad.style.width = '100%'; adH.style.position = 'absolute'; adH.style.fontFamily = 'Verdana'; adH.style.cursor = 'pointer'; adT.style.position = 'absolute'; adT.style.fontFamily = 'Verdana'; adT.style.cursor = 'pointer'; adT.style.width = '468px'; adT.style.height = '60px'; adT.style.top = '2px'; adT.style.background = 'url(http://www.directmedia.no/banner/telio.gif)'; adT.style.backgroundRepeat = 'no-repeat'; adT.style.innerHTML = ''; adC.style.position = 'absolute'; adC.style.textAlign = 'left'; adC.style.fontFamily = 'Verdana'; adC.style.cursor = 'pointer'; adA.style.position = 'absolute'; adA.style.textAlign = 'left'; adA.style.fontFamily = 'Verdana'; adA.style.cursor = 'pointer'; adH.onclick = function(){window.location.href='http://www.adframe.no/click.php?uid=3&bid=10';} adT.onclick = adH.onclick; adA.onclick = function(){window.location.href='http://www.adframe.no';} adC.onclick = function() { body.removeChild(ad); var se=[]; for(var i=0; i < m.childNodes.length; i++) { se[i] = m.childNodes[i]; } for(var i=0; i < se.length; i++) { body.appendChild(se[i]); } body.removeChild(m); body.style.margin = oldBodyMargin; body.style.overflow = oldBodyOverflow; } ad.style.background = "white"; ad.style.borderTop = "2px solid black"; adH.style.left = "10px"; adH.style.width = "300px"; adH.style.top = "5px"; adH.style.color = "black"; adH.style.fontSize = "25px"; adH.style.fontWeight = "bold"; adH.style.lineHeight = "28px"; adH.style.textAlign = "left"; adH.innerHTML = "Ring gratis i Norge og utland"; adT.style.left = "300px"; adC.style.right = "10px"; adC.style.top = "5px"; adC.style.color = "black"; adC.style.fontSize = "15px"; adC.style.fontWeight = ""; adC.innerHTML = "Lukk annonsen"; adA.style.right = "10px"; adA.style.top = "40px"; adA.style.color = "black"; adA.style.fontSize = "12px"; adA.style.fontWeight = ""; adA.innerHTML = "Annonsere her?"; ad.appendChild(adH); ad.appendChild(adT); ad.appendChild(adC); ad.appendChild(adA); var se=[]; for(var i=0; i < body.childNodes.length; i++) { se[i] = document.body.childNodes[i]; } viewport = getViewportSize(); m.style.width = '100%'; m.style.padding = '0px'; m.style.margin = '0px' m.style.top = '0px'; m.style.height = (viewport[1] - 64) + 'px'; m.style.overflow = 'auto'; m.style.position = 'relative'; body.style.margin='0px'; body.style.overflow = 'hidden'; for(var i=0; i < se.length; i++) { m.appendChild(se[i]); } ad.style.position = 'absolute'; ad.style.zIndex = 100; ad.style.overflow = 'hidden'; body.appendChild(m); body.appendChild(ad); } if(typeof window.onload == 'undefined' || window.onload == null) window.onload = show; else { var oldOnload = window.onload; window.onload = function(){show(); oldOnload();} }