//*******************************************************************************'
// de-select all children of the element
// select optSelected if specified
// requires ../format/trim.js

function clearDDLSelected(elementObj, optSelected)
{
	// clear all selected options
	for (var i = 0; i < elementObj.length; i++)
	{
		// if this child of the element is selected, de-select it
		elementObj[i].selected = false;
	}

	// select the option specified
	if (optSelected.length > 0)
	{
		// for each child of the element...
		for (var i = 0; i < elementObj.length; i++)
		{
			// if this child's value matches the passed value to select...
			if (elementObj[i].value.toLowerCase() == optSelected.toLowerCase())
			{
				// check the object
				elementObj[i].selected = true;
				
				// break out of the for loop
				break;
			}
		}
	}
}

