function js_addsidebar(el){
	var tytul = document.title;
	var url = window.location;
	if(window.sidebar){window.sidebar.addPanel(tytul, url, "");}
	else if(window.external){window.external.AddFavorite(url, tytul);}
	else if(window.opera && window.print){
		if((typeof el)=='object'){
			var tag = el.tagName ? el.tagName.toLowerCase() : '';
			if(tag=='a'){
				el.rel = 'sidebar';
				el.title = document.title;
				el.href = window.location;
				el.onclick = '';
			}else{
				var appVersion = parseFloat(navigator.appVersion,10);
				if(appVersion<=9.01){
					var a = document.createElement("a");
					a.setAttribute("rel","sidebar");
					a.setAttribute("href", url);
					a.setAttribute("title", tytul);
					a.click();
				}else{
					if(document.getElementById('eldivaddfav')){
						document.getElementById('eldivaddfav').style.display='';
					}else{
						var top=10, left=0, width=300, height=10;
						if(screen){
							//top = (screen.height-height)/2;
							width = screen.width-50;
							//left = (screen.width-width)/2;
						}
						var div = document.createElement("div");
						div.id = 'eldivaddfav';
						div.style.cssText = 'padding:20px; text-align:center; background-color:white; border:1px solid #696969; width:'+width+'px; height:'+height+'px; position:fixed; top:'+top+'px; left:'+left+'px; z-index:10000;';
						div.innerHTML = '<a id="addfav" rel="sidebar" href="'+url+'" title="'+tytul+'" onclick="document.getElementById(\'eldivaddfav\').style.display=\'none\';this.blur();" style="display:block; color:black; font-weight:bold; font-size:12px; font-family:tahoma; text-decoration:none;">dodaj do ulubionych</a>';
						document.body.appendChild(div);
					}
				}
			}
		}
	}
}

