if (WindowsPC == "TRUE")
{
	if (Explorer == "TRUE")
	{
		var timerID = setTimeout("ShowProgressBar();",5000);	
	
		document.write('<OBJECT');
		document.write(' ID="map"');
		document.write(' WIDTH=100%');
		document.write(' HEIGHT=100%');
		document.write(' CLASSID="CLSID:62789780-B744-11D0-986B-00609731A21D"');
		document.write(' CODEBASE="../Install/mgaxctrl.cab#Version=6,5,6,12">');
		document.write('    <PARAM NAME="URL" VALUE="'+parent.kaartmwf+'">');
		document.write('    <PARAM NAME="Lat" VALUE="0">');
		document.write('    <PARAM NAME="Lon" VALUE="0">');
		document.write('    <PARAM NAME="MapScale" VALUE="0">');
		document.write('    <PARAM NAME="MapWidth" VALUE="0">');
		document.write('    <PARAM NAME="MapUnits" VALUE="M">');
		document.write('    <PARAM NAME="ToolBar" VALUE="Off">');
		document.write('    <PARAM NAME="StatusBar" VALUE="On">');
		document.write('    <PARAM NAME="LayersViewWidth" VALUE="1">');
		document.write('    <PARAM NAME="DefaultTarget" VALUE="">');
		document.write('    <PARAM NAME="ErrorTarget" VALUE="">');
		document.write('    <PARAM NAME="ObjectLinkTarget" VALUE="">');
		document.write('    <PARAM NAME="ReportTarget" VALUE="">');
		document.write('    <PARAM NAME="URLList" VALUE="Off">');
		document.write('    <PARAM NAME="URLListTarget" VALUE="">');
		document.write('    <PARAM NAME="AutoLinkLayers" VALUE="">');
		document.write('    <PARAM NAME="AutoLinkTarget" VALUE="">');
		document.write('    <PARAM NAME="AutoLinkDelay" VALUE="20">');
		document.write('</OBJECT>');
		
		initVB();
	}
	if (Netscape == "TRUE")
	{
		if (MapGuidePlugin == "TRUE")
		{
		    document.write('<EMBED');
			if (NetscapeVersionSupported == "TRUE")
			    document.write(' SRC="'+parent.kaartmwf+'?TOOLBAR=Off&LAYERSVIEWWIDTH=1&ext=.mwf"');
			else
			{
				document.write(' SRC="'+parent.kaartmwf+'?LAYERSVIEWWIDTH=1&ext=.mwf"');
				parent.ToolBar.document.location = parent.ToolBar.document.URL.replace('Toolbar.asp','NoToolbar.htm');
				parent.Search.document.location = "../common/blanc.htm";
				parent.Info.document.location = "../common/blanc.htm";
			}
		    document.write(' WIDTH=100%');
		    document.write(' HEIGHT=100%');
		    document.write(' NAME="map"');
		    document.write(' BORDER="0"');
		    document.write(' ALIGN="baseline"');
			document.write(' TYPE="application/x-mwf">');

		    // The following script will add the HTML necessary to insert the
		    // observer applet for handling events for the Plug-in. The applet
		    // is only used in the Netscape environment.
			if (getMap() == null)
			{
				var ver = 6.0;        //installatie is bezig
			}
			else	
			{
	    		var ver = parseFloat(getMap().getApiVersion());
			}

		    if (ver >= 6.0)
		   	{
		       	document.write("<Java Applet CODE=\"MapGuideObserver6.class\" CODEBASE=\"../Classes\" WIDTH=2 HEIGHT=2 NAME=\"obs\" MAYSCRIPT id=Applet1>");
		        document.write("</APPLET>");
		   	}
			else
			{
				location="../Install/NetscapeInstall.htm";
			}	
		}
		else
		{
			location="../Install/NetscapeInstall.htm";
		}	
	}
}	
else  // Macintosh and others
{
	if (Macintosh == "TRUE")
	{ 
		// The following script will add the HTML necessary to insert the
		// observer applet for checking if the Java Edition is installed. 
		// Observer Applet written by Danny
		parent.process.document.open ('text/html', "replace");
		parent.process.document.write('<html><body bgcolor="Silver">');
		parent.process.document.write('<APPLET');
		parent.process.document.write(' NAME="CheckInstallAuto"');			
		parent.process.document.write(' WIDTH="0"');
		parent.process.document.write(' HEIGHT="0"');
		parent.process.document.write(' CODE="CheckInstallAuto.class"');
		parent.process.document.write(' CODEBASE="../Classes" MAYSCRIPT>');
		parent.process.document.write(' <PARAM NAME="ClassToCheck" VALUE="com.autodesk.mgjava.MGMapApplet">');
		parent.process.document.write(' <PARAM NAME="Installer" VALUE="../Install/macinstall.htm">');
		parent.process.document.write(' <PARAM NAME="TargetWindow" VALUE="Kaart">');
		parent.process.document.write(' <PARAM NAME="MinVersion" VALUE="6.5.5.7">');
		parent.process.document.write(' <PARAM NAME="VersionAPI" VALUE="getStaticVersion">');
		parent.process.document.write(' <PARAM NAME="InstallerNew" VALUE="../Install/macinstall.htm">');						
		parent.process.document.write('</APPLET>');
		parent.process.document.write('</body></html>');
		parent.process.document.close();

		if (Explorer == "TRUE")
		{
			MacIE = true;
			window.onresize = ResizeViewerApplet;
			 
			document.write('<APPLET');
			document.write(' NAME="MapguideViewer"');
			document.write(' WIDTH="100%"');
			document.write(' HEIGHT="100%"');
			document.write(' CODE="MOViewer/MapguideViewer.class"');
			document.write(' ARCHIVE="../Classes/MOViewer.jar">');
			document.write(' <PARAM');
			document.write('  NAME="mwfUrl"');
			document.write('  VALUE="'+parent.kaartmwf+'?LayersViewWidth=1">');	
			document.write('</APPLET>');

			document.write('<div id="SenderDiv" style="display:none">SenderDiv</div>');
		}

		if (Netscape == "TRUE")
		{
			document.write('<APPLET');
			document.write(' NAME=map');
			document.write(' WIDTH=100%');
			document.write(' HEIGHT=100%');
			document.write(' CODE="com/autodesk/mgjava/MGMapApplet.class">');
			document.write(' <PARAM');
			document.write('  NAME="mwfUrl"');
			if (NetscapeVersionSupported == "TRUE")
			    document.write('  VALUE="'+parent.kaartmwf+'?TOOLBAR=Off&LAYERSVIEWWIDTH=1&ext=.mwf"');
			else
			{
				document.write('  VALUE="'+parent.kaartmwf+'?LAYERSVIEWWIDTH=1&ext=.mwf"');
				parent.ToolBar.document.location = parent.ToolBar.document.URL.replace('Toolbar.asp','NoToolbar.htm');
			}		
			document.write('</APPLET>');
			document.write('<P>');

			// The following script will add the HTML necessary to insert the
			// observer applet for handling events for the Java Edition. The
			// applet is only used in the Netscape environment.
			document.write('<APPLET');
			document.write(' CODEBASE="../Classes"');
			document.write(' CODE="MapGuideObserver6J.class"');
			document.write(' WIDTH=2');
			document.write(' HEIGHT=2');
			document.write(' NAME=\"obs\" MAYSCRIPT>');
			document.write('</APPLET>\n');
			document.write('<P>');
		}
	}
	else
	{
//		alert("Others");
		document.write('<APPLET');
		document.write(' NAME=map');
		document.write(' WIDTH=100%');
		document.write(' HEIGHT=100%');
		document.write(' CODE="com/autodesk/mgjava/MGMapApplet.class">');
		document.write(' <PARAM');
		document.write('  NAME="mwfUrl"');
		document.write('  VALUE="'+parent.kaartmwf+'?LayersViewWidth=1">');
		document.write('</APPLET>');

		document.write('<P>');

		// The following script will add the HTML necessary to insert the
		// observer applet for handling events for the Java Edition. The
		// applet is only used in the Netscape environment.
		document.write('<APPLET');
		document.write(' CODEBASE="../Classes"');
		document.write(' CODE="MapGuideObserver6J.class"');
		document.write(' WIDTH=2');
		document.write(' HEIGHT=2');
		document.write(' NAME=\"obs\" MAYSCRIPT>');
		document.write('</APPLET>\n');
	
		document.write('<P>');

		// The following script will add the HTML necessary to insert the
		// observer applet for checking if the Java Edition is installed. 
		parent.process.document.open ('text/html', "replace");
		parent.process.document.write('<html><body bgcolor="Silver">');
		parent.process.document.write('<APPLET');
		parent.process.document.write(' NAME="CheckInstallAuto"');			
		parent.process.document.write(' WIDTH="0"');
		parent.process.document.write(' HEIGHT="0"');
		parent.process.document.write(' CODE="CheckInstallAuto.class"');
		parent.process.document.write(' CODEBASE="../Classes" MAYSCRIPT>');
		parent.process.document.write(' <PARAM NAME="ClassToCheck" VALUE="com.autodesk.mgjava.MGMapApplet">');
		parent.process.document.write(' <PARAM NAME="Installer" VALUE="http://www.mapguide.com/Downloads/">');
		parent.process.document.write(' <PARAM NAME="TargetWindow" VALUE="KaartFrame">');
		parent.process.document.write(' <PARAM NAME="MinVersion" VALUE="6.5.5.7">');
		parent.process.document.write(' <PARAM NAME="VersionAPI" VALUE="getStaticVersion">');
		parent.process.document.write(' <PARAM NAME="InstallerNew" VALUE="http://www.mapguide.com/Downloads/">');						
		parent.process.document.write('</APPLET>');
		parent.process.document.write('</body></html>');
		parent.process.document.close();
	}
}
