// Some basic JavaScript functions for our Digital Publishing Tool (www.dpt.at) // (c) 2005 by wired media. (www.wiredmedia.at) function isIE() { return (navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0); } // checkForFlashPlayer(requiredVersion: Integer); returns boolean, wether required Flash-Player Version is present on System or not. function checkForFlashPlayer(requiredVersion,noFlashURL) { //var lang=navigator.language; // Following Code is based on Work of Macromedia (www.macromedia.com). Thanks to them. var FlashCanPlay = false; var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0; if ( plugin ) { var words = navigator.plugins["Shockwave Flash"].description.split(" "); for (var i = 0; i < words.length; ++i) { if (isNaN(parseInt(words[i]))) continue; var FlashPlayerVersion = parseInt(words[i]); } if (FlashPlayerVersion < requiredVersion) document.location.href = noFlashURL+"⟨="+lang; } else if (isIE() && (navigator.appVersion.indexOf("Win") != -1)) { document.write('<'); document.write('SCRIPT LANGUAGE=VBScript\>\n'); //FS hide this from IE4.5 Mac by splitting the tag document.write('on error resume next \n'); document.write('FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+requiredVersion+'")))\n'); document.write('If FlashCanPlay = False Then \n'); document.write('document.location.href="'+noFlashURL+'" \n'); document.write('end if \n'); document.write('<'); document.write('/SCRIPT\> \n'); } else { document.location.href = noFlashURL; } } // getObject(id: String); returns pointer to DOM-Object with ID id. function getObject ($id) { if (document.all){ return document.all[$id]; } else if (document.getElementById){ return document.getElementById($id); } else if (document.layers){ document.layers[$id].style = document.layer[$id]; return document.layers[$id]; } else { alert("Fehler: Browsertyp nicht erkannt..."); return false; } } // getWindowHeight() / getWindowWidth(); returns integer with height of Browser-Window. function getWindowWidth(){ if (window.innerWidth) return window.innerWidth; else if (document.documentElement && document.documentElement.clientWidth) return document.documentElement.clientWidth; else if (document.body && document.body.offsetWidth) return document.body.offsetWidth; else return 0; } function getWindowHeight(){ if (window.innerHeight) return window.innerHeight; else if (document.documentElement && document.documentElement.clientHeight) return document.documentElement.clientHeight; else if (document.body && document.body.offsetHeight) return document.body.offsetHeight; else return 0; }