document.navigators = {
	running : false,
	iframe : null,
	last_page : "",
	init_page : "",
	title : "",
	is_ie : false,
	
	settings : {
		interval : 100,
		div_main : "conteudo",
		iframe_src : "control.htm"
	},
	
	initialize : function(url) {
		this.is_ie = (navigator.userAgent.toLowerCase().indexOf("msie") > -1) ? true : false;
		if(this.is_ie) {
			this.settings.iframe_src = this.settings.iframe_src.replace(/(\?|#).*$/, "");
			//this.running = true; The iFrame that needs to make it running
			this.iframe = document.createElement("iframe");
			this.iframe.setAttribute("src", this.settings.iframe_src);
			this.iframe.setAttribute("id", "iframe_ajax_ie");
			this.iframe.style.display = "none";
			document.getElementsByTagName("body")[0].appendChild(this.iframe);
		}
		
		if(window.location.hash.indexOf("#") > -1) {
			var _tmp = window.location.hash.split("#");
			var url = _tmp[1];
			this.last_page = url;
			setPage(base64_decode(url), this.settings.div_main);
		} else {
			setPage(base64_decode(this.init_page), this.settings.div_main);
		}
		document.title = this.title;
		this.running = true;
	},
	
	handle : function() {
		if(!this.running) this.initialize();
		var _tmp = window.location.hash.split("#");
		var url = _tmp[1];
		if(url != this.last_page) {
			this.last_page = url;
			window.location.hash = "#"+this.last_page;
			setPage(base64_decode(url), this.settings.div_main);
		}
		document.title = this.title;
	}
}