function handleKeyPressOnlyDigits(e)
{
	var evt=(e)?e:(window.event)?window.event:null; 
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if (charCode < 40
			|| (charCode >= 48 && charCode <= 57)
			|| charCode == 45     // ins
			)
		return true;
	return false;
}

function handleKeyPressOnlyDigitsDotsComma(evt)
{
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if (charCode < 40
			|| (charCode >= 48 && charCode <= 57) // digits
			|| charCode == 44     // comma
			|| charCode == 45     // ins
			|| charCode == 46  )  // period
		return true;
	return false;
}

$(document).ready(function() {
	$('.onlyDigits').keypress(handleKeyPressOnlyDigits);
	$('.onlyDigitsDotsComma').keypress(handleKeyPressOnlyDigitsDotsComma);
});