SlideIn = { init : function() { if( (this.is_ie > 5 || this.is_ie == false) && this.frame_check() === true && this.cookie.init() === true ) { // show layer this.id = this.id(8); this.url = 'http://www.qualigo.de/doks/search/source/std/iframe_banner.php?ds=kilulade&subds=316365&m=de&format=ad_780x1200_preview&target=1&trackingurl=&col_headline=0000A0&col_text=404040&col_url=008040&col_bg=F2F2F2&col_border=858585'; this.cookie.expiration_value = 10800000; this.layer.size.width = 798; this.layer.size.height = 500; this.layer.url = this.url; this.layer.init(this.id); } }, cookie : { cookie_name : 'slideInLayer', cookie_value : false, cookie : null, enabled : ( navigator.cookieEnabled ? true : false ), init : function() { if(this.enabled && !this.exists() && this.set()) return true; return false; }, exists : function() { if( document.cookie.indexOf(this.cookie_name+"=") >= 0 ) return true; return false; }, set : function(cookie_name) { document.cookie = this.cookie_name+"="+this.cookie_value+";expires="+this.expiration()+";"; return this.exists(); }, del : function() { document.cookie = this.cookie_name+"=;expires="+(new Date).toGMTString()+";"; return !this.exists(); }, expiration_value : null, expiration : function() { delay = this.expiration_value == null ? ( 1000 * 60 * 60 * 24 ) : this.expiration_value; expires = new Date((new Date).getTime()+delay); expires = expires.toGMTString(); return expires; } }, layer : { pos : { x : null, y : null }, margin : { top: 24, right: 0, bottom: 24, left: 0 }, size : { width : 600, height : 400 }, init : function(ident) { this.ident = ident; if(this.create()) return true; }, startpos : function() { x = -((this.size.width)+4); y = 50; this.pos.x = x; this.pos.y = y; return [x, y]; }, create : function() { output = ''; output += ''; output += 'Linktipps zu Freehosting'; output += 'Seite in neuem Fenster öffnen'; output += 'Schließen' output += 'Seite in neuem Fenster öffnen'; output += 'Sponsored Links by QualiGO'; output += ''; output += ''; lay = document.createElement('div'); lay.style.border = "1px solid #006"; lay.style.overflow = "hidden"; lay.style.position = "absolute"; lay.style.left = this.startpos()[0]+"px"; lay.style.top = this.startpos()[1]+"px"; lay.style.padding = "0px"; lay.style.margin = "0px"; lay.style.width = this.size.width+"px"; lay.style.height = this.size.height+"px"; lay.style.background = "#FFF"; lay.style.zIndex = 9999999; lay.style.textAlign = 'left'; lay.id = this.ident; lay.innerHTML = output; document.getElementsByTagName('body')[0].appendChild(lay); setTimeout("var SliderOutInterval = setInterval(\"SlideIn.layer.move('out')\", 10);", 2000); return true; }, hide : function(cookie) { var SliderInInterval = setInterval("SlideIn.layer.move('in')", 10); cookie = arguments[0] || 0; if(cookie == 1) SlideIn.cookie.del(); }, move : function(direction) { if(direction == 'out') { if(this.pos.x < 50) { this.pos.x = this.pos.x + 25; document.getElementById(this.ident).style.left = this.pos.x+"px"; } else { if( typeof(SliderOutInterval) != 'undefined' ) clearInterval(SliderOutInterval); } } else if(direction == 'in') { if(this.pos.x > -(this.size.width+10)) { this.pos.x = (this.pos.x - 50); document.getElementById(this.ident).style.left = this.pos.x+"px"; } else { // clearInterval(SliderInInterval); } } }, onscroll : ( function() { window.onscroll = function() { if(document.getElementById(SlideIn.layer.ident)) { if(navigator.appVersion.search(/MSIE/) && window.ActiveXObject) { window.pageYOffset = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop; } document.getElementById(SlideIn.layer.ident).style.top = SlideIn.layer.pos.y > (SlideIn.layer.pos.y + window.pageYOffset) ? (SlideIn.layer.pos.y - window.pageYOffset) : (SlideIn.layer.pos.y + window.pageYOffset)+'px'; } } } )() }, id : function(length) { length = length || 6; chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; output = ''; for(i = 0; i < length; i++) { if(i == 0) output += chars[parseInt(Math.random()*(chars.length-10))]; else output += chars[parseInt(Math.random()*chars.length)]; } return output; }, is_ie : ( function() { ie = navigator.appVersion.match(/MSIE ([0-9]+(?:.[0-9]*))/); if(ie && window.ActiveXObject) { return ie[1].substr(0, 1); } else return false; } )(), open : function() { url = arguments[0] ? arguments[0] : this.url; open(url, 'adv_powered_'+this.id, 'resizable=yes, scrollbars=yes, menubar=yes, toolbar=yes, status=yes, location=yes, width='+(this.layer.size.width+50)); this.layer.hide(); }, frame_check : function() { if(parent != window) { if(body_ref = document.getElementsByTagName('body')[0]) { if(body_ref.offsetWidth > parseInt(this.layer.size.width/2) && body_ref.offsetHeight > parseInt(this.layer.size.height/2)) { return true; } else { return false; } } else { return false; } } else { return true; } } } if( typeof window.onload != 'function' ) { window.onload = function() { SlideIn.init(); }; } else { var old_window_onload = window.onload; window.onload = function() { old_window_onload(); SlideIn.init(); }; }