function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,location=yes,menubar=no,left=180,top=2' ); 
}
function ustaw(f) {
	prok=document.getElementById("rok");
	pmie=document.getElementById("miesiac");
	pdzi=document.getElementById("dzien");
	var rok=prok[prok.selectedIndex].value;
	var miesiac=pmie[pmie.selectedIndex].value;
	var dni = 32-new Date(rok, miesiac-1, 32).getDate();
	for (i=pdzi.options.length;i>=0;i--) pdzi.options[i]=null;
	for (i=0;i<dni;i++) pdzi.options[i]=new Option(i+1,i+1);
}
function Load_id() {
	var id = document.getElementById('idkraj1').options[document.getElementById('idkraj1').selectedIndex].value;
	var id_txt = "?id=";
	location = id_txt + id;
}  
function Load_id1() {
	var id = document.getElementById('idkraj1').options[document.getElementById('idkraj1').selectedIndex].value;
	var id2 = document.getElementById('idregion1').options[document.getElementById('idregion1').selectedIndex].value;
	var id2_txt = "index.php?id="+id+"&id2=";
	location = id2_txt + id2
} 
function pokuk_b2(f) {
	for (i=1;i<7;i++) {
		document.getElementById("B2Div"+i).style.display="none";
	}
	
	if (document.getElementById(f).style.display=="none") {
		document.getElementById(f).style.display="block";	
	} else {
		document.getElementById(f).style.display="none";	
	}
} 
function przejscie() {
	t=document.getElementById('karj');
	window.location = t[t.selectedIndex].value; 
}
function sprawdz2() {
	if (document.getElementById('szukac').value!='') return true;
	else return false;
}
function samik(t) {t.rob.value="2";return true;}
function MapaNapis(nap) {
	if (nap==''){
		temp="none";
	} else {
		temp="block";
	}
	document.getElementById('NazwaLina').style.display=temp;
	document.getElementById('NazwaLina').innerHTML=nap;
}

function MapaPokaz(nap,co) {
	//instr
	
	if (co==0){
		temp="none";
		temp2=341+"px";
	} 
	if (co==1){
		temp="block";
		temp2=document.getElementById('Mapa'+nap).style.height;
		i=1;
		while(el=document.getElementById('Mapa'+i)){el.style.display="none";i++;}
	}
	if (co==2){
	  if (document.getElementById('Mapa'+nap).style.display=='block') {temp="none";} else {temp="block";}
	}
	document.getElementById('Mapa'+nap).style.display=temp;
	if (co!=2){
		document.getElementById('MapaGlowna').style.height=temp2;
	}
}
