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>");
} 
