function TextBoxInputCheck_OnPress()
{
reg=/^[0-9]{1,}[.]?[0-9]{0,9}$/;
var srcElem = event.srcElement;
var oSel = document.selection.createRange();
var srcRange = srcElem.createTextRange();
oSel.setEndPoint('StartToStart', srcRange);
var num = oSel.text + String.fromCharCode(event.keyCode) + srcRange.text.substr(oSel.text.length);
event.returnValue = reg.test(num);
}
{
reg=/^[0-9]{1,}[.]?[0-9]{0,9}$/;
var srcElem = event.srcElement;
var oSel = document.selection.createRange();
var srcRange = srcElem.createTextRange();
oSel.setEndPoint('StartToStart', srcRange);
var num = oSel.text + String.fromCharCode(event.keyCode) + srcRange.text.substr(oSel.text.length);
event.returnValue = reg.test(num);
}