// JavaScript Document
navigation = function() {
	this.handlers = new Array() ;
	this.break_nav = false ;
}

navigation.prototype.navigate = function (options) {
	for (x in this.handlers) {
		this.handlers[x](options) ;
		if (this.break_nav) {
			break ;	
		}
	}
}

navigation.prototype.add_handler = function(func) {
	this.handlers.push(func) ;	
}

navigation.prototype.break_nav = function() {
	this.break_nav = true ;	
}

Nav = new navigation() ;