function rozwin(x)
{
	document.getElementById(x).style.visibility="visible";
} 

function zwin(x)
{
	document.getElementById(x).style.visibility="hidden";
} 	

function pokaz_flash(flash,img,szer,wys)
{
	var wersja_flash = 5;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	var odtwarzanie = false;
	if (plugin) 
	{
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
     	for (var i = 0; i < words.length; ++i)
	    {
			if (isNaN(parseInt(words[i])))
			continue;
			var wersja_plugin = words[i]; 
			//alert(wersja_plugin);
		}
	odtwarzanie = (wersja_plugin >= wersja_flash);
	} 
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) 
	{
	
		var str = 'try{ q = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.' + 
			wersja_flash + '");\nodtwarzanie = true;} \ncatch(e){}\n';
		eval(str);
	}
	if (odtwarzanie) 
	{
		//document.write(flash);	
		document.write('<object type="application/x-shockwave-flash" data="' + flash + '" width="' + szer + '" height="' + wys + '">');
		document.write('<param name="movie" value="' + flash + '" />');
		document.write('<param name="wmode" value="transparent" />');
		document.write('</object>');
	} 
	else {document.write('<img src="' + img + '" style="padding:0;"/>');}
}

function podswietl_fotke(x)
{
	document.getElementById(x).style.borderColor="#003366";
	document.getElementById(x).style.cursor="pointer";	
} 	
	
function zgas_fotke(x)
{
	document.getElementById(x).style.borderColor="#999999";
	document.getElementById(x).style.cursor="default";
}

function powieksz(obraz, tytul)
{
	win=window.open("","_blank", "toolbar=no, menubar=0, scrollbars=no, resizable=0, width=1, height=1");
    win.moveTo(0,0);
    win.document.close();
    win.document.open();
    win.document.write("<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'><title>"+tytul+"</title><style>body {margin: 0 0 0 0; padding: 0 0 10 0}");
    
	win.document.write("a {background-color:#f9f9f9; color: #003366; text-decoration: none; font-family:Verdana,Arial,sans-serif; font-size:11px;}");
    win.document.write("a:hover {text-decoration:underline;}");
	
    
    win.document.write("</style></head>");
    win.document.write("<body bgcolor='#f9f9f9'><table width='100%' height='100%' align='center'><tr><td align='center' valign='middle'>");
	win.document.write("<img src='foto/konf/"+obraz+"' style='border:1px solid #999999;' onload='var w=document.images[0].width+40; var h=document.images[0].height+120; window.self.resizeTo(w,h);'>");
	
    win.document.write("</td></tr><tr><td align='center'>");
    win.document.write("<a href='#' onclick='window.close();'>zamknij okno</a>");
    win.document.write("</td></tr></table></body></html>");
    win.document.close(); 
    win.focus();
}	

function powieksz2(obraz, tytul, prefiks)
{
	win=window.open("","_blank", "toolbar=no, menubar=0, scrollbars=yes, resizable=0, width=1, height=1");
    win.moveTo(0,0);
    win.document.close();
    win.document.open();
    win.document.write("<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'><title>"+tytul+"</title><style>body {margin: 0 0 0 0; padding: 0 0 10 0}");
    
	win.document.write("a {background-color:#f9f9f9; color: #003366; text-decoration: none; font-family:Verdana,Arial,sans-serif; font-size:11px;}");
    win.document.write("a:hover {text-decoration:underline;}");
	
    
    win.document.write("</style></head>");
    win.document.write("<body bgcolor='#f9f9f9'><table width='100%' height='100%' align='center'><tr><td align='center' valign='middle'>");
	win.document.write("<img src='"+prefiks+"foto/konf/"+obraz+"' style='border:1px solid #999999;' onload='var w=document.images[0].width+40; var hi=document.images[0].height; if (hi<800) var h=hi+120; else h=hi; window.self.resizeTo(w,h);'>");
	
    win.document.write("</td></tr><tr><td align='center'>");
    win.document.write("<a href='#' onclick='window.close();'>zamknij okno</a>");
    win.document.write("</td></tr></table></body></html>");
    win.document.close(); 
    win.focus();
}	