setCookie = function(NameOfCookie, value, expire_time) { var ExpireDate = new Date (); ExpireDate.setTime(ExpireDate.getTime() + (expire_time * 1000)); document.cookie = NameOfCookie + "=" + escape(value) + "; expires=" + ExpireDate.toGMTString() + "; path=/;"; } // inline_navbar.js function inline_navbar(height) { this.height = height || 26; this.old_paddingtop; initialize = function(ref) { if(navigator.appVersion.search(/MSIE \d{1}.\d{1}\d*;/) != -1 && !window.opera) { ie_match = navigator.appVersion.match(/MSIE (\d{1}).(\d{1})\d*;/); if(ie_match[1] == 7) window.ie7 = true; else if(ie_match[1] == 6) window.ie6 = true; else if(ie_match[1] == 5) { if(ie_match[2] == 5) window.ie55 = true; else if(ie_match[2] == 0) window.ie5 = true; } window.ie = true; } }; initialize(this); this.enabled = function() { if( document.cookie.indexOf('slideInToolbar') >= 0 ) return false; if( document.getElementsByTagName('body')[0].offsetWidth < 350 ) return false; return true; } this.getMargin = function() { marginSum = 0; body_element = document.getElementsByTagName('body')[0]; if(body_element.style.marginTop == '') { marginSum = body_element.getAttribute('marginheight', 0); if(typeof marginSum == 'string') marginSum = parseInt(marginSum.length > 1?marginSum.substr(1):marginSum); } else { marginSum = parseInt(body_element.style.marginTop.match(/(\d+)/)[1]); } return marginSum; } this.getPadding = function() { paddingSum = 0; body_element = document.getElementsByTagName('body')[0]; if(body_element.style.paddingTop != '') paddingSum = parseInt(body_element.style.paddingTop.match(/(\d+)/)[1]); if( body_element.style.paddingTop != 'undefined' ) this.old_paddingtop = body_element.style.paddingTop; return paddingSum; } this.display = function() { setCookie('slideInToolbar', (new Date).getTime(), 3); this.modifyBody(this.height); toolbar_iframe = document.createElement('iframe'); toolbar_link = document.createElement('a'); toolbar_button = document.createElement('img'); toolbar_iframe.id = "slideInToolbar"; toolbar_iframe.src = "http://www.qualigo.de/doks/search/source/std/iframe_navbar.php?ds=kilutode&subds=278805"; toolbar_iframe.frameBorder = "0"; toolbar_iframe.scrolling = "no"; toolbar_iframe.style.left = "0"; toolbar_iframe.style.top = "0"; toolbar_iframe.style.border = "0"; toolbar_iframe.style.height = this.height+"px"; toolbar_iframe.style.marginRight = "-10px"; toolbar_iframe.style.zIndex = "9999999"; toolbar_link.id = "KiluIframeButton"; toolbar_link.href = "#"; toolbar_link.onclick = function() { return inavbar.close(); }; toolbar_link.title = "Toolbar ausblenden"; toolbar_link.style.right = "10px"; toolbar_link.style.top = "6px"; toolbar_link.style.border = "0px"; toolbar_link.style.zIndex = "10000000"; toolbar_button.src = "/extra-additional-special/a2/img/close.gif"; toolbar_button.alt = "Toolbar ausblenden"; toolbar_button.style.border = "0px"; if(window.ie) { toolbar_iframe.style.position = "absolute"; toolbar_link.style.position = "absolute"; if(document.body.clientWidth) { toolbar_iframe.style.width = document.body.clientWidth+"px"; } } else { toolbar_iframe.style.position = "fixed"; toolbar_iframe.style.width = "100%"; toolbar_link.style.position = "fixed"; } toolbar_link.appendChild(toolbar_button); document.getElementsByTagName('body')[0].appendChild(toolbar_iframe); document.getElementsByTagName('body')[0].appendChild(toolbar_link); } this.close = function() { setCookie('slideInToolbar','disabled',60 * 60 * 3); var elm_body = document.getElementsByTagName('body')[0]; if(typeof elm_body != 'undefined') { var elm_qiframe = document.getElementById('slideInToolbar'); var elm_qbutton = document.getElementById('KiluIframeButton'); elm_body.removeChild(elm_qiframe); elm_body.removeChild(elm_qbutton); if( this.old_paddingtop != 'undefined' ) { elm_body.style.paddingTop = this.old_paddingtop; } else { delete elm_body.style.paddingTop; } } return false; } this.realign = function() { if(window.ie) { elm_qbutton = document.getElementById('KiluIframeButton'); page_Offset = (function() { if(window.ie) { if(document.documentElement.scrollTop != 0) { return document.documentElement.scrollTop; } else { return document.body.scrollTop; } } else { return window.pageYOffset; } })(); document.getElementById('slideInToolbar').style.top = page_Offset+'px'; document.getElementById('KiluIframeButton').style.top = (6 + page_Offset)+'px'; } } this.modifyBody = function(height) { modify_m = this.getMargin(); modify_p = this.getPadding(); body_element = document.getElementsByTagName('body')[0]; body_element.style.paddingTop = (this.height+modify_m+modify_p)+'px'; } } inavbar = new inline_navbar(); if( inavbar.enabled() ) { inavbar.display(); if(window.ie) { window.onscroll = function() { inavbar.realign(); } window.onresize = function() { inner_width = document.body.clientWidth; if(document.getElementById('slideInToolbar')) document.getElementById('slideInToolbar').style.width=inner_width+'px'; } } }