﻿function SetDisplay(id, display) {
	document.getElementById(id).style.display = display;
}

function SetContact(id, map_id, visible) {
	var map = document.getElementById("map" + map_id);
	var contact = document.getElementById("contact_mark" + id);		
	
	if (visible) {
		contact.style.display = "block";		
		
		if (event.x > (map.clientWidth / 2)) {
			contact.style.left = (event.x - contact.clientWidth - 10) + "px";			
		} else {
			contact.style.left = (event.x + 10) + "px";			
		}
		
		if (event.y > (map.clientHeight / 2)) {
			contact.style.top = (event.y - contact.clientHeight - 10) + "px";
		} else {
			contact.style.top = (event.y + 10) + "px";
		}
		
	} else {
		contact.style.display = "none";
	}	
}
