if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}


function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function SwitchMenu2(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu2") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function displayWindow(url,wys,szer) {
		dy = 45;
		screenWidth =  szer;
		screenHeight = wys;
    	       dx = 0 ;dy = 0;
       var Win = window.open(url,"displayWindow",'width='+screenWidth+',height='+(screenHeight+5)+',resizable=yes,scrollbars=yes,menubar=no,left='+dx+',top='+dy );
Win.focus();
}

	function kalendarz(forma,element) 	{
			var param="";
			param="kalendarz.php?forma="+forma+"&element="+element;
	window.open(param,'kal','config=no,toolbar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no,menubar=no,height=200,width=200,left=300,top=250');
	}


function otworzokno(numer,wys,szer,nazwa) {
okno=window.open("","",'toolbar=no, menubar=no, personalbar=no, status=no, resizable=no,height='+wys+',width='+szer+',left=100,top=100');
okno.document.write("<html><head><META HTTP-EQUIV='Content-type' CONTENT='text/html; charset=iso-8859-2'><link rel='stylesheet' href='style2.css' type='text/css'><title>" + nazwa + "</title></HEAD><body background='img/kolor.gif' leftmargin=0 rightmargin=0 topmargin=0 marginwidth=0 marginheight=0><center><table border=0 cellpadding=0 cellspacing=0 width=100% height=100%><tr><td valign=middle align=center>");
okno.document.write("<a href='javascript:window.close()'><img src=pliki/" + numer + " border=0 alt=zamknij...></a><br>" + nazwa + "</td></tr></table></center></body></html>");
}


function otworzokno2(numer,wys,szer,nazwa) {
szer2=szer-20; 
wys2=wys-30;
okno=window.open("","",'toolbar=no, menubar=no, personalbar=no, status=no, resizable=no,height='+wys+',width='+szer2+',left=100,top=100');
okno.document.write("<html><head><META HTTP-EQUIV='Content-type' CONTENT='text/html; charset=iso-8859-2'><link rel='stylesheet' href='style2.css' type='text/css'><title>" + nazwa + "</title></HEAD><body background='img/kolor.gif' leftmargin=0 rightmargin=0 topmargin=0 marginwidth=0 marginheight=0><center><table border=0 cellpadding=0 cellspacing=0 width=100% height=100%><tr><td valign=middle align=center style='width:" + szer2 + "px;height:" + wys2 + "px;background:url(pliki/" + numer + ") no-repeat;'>");
okno.document.write("<a href='javascript:window.close()'><img src='images/pix.gif' width=" + szer2 + " height=" + wys2 + " border=0 alt=zamknij...></a></td></tr><tr><td align='center'>" + nazwa + "</td></tr></table></center></body></html>");
}
