// JavaScript Document



//	Browser detection
var w3c = (document.getElementById) ? true : false;
var ie = (document.all && !w3c) ? true : false;
var ns4 = (document.layers) ? true : false;






// Initiaize function
function init()
{
	// Put the close page button in (only on help page)
	if (document.getElementById('innerContent') && document.getElementById('helpPage'))
	{
		var innerContent = document.getElementById('innerContent');
		var closeButton = closeWindowButton();
		innerContent.appendChild(closeButton);
	}
}






// Pop open the help window
function popHelpWindow()
{
	var help = window.open('help.php', 'help', 'status=0,toolbar=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=300,width=460');
	help.focus();
	return false;
}







// Create a "Close Window" button
function closeWindowButton()
{
	var closeButton = document.createElement('p');
	var thetext = document.createTextNode('Close');
	closeButton.className = 'closeButton';
	closeButton.onclick = function() { window.close() };
	closeButton.appendChild(thetext);
	return closeButton;
}






// Initialize the JS on the page
if (w3c) 
{ 	
	window.onload = init;
}



