function getkey(e)
{ 
  var code; 
  if (!e)
    var e = window.event; // nastaveni pro IE 
  if (e.keyCode)
    code = e.keyCode; // ie and mozilla/gecko 
  else
   if (e.which)
     code = e.which; // nn4
  return code; 
} 

function numeric(eX)
{
  test=getkey(eX);
  if (test<48 || test>57)
    return false;
}

function alfanumeric(eX,diacritic)
{
  test=getkey(eX);
  set1=(test>32 && test<48);
  set2=(test>57 && test<65);
  set3=(test>90 && test<97);
  if (diacritic == 1)
    set4=(test>122 && test<127);
  else
    set4=(test>122)
  if (set1 || set2 || set3 || set4)
    return false;
}

function safechars(eX)
{
  test=getkey(eX);
  if (test==34 || test==39)
    return false;
}
