//Xilinx modifications for proper browser functioning.
var nWebhelpNavPaneMode = 2;			//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 bNoApplet  = false;

var strPane = "";

var nViewFrameType = nWebhelpNavPaneMode;

if (!window.gAgent)
{
	// low end browser, we don't even try to determine it.
	document.location = "whnjs.htm";
}
else
{
	if (!gbNav4 && !gbIE4)				
		document.location = "whnjs.htm";
	if (gbNav4 && !gbNav6 && ((gnVerMinor <= 4.06)))
		document.location = "whnjs.htm";
	if (gbMac && gbIE4 && !gbIE5)		
		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 (gbNav4 && !gbNav6)
			nViewFrameType = 2;
		if (gbNav4 && !gbNav6 && (gnVerMinor < 4.1))
			nViewFrameType = 3;
		if (gbNav4 && !gbNav6 && (gnVerMinor == 4.6))
			nViewFrameType = 3;
		if (gbNav6 && !gbNav61 && nWebhelpNavPaneMode == 2)
			nViewFrameType = 3;
		if (gbIE4 && gbDHTML)
			nViewFrameType = 1;
		if (gbIE4 && gbSunOS && nWebhelpNavPaneMode == 2)
			nViewFrameType = 3;
		if (gbMac)
			nViewFrameType = 3;
		if ((bNoApplet) && (nViewFrameType == 2))
			nViewFrameType = 3;
		if (gbOpera)
			nViewFrameType = 3;
		if (gbFirefox)
			nViewFrameType = 3;
		if ((nViewFrameType == 1) && gbServedFromWeb)
			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)
{
	if (gbNav4 && !gbNav6)
		strPane = strPaneList;
	else
		strPane = strPaneDHTML;
}
else if (nViewFrameType == 2)
	strPane = strPaneApplet;
else
	strPane = strPaneList;

