function LTrim( value ) {
	var re = /\s*((\S+\s*)*)/;
	return value.replace(re, "$1");
	
}
function RTrim( value ) {	
	var re = /((\s*\S+)*)\s*/;
	return value.replace(re, "$1");
	
}
function trim( value ) {	
	return LTrim(RTrim(value));	
}
function checkpyt(form) 
{
  ret=true;
  pytanie=form.pytanie.value;
  pytanie=trim(pytanie);
  if (pytanie=='')
  {
    ret=false;
    alert('Proszę coś wpisać');
  }
  form.pytanie.value=pytanie;
  return ret;
}

function keyhandler(AEvent) {
if (window.Event) {
        kodKlawisza = AEvent.which;
    } else {
        kodKlawisza = AEvent.keyCode;
    }
    if (kodKlawisza==13) document.forms[0].submit();
}
