// functions.js
				//public functions and constants available to pmi applications
	
	/*------------------------
	dependencies:  none.
	contents:
		help window
	usage:  optional.
	------------------------*/


//--------------------------------
//global methods
//--------------------------------
function displayHelp(str) {
				//display the given string in the help window
	
	//note: the given string should be in a valid HTML format.
	//		the given string will be placed within a null <BODY> element for display.
	//      if an empty string is given, the default text will be displayed.
	
	//note: the help window is opened by calling showHelpWindow() in gfunctions.
	
	//determine if help window is open
	if (typeof(escHelpWin) == "object") {
		if (!escHelpWin.closed) {
			
			//set default text
			var csStart = "<html> \
				<head> \
					<title>ESC-NC Online Help</title> \
					<link rel=\"stylesheet\" href=\"/esc/pmi/include/pmiPortal.css\" /> \
				</head> \
				<body>";
			var csDefault = "<div class=\"subheading\">Context-sensitive Help</div> \
					<br /> \
					<div class=\"bodylarger\">To get help on any item, place the cursor in the item that you would like help with.</div> \
					<br /> \
					<div class=\"bodylarger\">You may move the cursor by tabbing to the desired item, or clicking on the item with your mouse.</div> \
					<br /> \
					<div class=\"blurb\">Please note that not all items have online help.</div>"
			var csEnd = "<br /> \
					<div class=\"footer\"><a href=\"javascript:window.close();\"><img src=\"/esc/pmi/images/navBtn-Cancel.gif\" alt=\"Close Help Window\" border=\"0\" width=\"70\" height=\"20\" /></a></div> \
				</body> \
				</html>";
			
			//display default if no string is given
			if (!str) str = csDefault;
			
			//write entire document
			str = csStart + str + csEnd;
			
			//update help window
			escHelpWin.document.write(str);
			escHelpWin.document.close();
		}
	}
}