isHelp = false;

function help() {

	if( !isHelp || help_window.closed ) {
		isHelp = true;
		var W;
		var H;
		var sWD;
		var sc=window.screen.width;
		var agent = navigator.userAgent.toLowerCase();
	
		if(sc<= 800 && agent.indexOf("mac")==-1) {
			W=170;
		} else {
			W=220;
		}
		if(agent.indexOf("windows")>0 && agent.indexOf("aol")>0) {
			H=window.screen.availHeight-window.screenTop-22;
		} else {
			H=window.screen.availHeight-30;//*AOL
		}
		sWD="toolbar=0,status=0,menubar=0,width="+W+",height="+H+",left="+(sc-W)+",top=0,resizable=1";
		help_window=window.open("./inc/help.jsp", "helpWindow", sWD);
		moveTo(0,0);
		resizeTo(window.screen.width-W,window.screen.availHeight);
	} else {
		help_window.content_bottom.location = "./inc/help_index.jsp";
	}
}

function help_id(help_id) {
	document.location = "help_index.jsp?helpID=" + help_id;
}

function help_article(help_article) {
	if( !isHelp || help_window.closed ) {
		isHelp = true;
		var W;
		var H;
		var sWD;
		var sc=window.screen.width;
		var agent = navigator.userAgent.toLowerCase();
	
		if(sc<= 800 && agent.indexOf("mac")==-1) {
			W=170;
		} else {
			W=220;
		}
		if(agent.indexOf("windows")>0 && agent.indexOf("aol")>0) {
			H=window.screen.availHeight-window.screenTop-22;
		} else {
			H=window.screen.availHeight-30;//*AOL
		}
		sWD="toolbar=0,status=0,menubar=0,width="+W+",height="+H+",left="+(sc-W)+",top=0,resizable=1";
		help_window=window.open("./inc/help.jsp?helpStr=" + help_article, "helpWindow", sWD);
		top.window.moveTo(0,0);
		top.window.resizeTo(window.screen.width-W,window.screen.availHeight);
	} else {
		help_window.content_bottom.location = "./inc/help_index.jsp?helpStr=" + help_article;
	}
}

function close_help(){
	isHelp = false;
	resizeTo(window.screen.width,window.screen.height);
}
