/*******************************************************************\
* AutoPopup
*   generates an http post when an item is selected from a popup
*   menu (may also work on other elements?).
* Caveats:
*   If you include an hrefdoc (to post to another script) you must
*   have an 'other'.  Use '' if you don't need additional params.
\*******************************************************************/
function AutoPopup(selObj, key, other, hrefdoc)
{
	var doc;
	if (hrefdoc) {
		/* if an alternate post location is specified, use it */
		doc = hrefdoc;
	} else {
		/* otherwise, use the current document */
		doc = "http://" + location.host + location.pathname;
	}
	doc += "?" + key + "=" + escape(selObj.options[selObj.selectedIndex].value);
	if (other) {
		/* additional post arguments were specified */
		doc += "&" + other
	}
	eval("parent.location='" + doc + "'");
}
