function MapObj() {
	var me = this;
	var dl;
	
	me.init = function() {
		var currentLocation;
	
		var map = document.getElementById('holder');
		
		var dls = map.getElementsByTagName('dl');
		var dl = dls.item(0);
		if(dl) {
			me.dl = dl;
			
			var dts = map.getElementsByTagName('dt');
			for(var i = 0; i < dts.length; ++i){
				var as = dts[i].getElementsByTagName("a");
				if(as) {
					var a = as.item(0);
					if(a) {
						a.onmouseover = function() {
							me.showTooltip(this);
						};
						a.onmouseout = function() {
							me.hideTooltip(this);
						};
						a.onclick = function() {
							me.goToPage(this);
						};
				
						a.setAttribute("href2", a.getAttribute("href"));
						a.setAttribute("href", "#");
					}
				}
			}
		}
	}

	me.showTooltip = function(elm) {
		var tooltip = document.getElementById("tooltip");
		if(tooltip) {
			var elm_html = elm.getElementsByTagName("div").item(0).innerHTML;
			tooltip.innerHTML = elm_html;
			tooltip.style.left = (elm.offsetLeft + me.dl.offsetLeft + 10) + "px";
			tooltip.style.top = (elm.offsetTop + me.dl.offsetTop - 20) + "px";
			tooltip.className = elm.getAttribute("country");
			tooltip.style.display = "block";
		}
	}

	me.hideTooltip = function(elm) {
		var tooltip = document.getElementById("tooltip");
		if(tooltip) {
			tooltip.style.display = "none";
		}
	}

	me.goToPage = function(elm) {
		var href = elm.getAttribute("href2");
		
		if(href)
			document.location = href;
	
		return false;
	}
};

