//This script detects the following://Flash//Windows Media Player//Java//Shockwave//RealPlayer//QuickTime//Acrobat Reader//SVG Viewervar agt=navigator.userAgent.toLowerCase();var ie  = (agt.indexOf("msie") != -1);var ns  = (navigator.appName.indexOf("Netscape") != -1);var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));var mac = (agt.indexOf("mac")!=-1);if (ie && win) {	pluginlist = detectIE("Adobe.SVGCtl","SVG Viewer") + detectIE("SWCtl.SWCtl.1","Shockwave Director") + detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") + detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer") + detectIE("QuickTimeCheckObject.QuickTimeCheck.1","QuickTime") + detectIE("MediaPlayer.MediaPlayer.1","Windows Media Player") + detectIE("PDF.PdfCtrl.5","Acrobat Reader"); }if (ns || !win) {		nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();		pluginlist = detectNS("image/svg-xml","SVG Viewer") + detectNS("application/x-director","Shockwave Director") + detectNS("application/x-shockwave-flash","Shockwave Flash") + detectNS("audio/x-pn-realaudio-plugin","RealPlayer") + detectNS("video/quicktime","QuickTime") + detectNS("application/x-mplayer2","Windows Media Player") + detectNS("application/pdf","Acrobat Reader");}function detectIE(ClassID,name) { result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCRIPT>\n'); if (result) return name+','; else return ''; }function detectNS(ClassID,name) { n = ""; if (nse.indexOf(ClassID) != -1) if (navigator.mimeTypes[ClassID].enabledPlugin != null) n = name+","; return n; }pluginlist += navigator.javaEnabled() ? "Java," : "";if (pluginlist.length > 0) pluginlist = pluginlist.substring(0,pluginlist.length-1);var d, dom, ie, ienu, ie4, ie5, ie5x, ie6, moz, moznu, mac, win, old, lin,ie5mac, ie5xwin, op, opnu, op4, op5, op6, op7, konq, saf, saf_num;//variable initializationd = document;n = navigator;nav = n.appVersion;nan = n.appName;nua = n.userAgent;win = ( nav.indexOf( 'Win' )!= -1 );mac = ( nav.indexOf( 'Mac' )!= -1 );lin = ( nav.indexOf( 'Linux' )!= -1 );/*d.layers is preferred method to test for NS 4.x over placing a boolean value into ans4 variable as we do with the other browsers due to netscape 4x bugs*/if (!d.layers ){	dom = ( d.getElementById ); // useful for other functions often, for method testing	old = ( nav.substring( 0, 1 ) < 4 );	op = ( nua.indexOf( 'Opera' )!= -1 );	moz = ( nua.indexOf( 'Gecko' )!= -1 );	ie = ( d.all &&!op );	konq = ( nua.indexOf( 'Konqueror' )!= -1 );	saf = ( nua.indexOf( 'Safari' )!= -1 );		//test for opera first, that way the detector won't get caught on false identifying operas		if ( op ){		op_pos = nua.indexOf( 'Opera' );		opnu = nua.substr( ( op_pos + 6 ), 3 );		op5 = ( opnu.substring( 0, 1 ) == 5 );		op6 = ( opnu.substring( 0, 1 ) == 6 );		op7 = ( opnu.substring( 0, 1 ) == 7 );	} else if ( saf ){		//must test for safari before mozilla because safari nua string has 'gecko' in it.		saf_pos = nua.indexOf( 'Safari' );		saf_nu = nua.substr( ( saf_pos + 7 ), 2 );		//note, as of 6-21-03 safari is still in beta, saf_nu was around 70, 60 for early releases	}	else if ( moz ){		/*		note: mozilla browsers can be id'ed by rv number, but if you are trying to id		the actual Netscape 6 or greater browsers safely, you will need to use the build date.		We will have that code up shortly. Netscape 7 uses a rv number of about 1.0.1, so		this technique won't work accurately for all gecko id'ing		*/		rv_pos = nua.indexOf( 'rv' );		moz_rv = nua.substr( ( rv_pos + 3 ), 3 ); // use this for main version, like 0.9, 1.0, 1.1, 1.2		moz_rv_sub = nua.substr( ( rv_pos + 7 ), 1 );		moz_rv_sub = moz_rv + moz_rv_sub; // use this if exact version is required, like 0.9.4, ie netscape 6.2	}	else if ( ie ){		ie_pos = nua.indexOf( 'MSIE' );		ienu = nua.substr( ( ie_pos + 5 ), 3 );		ie4 = (!dom ); /* remember, IE 4 does not have much DOM support, if any, but it's a very small part of the market */		ie5 = ( ienu.substring( 0, 1 ) == 5 );		ie6 = ( ienu.substring( 0, 1 ) == 6 );	}	else{}		/*	Supposely that some browsers having problems if you don't close out the if/else if with an else, better safe than sorry	*/		/*	ie5x tests only for functionavlity. dom or ie5x would be default settings.	Opera will register true in this test if set to identify as IE 5	*/		ie5x = ( d.all && dom );		/*	mac opera registers false here. Remember, IE for Mac has nothing to do with IE for windows, it's a different	code base completely, functionally it's closest to Opera 5 or 6. Having javascript run on this correctly is a	hit and miss proposition; never assume your code will work on IE Mac, always test it on a Mac, both OS 9 and OS X	*/	ie5mac = ( mac && ie5 );	ie5xwin = ( win && ie5x );}	//This following script is used to generate a table with the tested result:function checkRequirements(itemTotest){	return (itemTotest) ? true : false;}function returnOSName(){	if (win) return "Windows";	else if (mac) return "MacIntosh";	else if (lin) return "Linux";	else return "Unknown OS";}function isWinOS(){	return (checkRequirements(win)) ? "Yes" : "Caution.  The course has been designed to work with the Windows operating system.";}function isScreenResOK(){	var correctwidth=1024;	var correctheight=768;	if (screen.width < correctwidth || screen.height < correctheight)		return "This webpage is bested viewed with screen resolution " + correctwidth + 						"*" +correctheight+" or above. Please change your screen resolution if possible.";	else		return "Yes";}function returnBrowserName(){	return nan;}function isSupportBrowser(){	return (win) ? "Yes" : " No.  The required browser for completing the course is Internet Explorer version 6 or later.";}function isFlashEnabled(){	return (pluginlist.indexOf("Flash")!=-1) ? "Yes" : "No.  The Flash 8+ plug-in is required by the course to provide interactive content and play videos.";}function isRealPlayerEnabled(){	return (pluginlist.indexOf("RealPlayer")!=-1) ? "Yes" : "Not detected. Some sections of this site contains RealPlayer audio files. You will need RealPlayer to be enabled.";}function isAcrobatEnabled(){	return (pluginlist.indexOf("Acrobat Reader")!=-1) ? "Yes" : "Possibly.  You will need the Adobe Reader 7+ plug-in.  We are unable to detect the Adobe Reader Plug-in or the version.  <a href='test_file.pdf' target='_blank'>Click here to download a small test file</a>.  Then, if you can see the file, you have Adobe Reader installed.";}function isFlashMeetRequierement(){	return (pluginlist.indexOf("Flash")!=-1) ? "Installed" : "Not Installed";}function isRealPlayerMeetRequierement(){	return (pluginlist.indexOf("RealPlayer")!=-1) ? "Yes" : "Not Installed";}function isAcrobatMeetRequierement(){	return (pluginlist.indexOf("Acrobat Reader")!=-1) ? "Installed" : "Not Detected";}function showBandwidth(num){	document.getElementById('kbsText').innerHTML=num + " KB/s";	if(num<=200){		showDiv('bandwidthNoDiv');	}else if(num>400){		showDiv('bandwidthYesDiv');	}else{		showDiv('bandwidthMaybeDiv');	}}function showDiv(theDiv){	document.getElementById(theDiv).style.display="block";}function showContent(){	document.getElementById('ContentWithoutScript').style.display="none";	document.getElementById('ContentWithScript').style.display="block";}function detectPopupBlocker() {	var myTest=window.open('','','width=1,height=1,left=0,top=0,scrollbars=no');  //var myTest = window.open("about:blank","1","directories=no,height=10,width=10,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,top=0,location=no");  if (!myTest) {    //alert("A popup blocker was detected.");	document.getElementById('popupStatusDiv').innerHTML="Blocker Enabled" ;	document.getElementById('popupNoDiv').style.display="block";  } else {    myTest.close();    //alert("No popup blocker was detected.");	document.getElementById('popupStatusDiv').innerHTML="Disabled" ;	document.getElementById('popupYesDiv').style.display="block";  }}//window.onload = detectPopupBlocker();