function formCheck(formobj){
	// Enter name of mandatory fields
	var fieldRequired = Array("tabela");
	// Enter field description to appear in the dialog box
	var fieldDescription = Array("Należy wskazać miejsce wyszukiwania informacji poprzez rozwinięcie listy.");
	// dialog message
	var alertMsg = "Uwaga:\n";
	var l_Msg = alertMsg.length;
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}
	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}






function displayWindow(url, width, height) {var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no' );}


function displayWindow1(url, width, height) { 
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no' ); 
}



function printEl(id){
  w=open('','','width=600,height=400,resizable=no,scrollbars=yes,menubar=no');
  w.document.open();
  w.document.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"><link rel="stylesheet" href="inc/styl_druk.css" type="text/css"><title>Biuletyn Informacji Publicznej - Starostwo Powiatowe w Gryfinie - bip.gryfino.powiat.pl</title></head><body onload="window.print()">'
    +document.getElementById(id).innerHTML)
  w.document.close();
}

