var map = {
	activeub: 0,
	
	showitems: function() {
		var items = $('mapitems').getElementsByTagName('div');
		for (i=0; i<items.length; i++) {
			if (items[i].className == 'item_'+this.activeub || this.activeub == 0) {
				items[i].style.display = "block";
			} else {
				items[i].style.display = "none";
			}
		}
	},
	
	hoverub: function(ub, state) {
		if (ub > 0) {
			var marker = $('marker_' + ub);
			var tooltip = marker.getElementsByTagName('em');
			
			if (ub != this.activeub) {
				if (state == 1) {
					marker.style.backgroundPosition = '0px 16px';
				} else {
					marker.style.backgroundPosition = '0px 0px';
				}
			}
			if (state == 1) {
				tooltip[0].style.display = "block";
			} else {
				tooltip[0].style.display = "none";
			}
		}
	},
	
	selectub: function(ub) {
		if (this.activeub > 0) {
			var marker = $('marker_' + this.activeub);
			marker.style.backgroundPosition = '0px 0px';
		}
		if (this.activeub != ub) {
			var marker = $('marker_' + ub);
			marker.style.backgroundPosition = '0px 32px';
			this.activeub = ub;
		} else {
			this.activeub = 0;
		}
		
		this.showitems();
		return false;
	}
}