// when enter is pressed, move to the next object
// use with onKeyDown
function nextOnEnter( e, nextObj ) {
	 var c = e.which ? e.which : e.keyCode;
   char = String.fromCharCode(c);
   xCode = char.charCodeAt(0);
   if (xCode == 13) //Enter key is pressed!!
   {
      window.event.keyCode = 0;
			try{ $(nextObj).focus();  }catch(e){}
   }
   else
   {
      return true;
   }
}

// offers minimal protection against non-numeric inputs, users can still paste
// use with onkeyPress
function isNumeric(e)
{
   var c = e.which ? e.which : e.keyCode;
   if (c > 31 && (c < 48 || c > 57))
      return false;
   return true;
}

