if(typeof(Control) == "undefined")
	var Control = {};
	
Control.Map = Class.create();

Control.Map.prototype = {

	initialize: function(elListener,elTarget){
		this.elTarget = $(elTarget);
		this.elListener = $(elListener);
		this.area = $A(this.elListener.getElementsByTagName('area'));
		this.area.each(this.setupArea.bind(this));
	},
	
	setupArea: function(elm) {
		Event.observe(elm,'mouseover',this.activate.bindAsEventListener(this),false);
		Event.observe(elm,'mouseout',this.inactive.bindAsEventListener(this),false);
	},
	
	activate:  function(ev) {
		var elm = Event.findElement(ev, "area");
		Event.stop(ev);
		this.elTarget.className = elm.className;
	},
	
	inactive:  function(ev) {
		var elm = Event.findElement(ev, "area");
		Event.stop(ev);
		this.elTarget.className = "";
	}
	
}
