var helpWindow;

function openHelpWindow( attrDesc, helpText )
{
	if (!helpWindow || helpWindow.closed) {
		var w = 300;
	    var h = 450;
	    var l = parseInt((screen.availWidth/2) - (w/2));
	    var t = parseInt((screen.availHeight/2) - (h/2));
	    var f = "width=" + w + ",height=" + h + 
	        ",status,resizable,scrollbars,left=" + l + ",top=" + t + 
	        ",screenX=" + l + ",screenY=" + t;
	    helpWindow = window.open("", "NewWindow", f);
	    
	    // delay writing until window exists in IE/Windows
        setTimeout("openHelpWindow(helpText)", 50);
    } else if (helpWindow.focus) {
        // window is already open and focusable, so bring it to the front
    	helpWindow.focus();
    }
    
	var content = '<html><head><title>Help - ' + attrDesc + '</title>'
	+ '<link href="help_popup_css.css" rel="stylesheet" type="text/css" />'
	+ '<script type="text/javascript" language="JavaScript" src="jscript.js"></script>'
	+ '</head><body>'
	+ '<h3>Help - ' + attrDesc + '</h3>'
	+ helpText
	+ '<p><a href="javascript:window.close();">Close Window</a></p>'
	+ '</body></html>';
	
	
    // write HTML to new window document
    helpWindow.document.write(content);
    helpWindow.document.close( ); // close layout stream
}

