function getkey(e)
{ 
  var code; 
  if (!e)
    var e = window.event; // nastaveni pro IE
  if (e.keyCode)
    code = e.keyCode; // IE a Mozilla
  else
    if (e.which)
      code = e.which; // NN4
  if(code==8 || (code>36&&code<41) || code==13)return false;
  return code; 
} 

function numeric(eX)
{
  test=getkey(eX);
  if (test){  
	  if (test<43 || test>57)
	    return false;
	}
}

function alfanumeric(eX,diacritic)
{
  test=getkey(eX);
	if(test){
	  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){
		if (test==34 || test==39)
		  return false;
	}
} 