function showBox(what,id)
{
	var box = $('cbox');
	if(!box){
		var box = new Element('div').setProperty('id', 'cbox').injectInside(document.body);
		box.setStyles({'z-index':190000,'background': 'black','opacity': '0','position': 'absolute','width': '100%','height': window.getScrollHeight(),'top': 0,'left': 0});
		box.addEvent('click', showBox);
		box.effect('opacity',{duration:500}).start(0,0.6);
		var pwbox = new Element('div').setProperty('id', 'pwbox').injectInside(document.body);
		pwbox.setStyles({'position':'absolute','z-index':190001,'background':'transparent','color':'white','width':'100%','text-align':'center','top':((window.getHeight()/2)-10)+'px'});
		pwbox.setHTML('<b>Proszę czekać...</b>');
		window.scrollTo(0,0);
		new Ajax('ajax.php', {postBody: 'show='+what+'&id='+id, onComplete: function(response){
			pwbox.remove();
			var tbox = new Element('div').setProperty('id', 'tbox').injectInside(document.body);
			tbox.setStyles({'z-index':200000,'font-size':'11px','background': '#eee8d4','opacity': '0','position': 'absolute','width':'500px','height':'300px','top': ((window.getHeight()/2).toInt()-151)+'px','left': ((window.getWidth()/2)-270)+'px','padding': '18px','border': '2px solid black','overflow': 'hidden'});
			tbox.setHTML(response+'<a style="text-decoration:none;position:absolute;bottom:20px;right:20px;color:blue;letter-spacing:-1px" href="javascript:void(0)" onclick="showBox()">Zamknij okno</a>');
			tbox.effects().start({'opacity':[0,1]}).chain(function(){});
			if ($('polec')) $('polec').value = window.location.href;
			if ($('oid')) $('oid').value = id;
		}}).request();
	} else {
		var tbox = $('tbox');
		if (tbox) tbox.effect('opacity',{duration:300,onComplete:function(){tbox.remove();}}).start(1,0);
		box.effect('opacity',{duration:500,onComplete:function(){box.remove();}}).start(0.6,0);
	}
}