function checkRegister(type)
{
	var tst = "";
	d = document.regForm;

	if (d.email.value == '' && type == 'add')
		tst += ' - email\n';
	if (type == 'add' && (d.pass.value == '' || d.pass.value != d.repass.value))
		tst += ' - hasło\n';
	if (d.name.value == '')
		tst += ' - imię\n';
	if (d.sname.value == '')
		tst += ' - nazwisko\n';
	if (d.city.value == '')
		tst += ' - miasto\n';
	if (d.address.value == '')
		tst += ' - ulica\n';
	
	if (tst == "")
		d.submit();
	else
		alert('Błędnie wypełnione lub nie podane pola:\n'+tst);
}


