	
	function historymanager(func) {
		
		var path = '';
		var hash = null;
		var href = '';
		
		this.init = function (func) {
			path = window.location.path;
			href = window.location.href;
			if (window.location.hash.length>0)
				hash=window.location.hash.replace("#","");
			else
				window.location.hash="#s0";
			window.setInterval(function() { check(func); },50);
		}
		
		var check = function(func) {
			if (window.location.href != href) {
				//alert(typeof func)
				//alert("hallo");
				path = window.location.path;
				href = window.location.href;
				if (window.location.hash.length>0)
					hash=window.location.hash.replace("#","");
				func();
			}
		}
		
		this.gethash = function() {
			if (hash!=null)
				return hash;
			else
				return false;
		}
		
		
		this.init(func);
		
	}
