
function checkForm(form){
	var isValid = true;
	
	var registerNumber = document.getElementById("registerNumber");
	if(registerNumber != null){
		if(!isAllDigits(registerNumber.value) )
			isValid = false;
	}
		
	if(isValid)	
		form.submit();
	else
		alert("Nie prawidlowa wartosc w polu 'Numer w rejestrze' ");		
}



function isAllDigits(value){
	var regexp = new RegExp( "[0-9]*" );
	var match = regexp.exec( value );
	
	if (match == value )
  		return true;
	else
		return false;

}


function viewList(lista, stan) {
var uchwyt = document.getElementById(lista);
uchwyt.style.display = stan;
if (stan == "none")
{
for (var optionindex=0; optionindex < uchwyt.options.length; optionindex++)
{
uchwyt.options[optionindex].selected = false;
}
}
}