function przelacz(blok) {
	var element = document.getElementById(blok).style;
	if (element.display=='none') {
		element.display = 'block';
	} else {
		element.display = 'none';
	}
}

function podglad(url, x, y) {
 okno = window.open("", "o", "width="+x+", height="+y+", left=100, top=25,"
   + " innerwidth="+x+", innerheight="+y+", location=0, directories=0,"
   + " scrollbars=0, menubar=0, toolbar=0, status=0, resizable=1");
 okno.document.open();
 okno.document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"');
 okno.document.writeln('"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">');
 okno.document.writeln('<html xmlns="http://www.w3.org/1999/xhtml" ');
 okno.document.writeln('xml:lang="pl"><head><meta http-equiv="Content-type"');
 okno.document.writeln(' content="text/html; charset=iso-8859-2" />');
 okno.document.writeln('<title>Podgl±d</title><style type="text/css"><!--');
 okno.document.writeln('body {margin:0px; padding:0px; background:white;}');
 okno.document.writeln('img {display:block; border:0px;}');
 okno.document.writeln('--></style></head><body>');
 okno.document.writeln('<a href="javascript:self.close()"><img ');
 okno.document.writeln('src="'+url+'" alt="Zamknij" /></a></body></html>');
 okno.document.close();
 okno.focus();
}



function mapka() {
	window.open('/inc/mapa.html', 'mapa', 'width=970,height=625,left=100,top=30,innerwidth=970,innerheight=625,location=0,directories=0,scrollbars=0,menubar=0,toolbar=0,status=0,resizable=1');
}




function rozwin1(id) {
	var warstwa = document.getElementById('w'+id).style;
	warstwa.display = 'block';

}



kryj = 0; id = 0;
function menu(element) {
	var ile = document.getElementsByName('m').length;
	// ukrycie wszystkich
	for (i=1; i<=ile; i++) {
		document.getElementById('m'+i).style.display = 'none';
	}
  // pokazanie aktywnego
  document.getElementById(element).style.display = 'block';
}

function koniec() {
  clearTimeout(id);
  kryj=0; id = setTimeout(ukryj, 100)
}

function ukryj() {
  if (kryj==0) {
    i = 1;
    while (e = document.getElementById("m" + i++))
      e.style.visibility = "hidden";
  }
}