function closeTopLayer() {
	var topLayer = document.getElementById('topLayer');
	if(topLayer != undefined) {
		topLayer.parentNode.removeChild(topLayer);
	}
}

function ulubione(obj) {
/*Autorem jest Bartosz "BTM" Szczecinski - programista PHP, MySQL, lubiacy eksperymentowac ze stylami CSS, JavaScript oraz szeroko pojeta tematyka aplikacji internetowych. Mozesz skontaktowac sie ze mna poprzez email btm@anfo.pl lub Jabbera btm@jabber.aster.pl */
	var title = document.title;
	var url = document.location;
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { 
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { 
		/**
		 * Opera wymaga ustawienia parametru REL dla linku
		 * Firefox takze wspiera takie rozwiazanie, jednak w typ wypadku
		 * spowodowalo by to wywolanie 2 okienek dodania - jednego pustego
		 * dlatego ustawiamy parametr poprzez JavaScript
		 */	
		obj.rel = 'sidebar';
		return true;
	}
	return false;
}

function okno_popup(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=900,height=600');");
eval("page" + id + ".document.open();" );
eval("page" + id + ".document.write('<html><head><title></title></head><body><div style=\"position:absolute; left:0px; top:0px;\"><img src=\"" + URL +  "\" onclick=\"window.close();\" width=\"700\" height=\"525\"></div></body></html>');" );
eval("page" + id + ".document.close();" );
}

function popup_siedliska(url) 
{
 window.open(url,'','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=900,height=600');
}

