this.window.name="topwindow";
function open_foto(url,width,height) {
    var newswindow = '';
    if (!newswindow.closed && newswindow.location) {
	newswindow.location=url;
        newswindow.focus();
    } else {
        newswindow=window.open(url , 'foto','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width='+width+',height='+height+'');
    }
    if (!newswindow.opener) {
       newswindow.opener = self;
    }
    if (window.focus) {
       newswindow.focus();
    }
    return false;
}

function big_foto(url) {
    var newswindow = '';
    if (!newswindow.closed && newswindow.location) {
	newswindow.location=url;
        newswindow.focus();
    } else {
        newswindow=window.open(url , 'foto','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=800,height=600');
    }
    if (!newswindow.opener) {
       newswindow.opener = self;
    }
    if (window.focus) {
       newswindow.focus();
    }
    return false;
}
var okno,poz_x,poz_y,szer,wys;
function nowe_okno(Obraz,Tytul,Width,Height){
    Obraz=Obraz;
    poz_x=(screen.width/2)-(Width/2);
    poz_y=(screen.height/2)-(Height/2);
    Settings="width="+Width+",height="+Height+",top="+poz_y+",left="+poz_x+",dependent=no,toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=auto,resizable=no,fullscreen=no,channelmode=no";
    okno=window.open('about:blank',Tytul,Settings);

    okno.focus();
        okno.document.write('<html><head><title>'+Tytul);
        okno.document.write('</title><meta http-equiv="content-type" content="text/html; charset=iso-8859-2"></head><body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"><div>');
        okno.document.write('<a href="#" onClick="javascript:window.close()">');
        okno.document.write('<img src="'+Obraz+'" border="0" alt="'+Tytul+'"></a></div></body></html>');
}
	var exists;
	var allStretch;
	
	function init(){
		var divs = document.getElementsByClassName("submenu");
		allStretch = new fx.MultiFadeSize(divs, {duration: 400});

		items = document.getElementsByClassName("display");
		for (i = 0; i < items.length; i++){
			var h3 = items[i];
			div = h3.nextSibling;
			h3.title = h3.className.replace("display ", "");

			if (window.location.href.indexOf(h3.title) < 0) {
				allStretch.hide(div, 'height');
				if (exists != true) exists = false;
			}
			else exists = true;
			h3.onclick = function(){
				allStretch.showThisHideOpen(this.nextSibling, 100, 'height');
				return true;
			}
		}
		if (exists == false) $('menu').childNodes[1].fs.toggle('height');
	}
