// JavaScript Document

//Browser Detection and Window Opening Functions
//Get the browser agent and create variables for the functions.
var detect = navigator.userAgent.toLowerCase();
var browser,theString;

//Determine the browser type.
function checkBrowser(string)
{
	place= detect.indexOf(string) + 1;
	theString = string;
	return place;
}

function checkCompat(type)
{
	
	type = type +".html";
	//If the browser is IE call launchIEWin, otherwise if it is Mozilla or Netscape compatible call launchOther. Otherwise a note.	
	if (checkBrowser('msie') && navigator.platform.indexOf("Win") > -1) launchIEWin(type);
	else if (checkBrowser('msie') && navigator.platform.indexOf("Mac") > -1) launchOther(type);
	else if (checkBrowser('compatible')) launchOther(type);
	else if (checkBrowser('mozilla')) launchOther(type);
	else document.write("Browser Not Supported.");
}

//Call window for IE. Body tag in referenced HTML includes scroll=no to suppress scrollbars.
function launchIEWin(thePage)
{
	newwin = window.open(thePage,"Content","toolbar=no,menubar=no,status=no,scrollbars=0,resizable=no,top=0,left=0,fullscreen=yes");
}

//Launch others. This will not kill the titlebar or make it full screen.
function launchOther(thePage)
{
	//netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite")
	newwin = window.open(thePage,"_blank", "Content","height=768, width=1024 ,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
	newwin.moveTo(0,0);
	newwin.resizeTo(screen.availWidth,screen.availHeight);
	newwin.statusbar.visible = false;
	newwin.personalbar.visible = false;
	newwin.titlebar.visible = false;
}