var activeSubnav = null; var dontHideSubnav = false; var timeoutSubnav = false; var initSubnav = null; // Mausposition immer global vorhalten: var mouse = new Object(); mouse.x = 0; mouse.y = 0; // Browserdetection macintosh = /mac/i; windowssys = /win/i; safari = /safari/i; ie = /msie/i; netscape = /netscape/i; // appName opera = /opera/i; // userAgent^ var IE = ie.test(window.navigator.appVersion); var SAFARI = safari.test(window.navigator.appVersion); var NETSCAPE = netscape.test(window.navigator.appName); var OPERA = opera.test(window.navigator.userAgent); var WIN=(windowssys.test(window.navigator.platform)); var MAC=(macintosh.test(window.navigator.platform)); function showSubnav(id) { if (timeoutSubnav) { window.clearInterval(timeoutSubnav); timeoutSubnav = false; } if (initSubnav != null) { initSubnav.style.display = 'none'; } if (activeSubnav != null && activeSubnav != document.getElementById(id)) // && activeSubnav != initSubnav && document.getElementById(id) != initSubnav { activeSubnav.style.display = 'none'; activeSubnav = null; window.setTimeout('showSubnav(\'' + id + '\');', 200); return; } //hideSubnav(id); activeSubnav = document.getElementById(id); activeSubnav.style.display = 'block'; } function hideSubnav(elmnt) { window.clearInterval(timeoutSubnav); timeoutSubnav = false; if (!dontHideSubnav && document.getElementById(elmnt) != initSubnav) { document.getElementById(elmnt).style.display = 'none'; activeSubnav = null; if (initSubnav != null) { initSubnav.style.display = 'block'; } } } function doHideSubnav(elmnt) { dontHideSubnav = false; if (timeoutSubnav) { window.clearInterval(timeoutSubnav); timeoutSubnav = false; } timeoutSubnav = window.setInterval('hideSubnav(\'' + elmnt + '\');', 1450); } function updatemousepos(e) { if (e) { mouse.x=e.pageX; mouse.y=e.pageY; } else { mouse.x=event.x; mouse.y=event.y; } if (IE) { mouse.y = mouse.y + document.body.scrollTop; mouse.x = mouse.x + document.body.scrollLeft; } } /////// FLYOUT //////// var flyoutInterval = null; var doHideFlyout = true; var flyoutYOffset = 60; var flyoutXOffset = 0; function showFlyout(line1, line2, line3, yOffset, xOffset, rightAlign) { var flyout = document.getElementById('flyout'); if (!rightAlign) { rightAlign = false; } if (!xOffset) { xOffset = 0; } flyout.style.left = mouse.x - 11 + xOffset; flyout.style.top = mouse.y - yOffset; flyoutYOffset = yOffset; flyoutXOffset = xOffset; document.getElementById('flyout_line_1').innerHTML = line1; document.getElementById('flyout_line_2').innerHTML = line2; document.getElementById('flyout_line_3').innerHTML = line3; if (rightAlign) { document.getElementById('flyoutFooter').style.textAlign = 'right'; } else { document.getElementById('flyoutFooter').style.textAlign = 'left'; } flyout.style.display = 'block'; flyoutInterval = window.setInterval('updateFlyoutPosition()', 100); doHideFlyout = false; } function performHideFlyout() { if (doHideFlyout) { document.getElementById('flyout').style.display = 'none'; window.clearInterval(flyoutInterval); } } function hideFlyout() { window.setTimeout('performHideFlyout()', 100); doHideFlyout = true; } function updateFlyoutPosition() { var flyout = document.getElementById('flyout'); flyout.style.left = mouse.x - 11 + flyoutXOffset; flyout.style.top = mouse.y - flyoutYOffset; } function audioplayer(id) { var win = window.open('http://www.joerg-loehr.com/tools/audioplayer.php?id=' + id, 'loehrMp3Player', 'width=320, height=238, scrollbars=0, menubar=0, toolbar=0, status=0'); win.moveTo(Math.round(screen.availWidth/2)-160, Math.round(screen.availHeight/2)-119); win.focus(); } function videoplayer(url) { var win = window.open('http://www.joerg-loehr.com/tools/videoplayer.php?url=' + url, 'loehrVideoPlayer', 'width=320, height=368, scrollbars=0, menubar=0, toolbar=0, status=0'); win.moveTo(Math.round(screen.availWidth/2)-160, Math.round(screen.availHeight/2)-159); win.focus(); } function hardvideoplayer() { var win = window.open('http://www.joerg-loehr.com/tools/videoplayer.php?praesiclip=1', 'loehrVideoPlayer', 'width=320, height=368, scrollbars=0, menubar=0, toolbar=0, status=0'); win.moveTo(Math.round(screen.availWidth/2)-160, Math.round(screen.availHeight/2)-159); win.focus(); } function agbPopup() { popUp('http://www.joerg-loehr.com/agb/popup.php', 520, 460, true); } function popUp(url, width, height, scrollbars) { if(!scrollbars) { scrollbars = 0; } else { scrollbars = 1; } var win = window.open(url, 'loehrPopup', 'width=' + width + ', height=' + height + ', scrollbars=' + scrollbars + ', menubar=0, toolbar=0, status=0'); win.moveTo(Math.round(screen.availWidth/2)-Math.round(width/2), Math.round(screen.availHeight/2)-Math.round(height/2)); win.focus(); } function deleteCookie(name, path, domain) { if (getCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } function initflash(divId) { document.getElementById(divId).innerHTML = document.getElementById(divId).innerHTML; } function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else { begin += 2; } var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } return unescape(dc.substring(begin + prefix.length, end)); } function setCookie(name, value, expires, path, domain, secure) { document.cookie= name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); }