	var br = GetBrowser();        // Returns either "IE" or "Netscape"
	var pm = GetPlayerMajorVer(); // Returns Windows Media Player major version #
	var pn = GetPlayerMinorVer(); // Returns Windows Media Player minor version #
	var message = "";

	// alert("Broswer: " + br + ", PlayerMajor: " + pm + ", " + "PlayerMinor: " + pn);

	// Case 1: Media Player version is unknown, using Netscape and
	//         plugin installed and supported by Netscape version
	//if (pm=="unknown" && br=="Netscape" && parseInt(navigator.appVersion)<5 && IsNSPluginInstalled())  
	if (br=="Netscape") 
	   {
			navigator.plugins.refresh();
			document.writeln("<applet MAYSCRIPT Code=NPDS.npDSEvtObsProxy.class width=0 height=0 name=appObs id=appObs VIEWASTEXT></applet>");
			document.writeln("<embed type=\"application/x-mplayer2\"");
			document.writeln("  pluginspage=\"http://www.microsoft.com/windows/windowsmedia/\"");
			document.writeln("  src=\"" + NSPluginSrc + "\"");
			document.writeln("  Name=\"" + NSPluginName + "\"");
			document.writeln("  id=\"" + NSPluginName + "\"");
			document.writeln("  AutoStart" + NSPluginAutoStart + "");
			document.writeln("  ShowStatusBar=" + NSPluginShowStatusBar + "");
			document.writeln("  ShowControls=" + NSPluginShowControls + "");
			document.writeln("  ShowTracker=" + NSPluginShowTracker + "");
			document.writeln("  EnableTracker=" + NSPluginEnableTracker + "");
			document.writeln("  ShowPositionControls=" + NSPluginShowPositionControls + "");
			document.writeln("  EnablePositionControls=" + NSPluginEnablePositionControls + "");
			document.writeln("  width=" + NSPluginWidth + "");
			document.writeln("  height=" + NSPluginHeight + ">");
			document.writeln("</embed>");
			message += "<FONT color='#0000A0' size='-1' face='Arial'><B><a href='http://www.microsoft.com/windows/windowsmedia/download/default.asp' target='_blank'>Click here</a> to update or download Windows Media Player</B></FONT>";
	   }	
	// Case 2: Netscape alone detected.  Attempt WMP v9 applet.  If
	//         applet fails browser will be redirected to v9 download
	//         page.
	/* else if (br=="Netscape") 
	   {
			document.open();
			document.writeln("<applet NAME=\"" + NSAppletName + "\" CODE=\"WMPNS.WMP.class\" archive=\"wmpns.jar\" HEIGHT=\"" + NSAppletHeight + "\" WIDTH=\"" + NSAppletWidth + "\" MAYSCRIPT VIEWASTEXT>");
			document.writeln("	<param NAME=\"autoStart\" VALUE=\"" + NSAppletAutoStart + "\">");
			document.writeln("	<param NAME=\"enabled\" VALUE=\"" + NSAppletEnabled + "\">");
			document.writeln("	<param NAME=\"balance\" VALUE=\"" + NSAppletBalance + "\">");
			document.writeln("	<param NAME=\"volume\" VALUE=\"" + NSAppletVolume + "\">");
			document.writeln("	<param NAME=\"uiMode\" VALUE=\"" + NSAppletUiMode + "\">");
			document.writeln("	<param NAME=\"URL\" VALUE=\"" + NSAppletURL + "\">");
			document.writeln("</applet>");
			document.close();
			
			if (CheckForApplet()==false) {
				document.open();
				document.writeln("Windows Media Player v9 is not installed. Install it by clicking the button below.<br><br>");
				document.writeln("<A HREF=\"http://windowsmedia.com/download\"> <IMG SRC=\"http://go.microsoft.com/fwlink/?LinkId=10711\" WIDTH=\"88\" HEIGHT=\"31\" BORDER=\"0\" ALT=\"Get Windows Media Player\" VSPACE=\"7\"></A><br><br>");
				document.writeln("(If this does not resolve the problem, please make sure Java is enabled.)");
				document.close();
			} 
	  }*/	
	// Case 3: IE and WMP 7 or greater detected.		
	/* else if (br=="IE" && pm>=7)
	   {

			document.writeln("<object ID=\"" + IEWMPObjId + "\"");
			document.writeln("		 CLASSID=CLSID:" + IEWMPObjClID + "");
			document.writeln("		 standby=\"Loading Microsoft Windows Media Player components...\"");
			document.writeln("		 TYPE=\"application/x-oleobject\" width=\"" + IEWMPObjWidth + "\" height=\"" + IEWMPObjHeight + "\" VIEWASTEXT>");
			document.writeln("<param NAME=\"url\" VALUE=\"" + IEWMPObjURL + "\">");
			document.writeln("<param NAME=\"AutoStart\" VALUE=\"" + IEWMPObjAutoStart + "\">");
			document.writeln("<param NAME=\"uiMode\" VALUE=\"" + IEWMPObjUiMode + "\">");
			//document.writeln("<PARAM name=\"showControls\" value=\"true\">");
			//document.writeln("<param name=\"ShowStatusBar\" value=\"true\">");
			document.writeln("</object>");
			document.write("<scr");
			document.write("ipt language=\"javascript\">WMPVer=MediaPlayer.versionInfo;AddDownloadLink(GetPlayerMajorVer());</scr");
			document.write("ipt>");
	   }	*/
	// Case 4: i guess we don't like the new latest/greatest.  IE and WMP 6.4 detected.		
	else if ( (br=="IE" && pm==6 && pn==4) || (br=="IE" && pm>=7))
	   {
			document.writeln("<object ID=\"" + IEWMPObjId + "\"");
			document.writeln("			CLASSID=\"CLSID:" + IEWMP64ClID + "\"");
			document.writeln("			STANDBY=\"Loading Windows Media Player components...\"");
			document.writeln("			TYPE=\"application/x-oleobject\" VIEWASTEXT>");
			document.writeln("<param NAME=\"FileName\" VALUE=\"" + IEWMP64FileName + "\">");
			document.writeln("<param NAME=\"ShowStatusBar\" VALUE=\"" + IEWMP64ShowStatusBar + "\">");
			document.writeln("<param NAME=\"AutoStart\" VALUE=\"" + IEWMP64AutoStart + "\">");
			document.writeln("<param NAME=\"ShowControls\" VALUE=\"" + IEWMP64ShowControls + "\">");
			document.writeln("<param NAME=\"ShowTracker\" VALUE=\"" + IEWMP64ShowTracker + "\">");
			document.writeln("<param NAME=\"EnableTracker\" VALUE=\"" + IEWMP64EnableTracker + "\">");
			document.writeln("<param NAME=\"ShowPositionControls\" VALUE=\"" + IEWMP64ShowPositionControls + "\">");
			document.writeln("<param NAME=\"EnablePositionControls\" VALUE=\"" + IEWMP64EnablePositionControls + "\">");
			document.writeln("</object>");
			message += "<FONT color='#0000A0' size='-1' face='Arial'><B><a href='http://www.microsoft.com/windows/windowsmedia/download/default.asp' target='_blank'>Click here</a> to update or download Windows Media Player</B></FONT>";
	   }	   
	// Default Case:  Redirect to WMP v9 download page.	
	else	
	   {
	      message += "<FONT color='#0000A0' size='-1' face='Arial'><B><a href='http://www.microsoft.com/windows/windowsmedia/download/default.asp' target='_blank'>Click here</a> to update or download Windows Media Player</B></FONT>";
	   }	