/******************************************************************************\
* conflexion.js
*
* Copyright (C) 2001  Conflexion, L.L.C.
*******************************************************************************
* $Log: conflexion.js,v $
* Revision 0.9.0.1  2001/05/27 16:30:05  autorags
* Initial Conflexion Applications Libraries (CAL) Installation
*
\******************************************************************************/

/********************************************************************\
* 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 + "'");
}
