
function historyHandler()
{
	this.addHistory = function(data)
	{
		if (data && data.length && ( data != "0" ) )
		{
			// console.log( "addHistory, data: " + data );
			unFocus.History.Keeper.addHistory(data);
		}
	};
	
	this.onHistoryChange = function(data)
	{
		// TODO Let Flash pass the title or xml request it from back-end
		// document.title = '' + unescape(data);
		pushDeeplink (data);
	};
	
	unFocus.History.Keeper.addEventListener('historyChange', this.onHistoryChange);
	
	this.getCurrentState = function() {
	};
};

document.historyHandler = new historyHandler ();

function pushDeeplink( id )
{
	passToFlash( "swfobjId","activePageId", id );
}
