function showAddress(formNo) { if(formNo!=2) formNo="" geocoder = new google.maps.Geocoder() address=document.getElementById("Church_Search"+formNo).value+", UK"; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) document.getElementById("Catholic_location"+formNo).value=results[0].geometry.location; else document.getElementById("Catholic_location"+formNo).value=''; if(formNo!=2) document.Catholic_Church.submit(); else document.Catholic_Church2.submit(); }) } // programming (c) CathCom/CatholicDirectory/Nick Layton // function runScript(e,formNo) { if (e.keyCode == 13) { showAddress(formNo); return false; } } function refreshChurches() { params=""; if(document.getElementById("ckChurches").checked==false) params+="&ckChurches=0"; else params+="&ckChurches=1"; if(document.getElementById("ckSchools").checked==false) params+="&ckSchools=0"; else params+="&ckSchools=1"; if(document.getElementById("ckOthers").checked==false) params+="&ckOthers=0"; else params+="&ckOthers=1"; params+="&Catholic_Location=53.424696,-3.063393&Church_Search=&Catholic=&Adv=&PageType=" window.location.href='Catholic_Church.asp?Adv='+params+"&Extra=0";//extra added as google producing error which adds something to the end of the URL messing up the last param }