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></a><br />" + nazwa + "</td></tr></table></center></body></html>");
}
function otworzokno2(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='strony/" + numer + "' border=0></a><br />" + nazwa + "</td></tr></table></center></body></html>");
}

function otworzm1(numer,wys,szer) {
	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><title>Komnaty Parteru - Wawel</title><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("<img src=ekspozycje/mapa1.gif border=0 USEMAP='/#mapa1_Map'><MAP NAME='mapa1_Map'><AREA SHAPE='rect' ALT='salon wielkorządcy' COORDS='293,187,394,246' HREF='javascript:opener.location.replace(\"index.php?s=ekspozycje&id=1#1\");'><AREA SHAPE='rect' ALT='salon wielkorządcy' COORDS='9,99,195,124' HREF='javascript:opener.location.replace(\"index.php?s=ekspozycje&id=1#1\");' ></MAP></td></tr></table></center></body></html>");
}

function otworzm(tytul,plik,szer,wys) {
	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><title>" + tytul + "</title><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("<img src=ekspozycje/" + plik + " border=0></td></tr></table></center></body></html>");
}



function pokaz_ukryj(warstwa,strClass)
{
 if (document.getElementById(warstwa).style.display!='block') 
 {
 	document.getElementById(warstwa).style.display='block';
	if (strClass != '')
	{
		zaznacz( strClass);
	}
 }
 else 
 {
 	document.getElementById(warstwa).style.display='none';
 	if (strClass != '')
	{
		odznacz( strClass);
	}
 }
}

/*
disable object embed activation click in ie by rl
use:
	flash.show(path,width,height,id,title,alter,params);

params ex: 
	wmode="transparent", quality="high", bgcolor="#ffcc33", allowScriptAccess="sameDomain", style="" 

*/
var flash = {   
		show: function(path,width,height,id,title,alter,params){
		
			document.write(flash.build(path,width,height,id,title,alter,params));
		},
		param: function(params) {
			var tab = new Array();
			var obj = new Object();
			obj.list = new Array();
			if(params !='') {
				params = params.split(' ').join('');
				tab = params.split(',');
				for(var i=0; i<tab.length;i++) {
					obj[tab[i].split('="')[0]] = tab[i].split('="')[1].split('"')[0];
					obj.list.push(tab[i].split('=')[0]);
				}
			} else obj = '';
			return obj;
		},
		build: function(path,width,height,id,title,alter,params) {
			var txt;
			txt = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"';
			txt += ' title="'+title+'"';
			txt += ' alt="'+alter+'"';
			txt += ' width="'+width+'" height="'+height+'"';
			txt += ' id="'+id+'"';
			txt += ' style="'+flash.param(params)['style']+'">';
			txt +='<param name="movie" value="'+path+'" />';
			for(var i=0; i<flash.param(params)['list'].length;i++) {
				if(flash.param(params)['list'][i] != 'style') {
					txt +='<param name="'+flash.param(params)['list'][i]+'" value="'+flash.param(params)[flash.param(params)['list'][i]]+'"/>';
				}
			}
			
			txt += '<embed src="'+path+'"';
			txt += ' width="'+width+'" height="'+height+'"';
			txt += ' title="'+title+'"';
			txt += ' alt="'+alter+'"';
			for(var i=0; i<flash.param(params)['list'].length;i++) {
				if(flash.param(params)['list'][i] != 'style') {
					txt +=' '+flash.param(params)['list'][i]+'="'+flash.param(params)[flash.param(params)['list'][i]]+'"';
				}
			}
			
			txt +=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
			txt +='</object>';
			return txt;
		}
	}