function validateMeat(nFrm)
{
	var myMult;
	nFrm += ''; //convert text to string

	nFrm=nFrm.replace(/,/g,""); //remove commas, if any
	nFrm=nFrm.replace(/\s/g,""); //remove spaces, if any
	
if((nFrm.length - nFrm.replace(/[^0-9.]/g,"").length > 1) || (nFrm.replace(/[^.]/g,"").length > 1)) {
		//Reject outright, more than one letter or more than one period.
		nFrm = addCommas(nFrm);
		return(nFrm);
	}	else {
		if(nFrm.length - nFrm.replace(/[^0-9.]/g,"").length == 1) {
		//if(nFrm.split(/[^0-9.]/).length == 2) { // if only one letter
			if(nFrm.substring(nFrm.length, nFrm.length - 1).search(/[mkMK]/) != -1) { // if letter is at the end
 				//change 'multipliers' based on k or m
				if (nFrm.substring(nFrm.length, nFrm.length - 1).toUpperCase() == 'M') {
					myMult=6;
				} else {
					myMult = 3;
				}
				nFrm = nFrm.toUpperCase().split(/[MK]/)[0]; // get rid of letter
								
				//convert to string
				nFrm+='';
				var t1=nFrm.split('.')[0];
				if(nFrm.split('.')[1] != undefined) {
					var t2=nFrm.split('.')[1];
				} else {
					var t2 = '';
				}
				if(t2.length<myMult) {
					var numZero = myMult-t2.length;
					for(var i=0;i<numZero;i++) {
						t2+='0';
					}
				} else if(t2.length>myMult) {
					//below would turn 5.0001k into 5000.1 instead of dropping the .1
					/*
					t1+=t2.substring(0,myMult)
					t2='.'+t2.substring(myMult,t2.length)
					*/
					t2=t2.substring(0,myMult);
					
				}
				nFrm = (t1+t2)*1;
			} else {
				//reject Outright, has a letter in the wrong place
				nFrm = addCommas(nFrm);
				return(nFrm);
			}
		 
		} else {
			//should be alright, but has no multiplier
			// May not need this section, just let function keep running.
		}
		// run comma splitter
		nFrm = addCommas(nFrm);
		return(nFrm);
	}
}
addCommas = function(nCma) {
	nCma += '';
	x = nCma.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}