//Xilinx modifications for proper browser functioning.
var nWebhelpNavPaneMode = 1;			//1: DHTML 2:Applet 3:PureHTML 4:NoframeAt all
var strPaneDHTML  = "whskin_pdhtml.htm";		//whd_nvp10.htm  if tab enabled, whnframe.htm if tab disabled.
var strPaneApplet = "whskin_papplet.htm";
var strPaneList   = "whskin_plist.htm";

var strPane = "";

var nViewFrameType = nWebhelpNavPaneMode;

if (!window.gAgent)
{
	// low end browser, we don't even try to determine it.
	document.location = "whnjs.htm";
}
else
{
	//Handle cases where we need to show pure HTML navigation	
	if (gbMac)			//Macintosh operating system
		document.location = "whnjs.htm";
	if (gbSunOS)			//Solaris operating system
		document.location = "whnjs.htm";
	if (!gbNav4 && !gbIE4)		//Browser is not Navigator or IE
		document.location = "whnjs.htm";
	if (gbNav4 && !gbNav61)		//Navigator version 4.xx or 6.0 browser
		document.location = "whnjs.htm";
	if (gbOpera)			//Opera browser
		document.location = "whnjs.htm";
	//if (gbFirefox && !gbServedFromWeb)	//Firefox opened locally
	//	document.location = "whnjs.htm";
	//figure out which mode is the best
	if ((nWebhelpNavPaneMode == 1) ||
		(nWebhelpNavPaneMode == 2))
	{
		var gbDHTML = (nWebhelpNavPaneMode == 1);
		if (nWebhelpNavPaneMode == 2)
			nViewFrameType = 2;
		if (gbIE4 && gbDHTML)	//IE with DHTML support
			nViewFrameType = 1;
		if ((nViewFrameType == 1) && gbServedFromWeb)
			nViewFrameType = 2;	//Any browser on the web
		if (gbNav6 && gbNav61)	//Navigator 6.1 or higher browser
			nViewFrameType = 2;
	}
}

var gbWindows = ((gAgent.indexOf("win") != -1) || (gAgent.indexOf("16bit") != -1));
//The colordepth of the 16 color on Windows is 1. 
if ((gbWindows) && (gbNav4) && (window.screen) && (window.screen.colorDepth <= 4))
{
   alert("WebHelp has detected that your display is set to 16 colors. For full WebHelp support, please set your display to use 256 or more colors.");
   nViewFrameType = 3;
}

//figure out which one is navpane
// ReplaceMark:nViewFrameType = 1
if (nViewFrameType == 1)
	strPane = strPaneDHTML;
else if (nViewFrameType == 2)
	strPane = strPaneApplet;
else
	document.location = "whnjs.htm";

