function deHash() {
	this.oldHash = self.document.location.hash.substring(1);
}









deHash.getHashes = function(defaultItem) {
	
	
	var completeHash = self.document.location.hash.substring(1);
	var hashArray = completeHash.split("/");
	
	if(completeHash=="") {
		var hashArray = defaultItem;
	}
	
	
	
	return hashArray;
}









deHash.isHashDifferent = function() {
	this.newHash = self.document.location.hash.substring(1);
			
	if(deHash.oldHash!=null) {
		if(this.newHash!=deHash.oldHash) {
			var hashes = deHash.getHashes();
			deHash.action(hashes[0]);
			deHash.update();
		}	
	}
	setTimeout("deHash.isHashDifferent()",250);
}








deHash.update = function() {
	deHash.oldHash = self.document.location.hash.substring(1);
}







deHash.action = function(ID) {
	var AJAX=new GetXmlHttpObject(ID);
	
	//This is the function that's called after a request has been sent - it'll just alter an inner text of an HTML object
	AJAX.onreadystatechange= function() {
		if (AJAX.readyState==4 || AJAX.readyState=="complete") {
			var parametres = AJAX.responseText.split("/");
			//setTimeout(clickedOnMenu( parametres[0], parametres[1], parametres[2] ),1);
			setTimeout(deHash.performUpdate(parametres[0], parametres[1], parametres[2] ), 1);
		}
	}
	
	//Here is the request sent
	AJAX.open("GET","modules/siteMenuFetcher.php?siteMenuFetcher="+ID,true);
	AJAX.setRequestHeader("Content-type", "text/xml; charset=iso-8859-1");
	AJAX.send(null);
}






deHash.performUpdate = function( module, project, ID, menuContainer, dimension ) {
	if(module!="")
		AJAX_updateModule( module, ID, "index_mainContent", true );	
		
	AJAX_updateModule( "siteMenu", ID+"&p="+project+"&menuContainer="+menuContainer+"&dimension="+dimension, "siteMenu", false);
}