//----------------------------------------------------------------------------------------------------------// trim(inpString)//// Usage: return the string with all foward and ending spaces removed function trim(inpString){		var retString = inpString;		while (retString.charAt(0) == " ") {		retString = retString.substr(1);	}		while (retString.charAt(retString.length - 1) == " ") {		retString = retString.substring(0, (retString.length - 2));	}		return retString}//-------------------------------------------------------------------------------------------------function moveItems(fromList, toList){	for(var i = 0; i < fromList.length; i++){// Loop Through the FromList		if (fromList.options[i].selected == true){// If the item is selected			var itemValue = fromList.options[i].value;//Get the values Information			var itemText = fromList.options[i].text; //Get the text Information			var newOption = new Option (itemText, itemValue);// Create the new option			var addIndex = toList.length// Find where the new option should be added to toList			toList.options[addIndex] = newOption;// Add the item to the toList			fromList.options[i] = null;//Delete the item from the from list			i--; //Decriment i because one item was just removed		}	}}	//-------------------------------------------------------------------------------------------------function selectAllItmes(list){	for(var i = 0; i < list.length; i++){		list.options[i].selected=true;	}}//-------------------------------------------------------------------------------------------------function hasValue(obj, obj_type){    if (obj_type == "TEXT" || obj_type == "PASSWORD")	{    	if (trim(obj.value).length == 0)       		return false;    	else       		return true;    	}    else if (obj_type == "SELECT")	{        for (i=0; i < obj.length; i++)	    	{		if (obj.options[i].selected)			return true;		}       	return false;		}    else if (obj_type == "SINGLE_VALUE_RADIO" || obj_type == "SINGLE_VALUE_CHECKBOX")	{		if (obj.checked)			return true;		else       		return false;		}    else if (obj_type == "RADIO" || obj_type == "CHECKBOX")	{        for (i=0; i < obj.length; i++)	    	{		if (obj[i].checked)			return true;		}       	return false;		}}//-------------------------------------------------------------------------------------------------function _CF_checkinteger(object_value)    {    //Returns true if value is a number or is NULL    //otherwise returns false	    if (object_value.length == 0)        return true;    //Returns true if value is an integer defined as    //   having an optional leading + or -.    //   otherwise containing only the characters 0-9.	var decimal_format = ".";	var check_char;    //The first character can be + -  blank or a digit.	check_char = object_value.indexOf(decimal_format)    //Was it a decimal?    if (check_char < 1)	return _CF_checknumber(object_value);    else	return false;    }function _CF_numberrange(object_value, min_value, max_value)    {    // check minimum    if (min_value != null)	{        if (object_value < min_value)		return false;	}    // check maximum    if (max_value != null)	{	if (object_value > max_value)		return false;	}	    //All tests passed, so...    return true;    }function _CF_checknumber(object_value)    {    //Returns true if value is a number or is NULL    //otherwise returns false	    if (object_value.length == 0)        return true;    //Returns true if value is a number defined as    //   having an optional leading + or -.    //   having at most 1 decimal point.    //   otherwise containing only the characters 0-9.	var start_format = " .+-0123456789";	var number_format = " .0123456789";	var check_char;	var decimal = false;	var trailing_blank = false;	var digits = false;    //The first character can be + - .  blank or a digit.	check_char = start_format.indexOf(object_value.charAt(0))    //Was it a decimal?	if (check_char == 1)	    decimal = true;	else if (check_char < 1)		return false;        	//Remaining characters can be only . or a digit, but only one decimal.	for (var i = 1; i < object_value.length; i++)	{		check_char = number_format.indexOf(object_value.charAt(i))		if (check_char < 0)			return false;		else if (check_char == 1)		{			if (decimal)		// Second decimal.				return false;			else				decimal = true;		}		else if (check_char == 0)		{			if (decimal || digits)					trailing_blank = true;        // ignore leading blanks		}	        else if (trailing_blank)			return false;		else			digits = true;	}	    //All tests passed, so...    return true    }function _CF_checkrange(object_value, min_value, max_value)    {    //if value is in range then return true else return false    if (object_value.length == 0)        return true;    if (!_CF_checknumber(object_value))	{	return false;	}    else	{	return (_CF_numberrange((eval(object_value)), min_value, max_value));	}	    //All tests passed, so...    return true;    }function _CF_checktime(object_value)    {    //Returns true if value is in time format or is NULL    //otherwise returns false	    if (object_value.length == 0)        return true;    //Returns true if value is a date in the mm/dd/yyyy format	isplit = object_value.indexOf(':');	if (isplit == -1 || isplit == object_value.length)		return false;    sHour = object_value.substring(0, isplit);	iminute = object_value.indexOf(':', isplit + 1);	if (iminute == -1 || iminute == object_value.length)		sMin = object_value.substring((sHour.length + 1));	else		sMin = object_value.substring((sHour.length + 1), iminute);    if (!_CF_checkinteger(sHour)) //check hour		return false;    else    if (!_CF_checkrange(sHour, 0, 23)) //check hour		return false;	if (!_CF_checkinteger(sMin)) //check minutes		return false;	else	if (!_CF_checkrange(sMin, 0, 59)) // check minutes		return false;	// did they specify seconds    if (iminute != -1)	{		sSec = object_value.substring(iminute + 1);		if (!_CF_checkinteger(sSec)) //check seconds			return false;		else		if (!_CF_checkrange(sSec, 0, 59)) //check seconds			return false;		}        return true;    }    //-->