function TestKeynum(keynum)
{
    if ((keynum >= 8) && (keynum <= 9)) return true;
    if (keynum == 13) return true;
    if (keynum == 27) return true;
	if ((keynum >= 44) && (keynum <= 46))  return true; //,-.
	//if (keynum == 46) return true;
    if ((keynum >= 37) && (keynum <= 40)) return true;
    if ((keynum >= 48) && (keynum <= 57)) return true;
    return false;
}
function TestNum_onkeydown(e)
{
    var keynum;
    if(window.event) // IE
    {
        keynum = e.keyCode;
    }
    else if(e.which) // Netscape/Firefox/Opera
    {
        keynum = e.which;
    }
    //alert("Key "+keynum);
    return TestKeynum(keynum);
}

function IsNumeric(strString)
   //  check for valid numeric strings	
{
   var strValidChars = "0123456789";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
   {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
      {
         blnResult = false;
      }
   }
   return blnResult;
}

function ToggleHide(sender, ElementId)
{
	if (sender.checked == true)
        document.getElementById(ElementId).style.display = "block"
    else
        document.getElementById(ElementId).style.display = "none"
}


