/*
 *	Cross-browser getElementById function
 */
if(document.all && !document.getElementById){
        document.getElementById = function(Id){
                return document.all[id];
        }
}

var lastShown = null;

/* Hides a div */
function hideDiv(obj) {
   obj.style.display = "none";
}

/* Shows a div */
function showDiv(obj) {
    obj.style.display = "";
}

function toggleInfo(id) {
	var theDiv = document.getElementById(id);
	if (lastShown == theDiv) {
		// user clicked on the currently open person
		hideDiv(theDiv);
		lastShown = null;
	} else {
		// user clicked on a new person
		if (lastShown != null) hideDiv(lastShown);
		showDiv(theDiv);
		lastShown = theDiv;
	}
}