function Mediator() {
	this.dropDownMenu 		= null;
	this.objectsDictionary	= new Array();
	this.openContainersID	= new Array();
}

Mediator.prototype.registerDropDownMenu = function(menu) {
	this.dropDownMenu = menu;
}
Mediator.prototype.getDropDownMenu = function() {
	return this.dropDownMenu;
}
Mediator.prototype.getActiveMenuItem = function() {
	return this.activeMenuItem;
}
Mediator.prototype.setActiveMenuItem = function(obj) {
	this.activeMenuItem = obj;
}
Mediator.prototype.addObjectReference = function(id, obj) { 
	this.objectsDictionary[id] = obj;
}
Mediator.prototype.getObjectReference = function(id) { 
	return this.objectsDictionary[id];
}
Mediator.prototype.addOpenContainer = function(container) {
	this.openContainersID.push(container);
}
Mediator.prototype.cleanContainer = function(actualContainer) {
	for(var i=0; i<this.openContainersID.length; i++) {
		var tmpContainer = this.openContainersID[i];
		if (tmpContainer != actualContainer && tmpContainer.indexOf(actualContainer) != -1) {
			GuiHelper.hide(document.getElementById("cont_"+tmpContainer));
		}
	}
}
Mediator.prototype.hideAllContainers = function() {
	for(var i=0; i<this.openContainersID.length; i++) {
		GuiHelper.hide(document.getElementById("cont_"+this.openContainersID[i]));
	}
}
Mediator.prototype.hideMenu = function() {
	if (this.getDropDownMenu().isMenuTimeElapsed() && !DropDownMenu.existsActiveItem) {
		this.hideAllContainers();
	}
}