	function rebuildSelect( sObj, optArKeys, optArVals )
	{
		// option array is a key=>val array containing the new elements.
		removeAllOpt( sObj );
		addAll( sObj, optArKeys, optArVals );
		return true;
	}
		
	function removeAllOpt( sObj )
	{
		x = sObj.options.length;
		for ( i=0; i < x; i++ )
		{
			sObj.remove(0);
		}
		return true;
	}
	
	function addAll( sObj, optArKeys, optArVals )
	{
		for( var i=0; i < optArKeys.length; i++ )
		{
			tmpOpt = document.createElement("option");
			tmpOpt.value = optArKeys[i];
			tmpOpt.text = optArVals[i];
			sObj.add(tmpOpt);
		}
	}
	
