// Common Function JavaScript Document /** * This function is used to allow only numerics and * control functions. If anyother key is pressed then * it is neglected. * * @param object this is for cross browser compatibility for Mozilla browsers. This is the 'event' object. * * @return boolean true, if the key pressed is in between 0 to 9 * false, if the key pressed is not in range 0 to 9, or a control key. * */ function onlyNumerics(e){ var e = e? e : window.event; if (!e) return; var key = 0; if (e.keyCode) { key = e.keyCode; } // for moz/fb, if keycode==0 use 'which' else if (typeof(e.which)!= 'undefined') { key = e.which; } //alert(key); if ( (key>=48 && key<=57) || key == 8 || key ==0 ){ return (true) ; } else{ return (false); } } /** * Select only one element **/ function selectOnlyOne( element ) { var el = document.getElementsByName(element.name) ; for( i=0; i