function map_showAddress() {
	var themap = document.getElementById('map').getElementsByTagName('dt');
//	alert(themap.length);
	for(var i=0; i < themap.length; i++) {
			themap[i].firstChild.onclick = function () {
					var thechosen = this.parentNode.getAttribute('id');
					document.forms['content'].tdd.options[0].selected = true;
					showAddress(thechosen); return false;
				}
	}
}
function select_showAddress() {
	var theinput = document.forms['content'].tdd.options[document.content.tdd.selectedIndex].getAttribute("value");
	showAddress(theinput);
}
function showAddress(user_input) {
	var pl = document.getElementById('main').getElementsByTagName('div');
	if(user_input == 'all') {
		for(var i=0; i < pl.length; i++) {
			if((/address/.test(pl[i].className))) {
				pl[i].style.display = 'block';
			}
		}
	} else {
	for(var i=0; i < pl.length; i++) {
		if((/address/.test(pl[i].className))) {
			pl[i].style.display = 'none';
		}
	}
	document.getElementById(user_input + "_").style.display = 'block';
	}
}
function hideAddress() {
	var pl = document.getElementById('main').getElementsByTagName('div');

	for(var i=0; i < pl.length; i++) {
		if((/address/.test(pl[i].className))) {
			pl[i].style.display = 'none';
		}
	}
}
window.onload = function () {
	map_showAddress();
}