
///////bootchec 2006
//adds item to history
var movieID="pf_full";
var pageTitle=" bootPhoto - Contemporary Conceptual Photography Portfolio";
function addToHistory(arg){
	unFocus.History.Keeper.addHistory(unescape(arg));
	return "history item added: "+arg;
}


///
function onHistoryChange(arg) {
			
		updateTitle(arg);
		///gets name of swf movie and calls method inside flash
		getSWF(movieID).callHistoryData(arg);

	}

///updates page title
function updateTitle(arg){
	
	document.title=arg+pageTitle;
}

///get me swf file with a name
function getSWF (movieName) {		
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
   
}
///this has to be called from flash to initialize
function init(){
	unFocus.History.Keeper.addEventListener('historyChange', onHistoryChange);
	//gets the very first parameter if any
	var hs = window.location.hash;
	var pageparam = hs.substr(1, hs.length);
	if(pageparam){
		onHistoryChange(pageparam) ;
		return "initialized! <br> page parameter:"+pageparam;
		
	}else {
		return "initialized! no parameter ";
	}
}

