//
//
//  These are the new mapquest subroutines
//
//  openMap  - produces the map
//  openDir  - gives driving directions (pass in TO address)
//  openDir2 - gives driving directions (pass in FROM and TO address)
//

	function openMap(url, staddress, city, state, zip, Headerfile, CSSfile, pagetitle)
{
           var str = url + 'transaction=locMap&address=' + escape(staddress) + '&city=' + escape(city) 
           + '&stateProvince=' + escape(state) + '&postalCode=' + escape(zip) + '&Headerfile=' + escape(Headerfile) 
           + '&StyleSheetfile=' + escape(CSSfile) + '&documentTitle=' + escape(pagetitle);

           window.open(str,'','menubar=yes,scrollbars=yes,width=650,height=600');
}

	function openDir(url, destaddress, destcity, deststate, destzip, Headerfile, CSSfile, pagetitle)
{
           var str = url + 'transaction=route&destaddress=' + escape(destaddress) + '&destcity=' + escape(destcity) 
           + '&deststateProvince=' + escape(deststate) + '&destpostalCode=' + escape(destzip) + '&Headerfile=' + escape(Headerfile) 
           + '&StyleSheetfile=' + escape(CSSfile) + '&documentTitle=' + escape(pagetitle);

           window.open(str,'','menubar=yes,scrollbars=yes,width=800,height=600');
}
/*
    Last time I tried this is was only sort of working
    
	function openDir2(url, destaddress, destcity, deststate, destzip, origaddress, origcity, origstateProvince, origzip, Headerfile, CSSfile, pagetitle)
{
           var str = url + 'transaction=route&destaddress=' + escape(destaddress) + '&destcity=' + escape(destcity) 
           + '&deststateProvince=' + escape(deststate) + '&destpostalCode=' + escape(destzip) + '&origaddress=' + escape(origaddress) 
           + '&origcity=' + escape(origcity) + '&origstateProvince=' + escape(origstateProvince) + '&origpostalCode=' + escape(origzip) 
           + '&Headerfile=' + escape(Headerfile) + '&StyleSheetfile=' + escape(CSSfile) + '&documentTitle=' + escape(pagetitle);

           window.open(str,'','menubar=yes,scrollbars=yes,width=800,height=700');
}
*/