
function trailShowPoints() {
	var map = document.getElementById("map");
	if (!map) return;

	for (var i = 0; i < trailMapPoints.length; i++) {
		var div = trailMapPoints[i].div;

		if (!div) {
			div = document.createElement("div");
			trailMapPoints[i].div = div;
			div.style.position = "absolute";
			div.style.width = "20px";
			div.style.height = "30px";
			div.style.background = "url('../lib/mapimages/mappoint.gif')";
			div.style.textAlign = "center";
			div.style.fontSize = "10px";
			div.style.paddingTop = "4px";
			map.appendChild(div);
		}
		div.innerHTML = "<b>" + (i + 1) + "</b>";
		div.style.left = (trailMapPoints[i].x - 10) + "px";
		div.style.top = (trailMapPoints[i].y - 34) + "px";
	}
}

var trailMapPoints = new Array();
function trailNewItem(xpos, ypos, title, description) {
	var pnt = new Object();
	if (arguments.length > 0) {
		pnt.x = xpos;
		pnt.y = ypos;
		pnt.title = title;
		pnt.description = description;
	} else {
		pnt.x = -50;
		pnt.y = -50;
		pnt.title = "";
		pnt.description = "";
	}
	trailMapPoints.push(pnt);
	trailShowPoints();
}

