var monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"), weekdayNames = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); // Open new window at right side of screen function openNewWindow(url) { wnd = window.open(url, 'opd_' + url.substr(23, 4) + '_' + url.substr(21, 1), 'width=380,height=545,top=10,left=' + (window.screen.availWidth - 400)); wnd.focus(); return false; } // Check e-mail address validity function CheckEmail(email) { if ( (email.indexOf(' ') != -1) || (email.indexOf('@', 1) == -1) ) { return false; } emailDomain = email.substr(email.indexOf('@') + 1); if ( (emailDomain.length < 4) || (emailDomain.indexOf('.', 1) == -1) ) { return false; } emailEnding = emailDomain.substr(emailDomain.indexOf('.') + 1); if (emailEnding.length < 2) { return false; } return true; } function rtrim(str) { return str.replace(/\s+$/g,""); } function ltrim(str) { return str.replace(/^\s+/g, ""); } function trim(str) { return str.replace(/\s+$|^\s+/g, ""); } var requiredVersion = 5, // Version the user needs to view site (max 7, min 2) flash2Installed = false, flash3Installed = false, flash4Installed = false, flash5Installed = false, flash6Installed = false, flash7Installed = false, maxVersion = 7, actualVersion = 0, isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false, isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false, bFlashPresent = false; if(isIE && isWin){ document.write(' \n'); document.write('on error resume next \n'); document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n'); document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n'); document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n'); document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n'); document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n'); document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n'); document.write(' \n'); } function detectFlash() { if (navigator.plugins) { if ( navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"] ) { var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "", flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description, flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1)); // DEBUGGING: uncomment next line to see the actual description. //alert("Flash plugin description: " + flashDescription); flash2Installed = flashVersion == 2; flash3Installed = flashVersion == 3; flash4Installed = flashVersion == 4; flash5Installed = flashVersion == 5; flash6Installed = flashVersion == 6; flash7Installed = flashVersion >= 7; } } for (var i = 2; i <= maxVersion; i++) { if (eval("flash" + i + "Installed") == true) actualVersion = i; } if(navigator.userAgent.indexOf("WebTV") != -1) actualVersion = 2; // uncomment next line to display flash version during testing //alert("version detected: " + actualVersion); if (actualVersion >= requiredVersion) { bFlashPresent = true; } } detectFlash();