
/*
	'##############################################################################
	'#####
	'						CHECK SELECT VAL FUNCTION
	'	OVERVIEW  - This function will take a SelectBox object and check to see
	'				if one of its options has been checked
	'	
	'	PROTOTYPE - function checkSelectVal(objSelect)
	'	
	'   VARIABLE DEFINITIONS:
	'		Input  - 
	'				.objSelect = JS SelectBox object to check
	'		
	'		Output - 
	'	
	'	RETURNS   - False if no option has been selected, otherwise it returns 
	'				the value of the selected option
	'#####
	'##############################################################################
*/
function checkSelectVal(objSelect)
{
	var strValues = "";
	
	if (objSelect.type == "select-multiple")
	{
		for (var index = 0; index < objSelect.options.length; index++)
		{
			if (objSelect.options[index].selected)
			{
				if (objSelect.options[index].value != "")
				{
					strValues += objSelect.options[index].value + ", ";
				}
				else
				{
					objSelect.options[index].selected = false;
				}
			}
		}
		
		if (strValues != "")
		{
			strValues = strValues.substring(0, strValues.length - 2);
		}
	}
	else
	{
		strValues = objSelect.options[objSelect.selectedIndex].value;
	}
	
	if (strValues != "")
	{
		return strValues;
	}
	else
	{
		return false;
	}
}
