
function bookmark()
{
	var title="Serwis sportowy Powiatu Lęborskiego"
	var url="http://www.sport.starostwolebork.pl/"

	if (window.sidebar) window.sidebar.addPanel(title, url,"");

	else if( window.opera && window.print )
	{
	var mbm = document.createElement('a');
	mbm.setAttribute('rel','sidebar');
	mbm.setAttribute('href',url);
	mbm.setAttribute('title',title);
	mbm.click();
	}

	else if( document.all ) window.external.AddFavorite( url, title);
}



historyArray=[];

var ua = navigator.userAgent.toLowerCase();
isIE = ((ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1))

function checkHistory()
{
	if(location.hash.replace('#', '')!=lastHistory&&location.hash.replace('#', '')!='top') { content.load(location.hash.replace('#', '')); }
}

function historyBack()
{
	var ua = navigator.userAgent.toLowerCase();
	isIE = ((ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1)); 
	if(!isIE||historyArray.length==0) { history.back(); }
	else
	{
		var temp = lastHistory;
		historyArray.pop();
		if(historyArray[historyArray.length-1]!='')
		{
			content.load(historyArray[historyArray.length-1]);
		}
		historyArray.pop();
		lastHistory=temp;
	}
}
function Zegar(newName)
{
	var minutes=0;
	var hours=0;
	var obj=null;
	var timer;
	var name = newName;
	
	function init(newObj, newHours, newMinutes)
	{
		minutes=newMinutes;
		hours=newHours;
		obj = document.getElementById(newObj);
		generate()
		timer = setInterval(name+'.next()', 1000*60);
	}
	this.init = init;
	
	function generate()
	{
		obj.innerHTML=((hours<10)?'0':'')+hours+':'+((minutes<10)?'0':'')+minutes;
	}
	
	function next()
	{
		minutes++;
		if(minutes>=60)
		{
			hours++;
			minutes=0;
			if(hours>23) { hours=0; }
		}
		
		generate()
	}
	this.next = next;
}

