/*
 * MapObject - The JavaScript Mapping Library.
 * http://MapObject.net
 * 
 * Copyright (c) 2006-2007, Mashup Technologies, LLC
 * All rights reserved.
 * http://www.MashupTechnologies.com
 * 
 * The JavaScript code distributed with Google Maps Samples (the "Software") is licensed under the
 * Lesser GNU (LGPL) open source license version 3.
 * 
 * http://www.gnu.org/licenses/lgpl.html
 * 
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 */

Ext.namespace('MapObject.util');

/**
* @class MapObject.util.Form
* Utility class for form manipulation
* @singleton
*/
MapObject.util.Form = function(){

	//
	// Object namespace. Private properties go here.
	//

	
	//
	//	Public methods and constants
	//

	return {
		/**
		* Set selected value for a select HTML element
		* @param none
		* @return none
		*/
		setSelectedValue: function(element, value) {
			var el = Ext.get(element).dom;
			for (var i = 0; i < el.options.length; ++i){
				if (el.options[i].value == value) {
					el.options[i].selected = true;
					break;
				}
			} 
		}
	}
}(); // the parens here cause the anonymous function to execute and return


