function test(form) {
    if (form.nick.value=="") {
        alert("Musisz podać swój nick.");
        form.nick.focus();
		return false;
    }
    else if (form.email.value=="") {
        alert("Musisz podać swój e-mail.");
        form.email.focus();
		return false;
    }
    else if (form.haslo.value=="") {
        alert("Musisz podać hasło.");
        form.haslo.focus();
		return false;
	}
    else if (form.haslop.value=="") {
        alert("Musisz powtórzyć hasło.");
        form.haslop.focus();
		return false;
	} else {
		return true;
    }
	return false;
}

function chk_pc(ip) {
	re = /((\d{2})-(\d{3}))$/;
	found = ip.match(re);
	if (!found)
		return false;
	return true;
}

function chk_du(ip) {
	re = /((\d{4})-(\d{2})-(\d{2}))$/;
	found = ip.match(re);
	if (!found)
		return false;
	if ((found[2] > 2006) || (found[2] < 1900))
			return false;
	
	if ((found[1] > 12) || (found[1] < 1))
			return false;
	
	if ((found[0] > 31) || (found[0] < 1))
			return false;
	
	return true;
}


