var views = new Array();
var iconPlus = new Image();
iconPlus.src = 'images/icon_plus.gif';
var iconMinus = new Image();
iconMinus.src = 'images/icon_minus.gif';

function toggleView(id) {
	if (views[id]) {
		views[id] = false;
		document.getElementById('schedule' + id).style.display = 'none';
		document.getElementById('expand' + id).src = iconPlus.src;
	} else {
		views[id] = true;
		document.getElementById('schedule' + id).style.display = 'block';
		document.getElementById('expand' + id).src = iconMinus.src;
	}
}

function viewMap(address, city, state, zip) {
	var h = screen.height - 200;
	var w = screen.width * 0.75;
	// Read the data.
	if (address != "" && zip != "") {
		var popupMap = window.open("http://maps.google.com/maps?f=q&hl=en&geocode=&q=" + address + ",+" + city + ",+" + state + "+" + zip + "&ie=UTF8&z=16&iwloc=addr", "popupMap", "height=" + h + ",left=50,resizable=1,scrollbars=1,status=0,top=50,width=" + w);
	} else {
		alert("No address and zip code found to generate a map.");
	}
	popupMap.focus();
}