var currentHash = null;

/**
 * Called by Flash
 */
function goForward( hash ) {
    currentHash = hash;
    // set the new history hash
    if( browserManager.getInfo().browser != "SAFARI" ) {
		unFocus.History.addHistory( hash );
	}
    return;
}

function goBackward( hash ) {
	currentHash = hash;
	if( browserManager.getInfo().browser != "SAFARI" ) {
		history.go(-1);
	}
    return;
}

/**
 * History callback
 * @param historyHash The text after the # in the URL
 */
function historyListener( historyHash ) {
    var movie;
    if( document.getElementById( "nikeRunningSwf" ) ) movie = document.getElementById( "nikeRunningSwf" );
    else movie = ( navigator.appName.indexOf("Microsoft") != -1 ) ? window["nikeRunningSwf"] : document["nikeRunningSwf"];
    // If link did not originate from Flash movie
    if( currentHash != historyHash && currentHash != null ) {
		if( browserManager.getInfo().browser != "SAFARI" ) {
			movie.handleDeepLink( historyHash );
		}
    }
    document.title = "Nike Running Europe";
}



