var win = new Array(); function openPopup(name,url,size,title) { // open a new window // Note: title no longer used. // It was used when we used to create a frameset win[name] = window.open(url,name,size); //This seems to cause a JS error on NS6, most platforms. // if( ! (navigator.appName == "Navigator" // && navigator.appVersion.indexOf("5.0") != -1)){ // win[name].focus(); // } if(win[name] != null && (win[name].closed == false) ){ win[name].focus(); } else { return false; } } function startWizard() { openPopup("wizard", "http://uenvoice.wimba.com:80/uenvoice/wizard/launcher.jsp", "scrollbars=no,resizable=yes,width=700,height=500"); } /* *********************** Operating Systems (general) ******************** */ function w_is_Mac() { return ( navigator.appVersion.indexOf("Mac") != -1 ); } function w_is_Windows() { return ( navigator.appVersion.indexOf("Win") != -1 ); } function w_is_Linux() { return ( navigator.appVersion.indexOf("Linux") != -1 ); } /* *********************** Operating Systems (specific) ******************** */ function w_is_Windows95() { MozillaSays = ( navigator.userAgent.indexOf("Win95") != -1 ); IEsays = ( navigator.userAgent.indexOf("Windows 95") != -1 ); return ( MozillaSays || IEsays ); } function w_is_WindowsME() { return ( navigator.userAgent.indexOf("Win 9x 4.90") != -1 ); } function w_is_Windows98() { MozillaSays = ( navigator.userAgent.indexOf("Win98") != -1 ); IEsays = ( navigator.userAgent.indexOf("Windows 98") != -1 ); return ( MozillaSays || IEsays ); } function w_is_WindowsNT() { MozillaSays = ( navigator.userAgent.indexOf("WinNT") != -1 ); IEsays = ( navigator.userAgent.indexOf("Windows NT") != -1 ) && ( navigator.userAgent.indexOf("Windows NT 5.0") == -1 ) && ( navigator.userAgent.indexOf("Windows NT 5.1") == -1 ); return ( MozillaSays || IEsays ); } function w_is_Windows2000() { return ( navigator.userAgent.indexOf("Windows NT 5.0") != -1 ); } function w_is_WindowsXP() { return ( navigator.userAgent.indexOf("Windows NT 5.1") != -1 ); } function w_is_MacOSX() { if ( ! w_is_Mac() ) { return false; } else return ( // Without the parenthesis, the parser would stop at the end of the line. (navigator.userAgent.indexOf("Mac OS X") > 0) || (navigator.userAgent.indexOf("MacOS X") > 0) || (navigator.userAgent.indexOf("MacOSX") > 0) || ( (navigator.userAgent.indexOf("MSIE") > 0) && (navigator.userAgent.indexOf("MSIE 4.") < 0) && (navigator.userAgent.indexOf("MSIE 5.0") < 0) && (navigator.userAgent.indexOf("MSIE 5.12") < 0) && (navigator.userAgent.indexOf("MSIE 5.13") < 0) && (navigator.userAgent.indexOf("MSIE 5.14") < 0) ) ); } function w_is_MacOS89() { // Indicates MacOS 8 or 9. return w_is_Mac() && !w_is_MacOSX(); // Not very elegant, but it works for now. } function w_get_OS() { // Returns a human-readable description of the operating system. if ( w_is_Windows() ) { if ( w_is_Windows95() ) return "Windows 95"; if ( w_is_Windows98() ) return "Windows 98 or Windows ME"; if ( w_is_WindowsME() ) return "Windows ME"; if ( w_is_WindowsNT() ) return "Windows NT"; if ( w_is_Windows2000() ) return "Windows 2000"; if ( w_is_WindowsXP() ) return "Windows XP"; return "Windows"; // When all else fails, be general. } else if ( w_is_Mac() ) { if ( w_is_MacOSX() ) return "MacOS X"; if ( w_is_MacOS89() ) return "MacOS 8/9"; return "MacOS"; // As with Windows, when all else fails, be general. } else { return "unknown operating system"; } } /* *********************** Browsers ******************** */ function w_is_IE() { // No platform that I know of uses indexOf("Internet Explorer"), // but I include it for good measure. return ( navigator.userAgent.indexOf("MSIE") != -1 ) || ( navigator.userAgent.indexOf("Internet Explorer") != -1 ); } function w_is_AOL() { // No platform that I know of uses indexOf("AOL"), // but I include it for good measure. return ( navigator.userAgent.indexOf("AOL") != -1 ); } function w_is_Safari() { return ( navigator.userAgent.indexOf("Safari") != -1 ); } function w_is_Mozilla() { // Includes both Netscape and Mozilla. // Many browsers try to pretend they are Mozilla, but they add // "(compatible; really some other browser)" on the end. return ( navigator.userAgent.indexOf("Mozilla") != -1 ) && ( navigator.userAgent.indexOf("(compatible") == -1 ) && !w_is_IE() && !w_is_Safari(); } function w_is_Firefox() { // Firefox browser return ( navigator.userAgent.indexOf("Firefox") != -1 ) ; } function w_is_Opera() { // Obviously, this function only works if Opera // chooses to admit that it's Opera. return ( navigator.userAgent.indexOf("Opera") != -1 ); } function w_get_browser_version() { // Returns browser version as a float (NOT a string). if ( w_is_AOL() ) { searchFor = "AOL "; } else if ( w_is_IE() ) { searchFor = "MSIE "; } else if ( w_is_Opera() ) { searchFor = "Opera/"; } else if ( w_is_Safari() ) { searchFor = "Safari/"; } else if ( w_is_Firefox() ) { searchFor = "Firefox/"; } else if ( w_is_Mozilla() ) { searchFor = "Mozilla/"; } else { searchFor = "/"; // Take a wild guess. } startSearch = navigator.userAgent.indexOf(searchFor); if ( startSearch == -1 ) { return null; // No match; return null. } else { startSearch += searchFor.length; ua = navigator.userAgent; // Here we use parseFloat, which is tolerant of // non-digits after the number. result = parseFloat( ua.substring(startSearch,ua.length) ); if ( result > 0.01 ) { return result; } else { return null; } } } function w_get_browser() { // Returns browser (with version) as string. version = w_get_browser_version(); if ( version == null ) version = ""; // In case version can't be detected. if ( w_is_AOL() ) { browser = "AOL"; } else if ( w_is_IE() ) { browser = "Internet Explorer"; } else if ( w_is_Opera() ) { browser = "Opera"; } else if ( w_is_Safari() ) { browser = "Safari"; } else if ( w_is_Firefox() ) { browser = "Firefox or Netscape"; version = ""; } else if ( w_is_Mozilla() ) { if ( version < 5.0 ) { browser = "Netscape"; } else { if ( navigator.userAgent.indexOf("Netscape6") != -1 ) { browser = "Netscape"; version = 6; } else { browser = "Mozilla or Netscape"; version = ""; // We can't detect minor versions, so it's all Mozilla 1. } } } else return "unknown browser"; // Stop here if we don't know the browser brand. return browser + " " + version; } /* * The following function determines any incompatibilities * in the user's platform. If the operating system is * not supported, returns "os". If the browser is not * supported, returns "browser". If the browser is * supported but needs Sun's Java 2 plug-in, returns * "plugin". If there is no incompatibilty, returns false. */ function w_not_supported() { ///////////// Mac /////////////// if ( w_is_Mac() ) { if ( w_is_MacOS89() ) { return "os"; } else if ( w_is_Firefox() ) { if (w_get_browser_version() < 1.5 ) { return true; } else { return false; } } else if ( w_is_Mozilla() ) { return "browser"; } else if ( w_is_IE() ) { return "browser"; } else if ( w_is_Safari() ) { if (w_get_browser_version () < 100 ) {// initial version of Safari on Panther return "browser"; } else { return false; } } else return "browser"; } ////////// Windows ////////////// else if ( w_is_Windows() ) { if ( w_is_Windows95() ) { return "os"; } else if ( w_is_Mozilla() ) { if ( w_get_browser_version() < 4.7 && !w_is_Firefox()) return "browser"; else return false; } else if ( w_is_IE() ) { if ( w_get_browser_version() < 5.0 ) return "browser"; } else if ( w_is_Opera() ) { if ( w_get_browser_version() < 6.0 ) // No point in complaining about Opera. return "browser"; } else return "browser"; } //////// Other Operating Systems //////// else { return "os"; // Unknown operating system. } return false; // If we get here, no problems. } function w_component(p) { if (document.URL.substring(0,4) == "file") { document.writeln("Wimba applet will be here"); document.writeln("
(The applet will appear only on web pages served by a web server, not on web pages accessed through the file system)"); return; } w_s(p,"align","baseline",false); w_s(p,"codebase","http://uenvoice.wimba.com:80",false); w_s(p,"context_path","/uenvoice",false); w_s(p,"font","Arial Unicode MS, Dialog",false); //w_s(p,"font","Arial Unicode MS, Bitstream Cyber CJK, Code2000, Dialog", false); w_s(p,"loglevel","warn",false); ////////// Macintosh ////////// if ( w_is_Mac() ) { w_applet(p) } //////////// Win32 ////////// else if ( w_is_Windows() ) { // Internet Explorer if ( w_is_IE() ) { w_object(p); } // Netscape: use EMBED if have Sun's Java 2 plugin. else if ( w_is_Mozilla()) { w_embed(p); } else { w_applet(p); } } //////////// Linux, Solaris, etc. (probably Netscape) //////////// else { w_applet(p); } if (p.diagnostic == "true" || p.popup == "true") { document.write("

"); } if (p.diagnostic == "true") { if ( w_not_supported() ) { // TODO: find a better (internationalized) message. document.write("Warning: this platform does not appear to be supported. "); } if (p.browser_check_link) { document.write("Setup Wizard"); } } if (p.popup == "true") { if (p.diagnostic == "true" && p.browser_check_link) { document.write(" - "); } document.write("Refresh"); } if (p.diagnostic == "true" || p.popup == "true") { document.write("


"); } } function w_s(o, name, value, force) { if (force || o[name]==null) o[name]=value; } function w_applet(p) { document.writeln(""); // Because of a bug in Netscape 4, we don't want to // send the width and height to the PARAM tags. p.width = null; p.height = null; for (i in p) { if (p[i]!=null){ document.writeln(""); } } document.write("
Java is not installed, or the version of Java is too old.\n"); document.write("Please, run the Setup Wizard and select to install Java when prompted.
"); document.writeln("
"); } function w_object(p) { document.write(""); // These result in a bug in Netscape 4. // Why take the chance of bugs with other browsers? p.width = null; p.height = null; for (i in p) { if (p[i]!=null){ document.writeln(""); } } document.writeln(""); document.write("
Java is not installed, or the version of Java is too old.\n"); document.write("Please, run the Setup Wizard and select to install Java when prompted.
"); document.write("
"); } function w_embed(p) { document.write(""); document.writeln(""); document.write("<div class='error'>Java is not installed, or the version of Java is too old.\n"); document.write("Please, run the <a href='javascript:startWizard();'>Setup Wizard</a> and select to install Java when prompted.</div>"); document.writeln(""); } function w_voicedirect_tag(p) { // Applet tag params w_s(p,"width","620",false); w_s(p,"height","320",false); w_s(p,"name","voicedirect",false); w_s(p,"id","voicedirect",false); w_s(p,"archive","http://uenvoice.wimba.com:80/uenvoice/code/hwclients.jar",false); w_s(p,"code","VoiceDirect.class",false); // JS params w_s(p,"browser_check_link","true", false); w_s(p, "diagnostic", "true", false); // Applet params w_s(p,"server_url","http://uenvoice.wimba.com:80/uenvoice/com",false); w_s(p,"gui","http://uenvoice.wimba.com:80/uenvoice/gui/voicedirect/voicedirect.zip",false); w_s(p,"view_archives_url","http://uenvoice.wimba.com:80/uenvoice/board?action=display",false); w_s(p,"view_archives_target","wimba_archives",false); w_component(p); }