/* Similar to the addressToCampus function, but grabs info from
*  the dropdowns for campus to campus
*/

function calcRouteCampus() {
	// text field value
	var start = document.getElementById("startCampus").value;
	// dropdown choice
	var end = document.getElementById("endCampus").value;
	// takes variables and creates an object in the "request" variable
	if (start != end) {
		var request = {
			origin:start, 
			destination:end,
			travelMode: google.maps.DirectionsTravelMode.DRIVING
		};
		map.setMapTypeId(google.maps.MapTypeId.ROADMAP);
		// takes "request" and places it in a route, output to the map
		directionsService.route(request, function(result, status) {
			if (status == google.maps.DirectionsStatus.OK) {
				directionsDisplay.setDirections(result);
			}
		});
	} else {
		alert("Start and End positions must be different.");
	}
	directionsDisplay.setMap(map);
	toggleMe();
}
