no hace falta pasar el objeto, sino el 
event por la compatibilidad multinavegador, mi función:    
Código Javascript
:
Ver original- var _chardecimal = '.';    //DEFINIR separador de la parte decimal 
-   
- function inputFloat(e,minus){ 
-     var menos = minus || false; 
-     if(e==null){ 
-         e=event; 
-     } 
-     if(e==null){ 
-         e=window.event; 
-     } 
-     var tecla = (document.all) ? e.keyCode : e.which; 
-     //48=0,57=9, 45=menos 
-     if(tecla==8)return true;//backs 
-     if(tecla==_chardecimal.charCodeAt(0)) return true; //punto decimal 
-     if (tecla==45){ 
-         if (!menos){ 
-             return false; 
-         } 
-     }else if(tecla < 48 || tecla > 57){ 
-         return false; 
-     } 
-     return true; 
- } 
uso
<input name="defecto" onKeyPress="return inputFloat(
event)" type="text"  size="10"  />