function checkNum(x)
{
  if (!(/^\d+$/.test(x.value)))
  {
    x.value = '1';
    x.focus();
    return false;
  }
  return true;
}
