﻿
function bookmark()
{
	var title="Trójmiejska Korporacja Nieruchomości"
	var url="http://www.tkn.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;
	}
}

