function openHelp(url, title, width, height) {
	if(!title) var title = 'qhelp';
	if(!width) var width = 770;
	if(!height) var height = 540;
	if(url) {
		url = '/quickHelp/'+url;
		var options='scrollbars=yes,menubar=no,height='+height+',width='+width+',resizable=yes,toolbar=no,location=no,status=no';
		var qhelp = window.open(url,title,options);
		qhelp.focus();
		return false;
	}
}

function closeHelp(url) {
	window.opener.focus();
	if(url) {
		window.opener.location.href=url;
	}
	window.close();
}

function addCloseHelpLinks() {
	jQuery("a.closeHelp").each(function(){
		var l = jQuery(this);
		l.attr("href","#");
		var p = l.attr('rel');
		if(p) {
			l.click(function(){closeHelp(p);});
		} else {
			l.click(function(){closeHelp();});
		}
		l.removeClass("hidden invisible");
	});
}