function help(pageName, pxWide, pxHigh) {
	// pageName: pass either the full path to the help file, or the name only (no extension) for local help html files
	extAt = pageName.indexOf(".", pageName.length-5);
	if(extAt > 0) {
		pageName = pageName.toString();
	} else {
		// having the window name lets the browser re-use a window of the same name. The .toString is needed on IE or the open function does nothing
		pageName = "help/"+pageName+".html";
	}
	w = window.open(pageName, "Help", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,width="+pxWide+",height="+pxHigh);
	if (w == null || w.closed) {
		alert("New window was closed by a pop-up blocker, disable the pop-up blocker for your internal site.");
		return;
		}
	w.focus();
}

var svFlag = 0;	// lets the unload function know that an AJAX sv was triggered
function sv(table,id, params) {
	svFlag = 1;
	// params in GET URL format, starting with "&". &fieldname=value will be saved to the org table
	if (window.XMLHttpRequest) xho = new XMLHttpRequest();							// code for IE7+, Firefox, Chrome, Opera, Safari
	else if (window.ActiveXObject) xho = new ActiveXObject("Microsoft.XMLHTTP");	// code for IE6, IE5
	else {
		alert ("Your browser does not support XMLHTTP! You must either update your browser, or use another screen to edit this data.");
		return;
	}
	xho.onreadystatechange=function() {
		if(xho.readyState==4) {
			if(xho.responseText != "0") alert(xho.responseText);
			svFlag = 0;
		}
	}
	switch(table) {
		case "org": var url="orgSaveAjax.php?id="+id+encodeURI(params); break;
		case "peo": var url="../people/peoSaveAjax.php?id="+id+encodeURI(params); break;
		default: alert("Invalid or missong table identifier.");
	}
	xho.open("GET",url,true);
	xho.send(null);
}		
