function isEmpty(strfield1, strfield2) {
strfield1 = document.forms[0].nick.value;
strfield2 = document.forms[0].channel.value;

    if (strfield1 == "" || strfield1 == null || !isNaN(strfield1) || strfield1.charAt(0) == ' ') {
    alert("Pole \"nick\" jest wymagane");
    return false;
    }

    if (strfield2 == "" || strfield2 == null || strfield2.charAt(0) == ' ') {
    alert("Pole \"kanał\" jest wymagane");
    return false;
    }
    return true;
}


//function that performs all functions, defined in the onsubmit event handler

function check(form) {
if (isEmpty(form.nick)){
  if (isEmpty(form.channel)){
		  return true;
  }
}
return false;
}

