function popupWindow(url, fid) {
	if (url && fid) {
		height = 200;
		width = 650;
		top = screen.height / 2 - height / 2;
		left = screen.width / 2 - width / 2;
		window.open(url + '?fid=' + fid, 'popup', 'statusbar=no,toolbar=no,menubar=no,scrollbars=no,location=no,resizable=no,width='+ width +',height=' + height + ',left = '+ left +',top = '+ top);
	}
}

function checkCodeDate(code, date) {
	if (code.value != '' && date.value == '') {
		alert('Proszę podać datę wygaśnięcia kodu!!!');
		return false;
	}
}
