function pokaz_wideo(u, title, cite, url) {
		if (document.getElementById) {
			var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
		}
		if (x) {
			x.onreadystatechange = function() {
				if (x.readyState == 4 && x.status == 200) {
					inf = document.getElementById('video_loader');
					inf.innerHTML = '<div id="video_title"><h2 style="float:left;width:auto;display:inline;"><a href="'+url+'">'+title+'</a></h2><span onclick="zamknij_video();" style="text-decoration:none;cursor:pointer;padding:1px 5px;background:#0088aa;color:#ffffff;float:right;">&times;</span></div><div class="clr"></div>'+x.responseText+'<br/><cite>'+cite+'</cite><br/>';
					scroll(0,0);
				}
			}
			x.open("GET", 'pokaz_video.php?u='+u, true);
			x.send(null);
		}
		return false;
}
function zamknij_video() {
	document.getElementById('video_loader').innerHTML='';
}
function pokaz_muzyke(u, title, cite, url) {
			if (document.getElementById) {
				var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
			}
			if (x) {
				x.onreadystatechange = function() {
					if (x.readyState == 4 && x.status == 200) {
						inf = document.getElementById('audio_loader');
						inf.innerHTML = '<div id="audio_title"><h2 style="float:left;width:auto;display:inline;"><a href="'+url+'">'+title+'</a></h2><span onclick="zamknij_muzyke();" style="text-decoration:none;cursor:pointer;padding:1px 5px;background:#0088aa;color:#ffffff;float:right;">&times;</span></div><div class="clr"></div>'+x.responseText+'<br/><cite>'+cite+'</cite><br/>';
						scroll(0,0);
					}
				}
				x.open("GET", 'pokaz_audio.php?u='+u, true);
				x.send(null);
			}
			return false;
}
function zamknij_muzyke() {
	document.getElementById('audio_loader').innerHTML='';
}
function powieksz_obrazek(id, brl) {
	if (document.getElementById('powiekszenie_'+id)) {
		document.getElementById('powiekszenie_'+id).style.display='block';
	} else {
		var div_powiekszenie = document.createElement('div');
		div_powiekszenie.className='imagezoom';
		div_powiekszenie.id='powiekszenie_'+id;
		div_powiekszenie.setAttribute("onmouseover", "this.zIndex=\'500\';powieksz_obrazek('"+id+"', '"+brl+"');");
		div_powiekszenie.setAttribute("onmouseout", "usun_powiekszenie_obrazka('"+id+"');");
		var img = document.createElement('img');
		img.className='image';
		img.src='miniaturka.php?u='+brl;
		img.alt='Miniatura';
		div_powiekszenie.appendChild(img);
		document.getElementById(id).appendChild(div_powiekszenie);
		document.getElementById(id).style.display='block';
	}
}
function usun_powiekszenie_obrazka(id) {
	document.getElementById('powiekszenie_'+id).style.display='none';
}
function pokazChmurke(tekst, id) {
	if (document.getElementById('chmurka_'+id)) {
		document.getElementById('chmurka_'+id).style.display='block';
	} else {
		var chmurka_cala = document.createElement('div');
		chmurka_cala.className='chinf';
		chmurka_cala.id='chmurka_'+id;
		chmurka_cala.setAttribute("onmouseover","pokazChmurke('"+tekst+"', '"+id+"');");
		chmurka_cala.setAttribute("onmouseout", "schowajChmurke('"+id+"');");
		var chmurka_tekst = document.createElement('div');
		chmurka_tekst.className='chinft';
		chmurka_tekst.innerHTML=tekst;
		var chmurka_k = document.createElement('div');
		chmurka_k.className='chinfch';
		chmurka_cala.appendChild(chmurka_tekst);
		chmurka_cala.appendChild(chmurka_k);
		document.getElementById(id).appendChild(chmurka_cala);
		document.getElementById('chmurka_'+id).style.display='block';
	}
}
function schowajChmurke(id) {
		document.getElementById('chmurka_'+id).style.display='none';
}
function linkklik(url, q, menu, element) {
	var el = document.getElementById(element);
	el.href='./przekieruj?url='+url+'&q='+q+'&m='+menu;
}
function linkMouseUp(url, element) {
	document.getElementById(element).href=url;
}
function more(id) {
	id=document.getElementById(id);
	if (id.className=='hide') {
		id.className='show';
		document.getElementById('more').style.display='block';
	} else {
		id.className='hide';
		document.getElementById('more').style.display='none';
	}
}
