

	/**
	* toggleSelect
	*
	* toggle select, toggle
	*/
	function toggleSelect (oName, answerArray, hideArray)
	{

		// stupid javascript doesnt let me pass in associated array
		// could do this with seperate arrays however. never mind.
		var newAnswerArray = [];
		for (var x = 0; x < answerArray.length; x ++)
		{
			var tmp = answerArray[x].split(";;");
			newAnswerArray[tmp[0]] = tmp[1];

		}


		// get the value of the field
		var fieldValue 	= oName.options[oName.selectedIndex].value;
		var fieldShow	= newAnswerArray[fieldValue];
		if (fieldShow != "" && fieldShow != null)
		{
			MWJ_findObj(fieldShow).style.display 				= "inline";
			MWJ_findObj("label_" + fieldShow).style.display 	= "inline";
		}


		// loop through and hide the others
		for (var x = 0; x < hideArray.length; x ++)
		{
			// get the hide fields and hide if its not the show field duh.
			var hideField = hideArray[x];
			if (hideField != fieldShow)
			{
				MWJ_findObj(hideField).style.display 			= "none";
				MWJ_findObj("label_" + hideField).style.display = "none";
			}
		}

		return null;

	}

//	function setTextValue (nvalue, nfield)
//	{
//
//		MWJ_findObj(nfield).value.display = nvalue;
//
//	}

	/**
	* setInnerHTML
	*
	* sets the inner html of something on the page
	*/
	function setInnerHTML (nvalue, nid)
	{

		MWJ_findObj(nid).innerHTML = nvalue;

	}

	/**
	* MWJ_findObj
	*
	* finds and returns an object
	* find the object
	*/
	function MWJ_findObj ( oName, oFrame, oDoc )
	{

		if( !oDoc ) { if( oFrame ) { oDoc = oFrame.document; } else { oDoc = window.document; } }
		if( oDoc[oName] ) { return oDoc[oName]; } if( oDoc.all && oDoc.all[oName] ) { return oDoc.all[oName]; }
		if( oDoc.getElementById && oDoc.getElementById(oName) ) { return oDoc.getElementById(oName); }
		for( var x = 0; x < oDoc.forms.length; x++ ) { if( oDoc.forms[x][oName] ) { return oDoc.forms[x][oName]; } }
		for( var x = 0; x < oDoc.anchors.length; x++ ) { if( oDoc.anchors[x].name == oName ) { return oDoc.anchors[x]; } }
		for( var x = 0; document.layers && x < oDoc.layers.length; x++ ) {
			var theOb = MWJ_findObj( oName, null, oDoc.layers[x].document ); if( theOb ) { return theOb; } }
		if( !oFrame && window[oName] ) { return window[oName]; } if( oFrame && oFrame[oName] ) { return oFrame[oName]; }
		for( var x = 0; oFrame && oFrame.frames && x < oFrame.frames.length; x++ ) {
			var theOb = MWJ_findObj( oName, oFrame.frames[x], oFrame.frames[x].document ); if( theOb ) { return theOb; } }
		return null;

	}


