function is_numeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }

function validate_fields(form_id) {
	var required_fields = $$('#'+form_id+' .required');

	var errors_found = 0;

	required_fields.each(function(item, index) {
		if(item.value == '') {
			errors_found++;
			$(item.id+'_label').addClass('red');
		} else {
			$(item.id+'_label').removeClass('red');
		}
	});

	if(errors_found) {
		alert('There were errors found with your form submission. They have been highlighted in red.');
		return false;
	} else {
		return true;
	}
}