function ajaxErrorMessage(msg) 
{
	var mm = 'Nie udało się odebrać odpowiedzi z serwera. Prosimy o kontakt z administratorem, '; 
	if (msg != '') 
		mm += 'przekazując mu następujący komunikat: '+msg; 
	else 
		mm += 'opisując mu przy jakiej czynności ten błąd się pojawił'; 
	alert(mm); 
}


function ShowOrHide(div) {
var d = $(div);
if (document.getElementById(div).className.indexOf("hide") != -1) {
Element.removeClassName( d, "hide" );
Element.addClassName( d, "show" );
} else
{
Element.removeClassName( d, "show" );
Element.addClassName( d, "hide" );
}
}


function popup(v,t,e,p){
	if(!document.createElement) return;
	p=document.getElementById('popup');
	if(!p){
		p=document.createElement('div');
		p.id='popup';
		p.style.zIndex=100;
		if(document.all&&!window.opera)
		    p.style.position='absolute';
		else
		    p.style.position='fixed';
		p.style.padding='3px';
		p.style.border='1px solid #000000';
		p.style.backgroundColor='#ffffff';
		p.style.MozOpacity='0.9';
		p.style.align='left';

	}
	p.move=function(e){
		e=e||event;
		p.style.left=e.clientX+5+"px";
		if(document.all&&!window.opera)
		    p.style.top=e.clientY+document.body.scrollTop+20+"px";
		else
		    p.style.top=e.clientY+20+"px";
	}
	p.hide=function(x){
		if(x=document.getElementById('popup')) document.body.removeChild(x)
	}
	p.move(e);
	p.innerHTML=t;
	document.body.appendChild(p);
	p.onmousedown=p.hide;
	v.onmouseout=p.hide;
}

