function showDiv(elem) {
	if (document.getElementById(elem).style.display == 'none')
		document.getElementById(elem).style.display = 'block';
	else
		document.getElementById(elem).style.display = 'none'
		window.focus();
}


makeshowhidenum = 0;
function makeshowhide(id,state,visiblestate,tshow,thide) {
    var hstate;
    var sstate;
    var hidehref;
    var showhref;
    if (!thide) thide = 'Mniej';
    if (!tshow) tshow = 'Wiecej';
    if (!visiblestate) visiblestate = 'block';
    showhref = "javascript: unrolldiv('"+id+"', '"+visiblestate+"');";
    hidehref = "javascript: rolldiv('"+id+"');";
    if (!(state > 0)) {
        sstate = 'display: block;';
        hstate = 'display: none;';
    } else  {
        hstate = 'display: block;';
        sstate = 'display: none;';
    }
    document.write("<a href=\""+hidehref+"\" class='hide' style='"+hstate+"' id='"+id+"_hide'><span>"+thide+"</span></a>");
    document.write("<a href=\""+showhref+"\" class='show' style='"+sstate+"' id='"+id+"_show'><span>"+tshow+"</span></a>");
} 

function doprint() {
loc = document.location.href;
if (loc.match(/[\?]/))
NewHtm(loc + '&print=1',600,400);
else
NewHtm(loc + '?print=1',600,400);
}

function dorecommend(loc) {
if (loc && !loc.match(/^http/)) {
base = document.getElementsByTagName('base')[0];
loc = base.href + loc;
}
if (!loc)
loc = document.location.href;
NewHtm('/recommend.php?qs='+escape(loc), 400, 480);
}

function NewHtm(nazwa,szer,wys) {
odlewa=(screen.width-szer)/2;
odgory=(screen.height-wys)/2;		
config='left='+odlewa+',top='+odgory+',width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes';
stadion=window.open(nazwa,'okno',config);
stadion.focus();
}

function drukuj(divId) {
loc = document.location.href;
if (loc.match(/[\?]/))
NewHtm(loc + '&noBlock=1&print=1&divBlock='+divId,600,400);
else
NewHtm(loc + '?noBlock=1&print=1&divBlock='+divId,600,400);
}

