<!--
/* Written by Brian Shell - VDH/Lord Fairfax Health District
   Recieves source address from input text boxes and a destination address through
   parameters passed to the ForwardtoMapQuest() function,
   The data is then reformattted to conform to MapQuest specifications and appended
   to a base URL and sent to the browser for redirection. */
function ForwardtoMapQuest(dStreet, dCity, dState, dZip) {
	var Street = document.getElementById('txtStreetAddress').value.replace(/(\s+)/g, "+")
	var City = document.getElementById('txtCity').value.replace(/(\s+)/g, "+")
	var State = document.getElementById('txtState').value.replace(/^\s+|\s+$/g, '')
	var Zip = document.getElementById('txtZip').value.replace(/^\s+|\s+$/g, '')
	dStreet = dStreet.replace(/(\s+)/g, "+")
	dCity = dCity.replace(/(\s+)/g, "+")
	dState = dState.replace(/^\s+|\s+$/g, '')
	dZip = dZip.replace(/^\s+|\s+$/g, '')

	window.location = "http://www.mapquest.com/maps?1c=" + City + "&1s=" + State + "&1a=" + Street + "&1z=" + Zip + "&2c=" + dCity + "&2s=" + dState + "&2a=" + dStreet + "&2z=" + dZip + "&CID=lfddlink"
}
//-->

