// SC_NumericOnly(oField[field to check]) -- Ensures only numeric values are entered into the identified field 
//  for use with:  onKeyUp, onKeyDown, onKeyPress
  function SC_NumericOnly(oField) {
   //grab value of passed field and its length
    var sValue = oField.value;
	var nLength = parseInt(sValue.length);
   //check the last character entered and make sure it is numeric, if not, take it off
	if ( !parseInt(sValue.substring(nLength-1)) && sValue.substring(nLength-1)!=0 ) {
	 oField.value = sValue.substring(0,nLength-1);
	}
  }
// SC_ToggleFieldsAvailable(sParams[pipe delimeted string with element name, value to assign, and visibility pref]) -- 
//  Allows for multiple items to be disabled or hidden, plus values initialized based on radio btn selection
//
// Parameter list Example
//       {element_name}|{disable_value}|{new_value}|{visible_value}
//                           true           nc          visible
//                           false                      hidden
//                           ''                          ''
//  '' = no value entered and means that option will not be set
//  nc = no change and means that option will not be set
  function SC_ToggleFieldsAvailable(sParams) {
   //break parameters into an array
    var aParams = sParams.split("|");
   //loop through parameters and perform actions
	for (var x=0; x<aParams.length; x+=4) {
	  var oField = document.getElementById(aParams[x]);
	  switch (oField.tagName) {
	    case ('DIV') :
		    if (aParams[x+3]!='') { oField.style.visibility = aParams[x+3];  } 
		    break;
		  
	    case ('INPUT') :
		    if (aParams[x+1]!='') {
		      if (String(aParams[x+1])=='true') {
			    oField.disabled = true;
			  }else{
			    oField.disabled = false;
			  }
		    }
		    if (aParams[x+2]!='nc') {
		      oField.value = aParams[x+2];
		    }
		    if (aParams[x+3]!='') { oField.style.visibility = aParams[x+3];  } 
		    break;
		  
	    case ('SELECT') :
		    if (aParams[x+1]!='') {
		      if (String(aParams[x+1])=='true') {
			    oField.disabled = true;
			  }else{
			    oField.disabled = false;
			  }
		    }
		    if (aParams[x+2]!='nc') {
		      for (var y=0; y<oField.length; y++) {
		        if ( oField.options[y].value == aParams[x+2] ) {
			      oField.selectedIndex = y;
			      break;
			    }
		      }
		    }
		    if (aParams[x+3]!='') { oField.style.visibility = aParams[x+3];  }   
		    break; 
	  } 
	}
  }