<!-- // Activate cloak
noweOkienko=null;
function galeria (src, w, h) {
	if (window.screen){
		aw=screen.availWidth;
		ah=screen.availHeight;
	}else{
		aw=640;
		ah=450;
	}
	if (noweOkienko!=null && !noweOkienko.closed){
		noweOkienko.close();
	}
	if (noweOkienko==null || noweOkienko.closed){
		ustawienia="left=" + (aw-w)/2 + "," + "top=" + (ah-h)/2 + "," + "screenX=" + (aw-w)/2 + "," + "screenY=" + (ah-h)/2 + "," + "width=" + w + "," + "height=" + h + "," + "innerWidth=" + w + "," + "innerHeight=" + h + "," + "toolbar=no," + "location=no," + "directories=no," + "status=no," + "menubar=no," + "scrollbars=no," + "resizable=no"
		noweOkienko = window.open ('','obrazek',ustawienia);
	}
	noweOkienko.document.open();
	noweOkienko.document.clear();
	noweOkienko.document.write("<html><head>\n"+"<style><!--\n"+"body {background-repeat:no-repeat}\n"+"--></style>\n"+"</head>\n"+"<body bgcolor=\"#FFFFFF\" topmargin=\"0\" leftmargin=\"0\" bottommargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\"><img src=\""+src+"\" width="+w+" height="+h+"></body>\n"+"</html>");
	noweOkienko.document.close();
	noweOkienko.focus();
}


function okienko (src, w, h) {
	if (window.screen){
		aw=screen.availWidth;
		ah=screen.availHeight;
	}else{
		aw=640;
		ah=450;
	}
	if (noweOkienko!=null && !noweOkienko.closed){
		noweOkienko.close();
	}
	if (noweOkienko==null || noweOkienko.closed){
		ustawienia="left=" + (aw-w)/2 + "," + "top=" + (ah-h)/2 + "," + "screenX=" + (aw-w)/2 + "," + "screenY=" + (ah-h)/2 + "," + "width=" + w + "," + "height=" + h + "," + "innerWidth=" + w + "," + "innerHeight=" + h + "," + "toolbar=no," + "location=no," + "directories=no," + "status=no," + "menubar=no," + "scrollbars=yes," + "resizable=no"
		noweOkienko = window.open (src,'',ustawienia);
	}
	noweOkienko.focus();
}



function okienko_r (src, w, h) {
	if (window.screen){
		aw=screen.availWidth;
		ah=screen.availHeight;
	}else{
		aw=640;
		ah=450;
	}
	if (noweOkienko!=null && !noweOkienko.closed){
		noweOkienko.close();
	}
	if (noweOkienko==null || noweOkienko.closed){
		ustawienia="left=" + (aw-w)/2 + "," + "top=" + (ah-h)/2 + "," + "screenX=" + (aw-w)/2 + "," + "screenY=" + (ah-h)/2 + "," + "width=" + w + "," + "height=" + h + "," + "innerWidth=" + w + "," + "innerHeight=" + h + "," + "toolbar=no," + "location=no," + "directories=no," + "status=no," + "menubar=no," + "scrollbars=yes," + "resizable=yes"
		noweOkienko = window.open (src,'',ustawienia);
	}
	noweOkienko.focus();
}


function showHide(text, dispProp){
	if($(text).style.display!=dispProp ){
		$(text).style.display=dispProp;
	}else{
		$(text).style.display='none';
	}
}

var show_div_timer=null, ns4=document.layers, ns6=document.getElementById&&!document.all, ie4=document.all, mm=document.onmousemove, img1;

function show_div(type, w, h, title, shift_top, shift_left, e, sw) {
	var x=0, y=0, o_div=document.getElementById('show_div'), t1='';
	if (show_div_timer!=null) clearTimeout(show_div_timer);
	if (e!=null) {
		if (e.clientX) {
			if ((ns4) || (ns6)) {
				x=e.pageX;
				y=e.pageY;
			} else {
				x=e.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
				y=e.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
			}
		} else if (e.x) {
			x=e.x;
			y=e.y;
		} else {
			x=Math.round((screen.availWidth-w)/2);
			y=Math.round((screen.availHeight-h)/2);
		}
	} else {
		x=Math.round((screen.availWidth-w)/2);
		y=Math.round((screen.availHeight-h)/2);
	}
	if ((!o_div) || (sw==1)) {
		close_div();
		o_div=document.createElement('div');
		o_div.setAttribute('id', 'show_div');
		o_div.style.top=eval(y+shift_top)+'px';
		o_div.style.left=eval(x+shift_left)+'px';
		document.body.appendChild(o_div);
	}
	if (w>0) o_div.style.width=w+'px';
	if (h>0) o_div.style.height=h+'px'; else o_div.style.minHeight='75px';
	o_div.innerHTML='<div id="show_div_top">'+
		'<div style="float: left;">'+title+'</div>'+
		'<div style="float: right;"><a href="#" id="show_div_a" onclick="close_div(); return false;"><img src="/images/icon_close.gif" style="margin-top: 1px;" alt="" /></a></div></div>'+
		'<div id="show_div_main" style="padding: 10px; text-align: center;" onclick="close_div();">'+
		'<img src="/images/loader1.gif" id="img1" style="margin-top: '+eval(Math.round((Math.max(h, 75)-18)/2)-35)+'px;" />'+
		'</div>';
	if (type=='div') {
		document.getElementById('show_div_main').onclick=function () { };
		//http_post('http://'+base_host+uri, params, 'show_div_result');
	} else {
		img1=new Image();
		img1.src='/'+uri;
	}
	tr_div(0, type);
}


function tr_div(n, type) {
	var max1=10, v=n/max1, o_div=document.getElementById('show_div');
	if (!o_div) return;
	o_div.style.opacity=v;
	o_div.style.MozOpacity=v;
	o_div.style.filter='alpha(opacity: '+eval(v*100)+')';
	if (n<max1) {
		setTimeout('tr_div('+eval(n+1)+', \''+type+'\')', 25);
	} else if (type=='img') {
		if (img1.complete) {
			var i=document.getElementById('img1');
			i.src=img1.src;
			i.style.marginTop='';
		} else {
			setTimeout('tr_div('+eval(n)+', \''+type+'\')', 25);
		}
	}
}

function close_div() {
	var o_div=document.getElementById('show_div');
	if (o_div) o_div.parentNode.removeChild(o_div);
}


function show_div_result(txt) {
	var o_div_main=document.getElementById('show_div_main');
	o_div_main.style.textAlign='';
	o_div_main.innerHTML=txt;
}

