Validate Decimal Number

function ValidateDecimalNumber(obj)

        {

            var TransactionFee = obj.value

            TransactionFee = parseFloat(TransactionFee).toFixed(2);

       

            if (TransactionFee == "NaN")

            {

                obj.value = "0.00";

            }

            else

            {

                obj.value = TransactionFee;

            }

        }