var helpChild;
function openHelpWind( context ) {
 // If no parameter passed, obtain help context from Content Page
 if ( arguments.length == 0 && ( top.PageContent && top.PageContent.helpContext ) ) { context = top.PageContent.helpContext; }
 var lHelpPath="/cv/cvhelp/"
 var winFeatures = "height=" + (screen.availHeight - 500) + ",width=" + (screen.availWidth - 700) + ",top=0,left=0,menubar=yes,toolbar=no,resizable=yes,scrollbars=auto,status=no";
 if ( helpChild && ! helpChild.closed ) {
  helpChild.name = context;
  helpChild.focus();
 } else {
  helpChild = window.open(lHelpPath, context, winFeatures);
 }
}


var wFieldHelp;
var sLastPage;
function OpenFieldHelpWindow(sPage,sMode)
{
	 
	//argument sPage is the name of the HTML file that will load in the child window.  
	//argument sPage is either set to 'focus' or 'click' depending on which type of input element was used to call the function.
	//'focus' will usually be either a text box or drop-down list and 'click' mode will usually come from a button of some kind. 
	 var bContinue=true;
	 var lHelpPath="/cv/cvhelp/"
	 
	 //to use locally set the path to blank.
	 lHelpPath="/cv/cvhelp/";
	 
	 var winFeatures = "height=" + (screen.availHeight/1.5) + ",width=" + (screen.availWidth/1.5) + ",top=0,left=0,menubar=yes,toolbar=no,resizable=yes,scrollbars=auto,status=no";
	 if(sMode=="focus")
	 {
	 	bContinue=(wFieldHelp && !wFieldHelp.closed);
	 	if(sLastPage==sPage)bContinue=false		
	 }
	 if(bContinue)
	 {
	 	wFieldHelp = window.open(lHelpPath+sPage, "FieldHelpWindow", winFeatures);
	 	wFieldHelp.focus();
		sLastPage=sPage;
	}
}

