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.getElementById("Catholic-Church").submit(); else document.getElementById("Catholic-Church2").submit(); }) } // programming (c) /CatholicDirectory // function runScript(e,formNo) { if (e.keyCode == 13) { showAddress(formNo); return false; } } function refreshChurches() { params=""; if(document.getElementById("ck-Churches").checked==false) params+="&ck-Churches=0"; //else // params+="&ck-Churches=1"; if(document.getElementById("ck-Schools").checked==false) params+="&ck-Schools=0"; //else // params+="&ck-Schools=1"; if(document.getElementById("ck-Others").checked==false) params+="&ck-Others=0"; //else // params+="&ck-Others=1"; if('53.4575591,-2.7406361'!="") params+="&Catholic-Location=53.4575591,-2.7406361"; if(''!="") params+="&Church-Search="; if(''!="") params+="&Catholic="; if(''!="") params+="&PageType="; newLocation='Catholic-Church.asp?'+params; newLocation=newLocation.replace("?&","?"); window.location.href=newLocation;//+"&Extra=0";//extra added as google producing error which adds something to the end of the URL messing up the last param }