




function historyHandler () {

	window.onload = function() {
		//document.getElementById('main').innerHTML = unescape(state);
	};
	
	// this is the public method that will be called to add an entry
	this.addHistory = function(data) {
		unFocus.History.Keeper.addHistory(unescape(data));
	};
	
	// the method that will take updates from the History Keeper
	this.onHistoryChange = function(data) {
		
		document.title = 'Rue57 :: ' +getStringBegin(data);
		
	};
	
	// add the event listener
	// :NOTE: onHistoryChange has to be anchored to this object.
	// A private method would not be properly scoped, and could not update state.
	unFocus.History.Keeper.addEventListener('historyChange', this.onHistoryChange);
	
	this.getCurrentState = function() {
		alert(state);
	};
	
};

document.historyHandler = new historyHandler ();

function getSWF (movieName) {
		
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
   
}


function getStringBegin(src) {
	
	var arr = src.split("_")
	return arr[0]
	
}