function setmap(lat,lng,zoom,mlat1,mlng1,mlat2,mlng2,mlat3,mlng3,mlat4,mlng4,mlat5,mlng5){var latlng=new google.maps.LatLng(lat,lng);var myOptions={zoom:zoom,center:latlng,mapTypeId:google.maps.MapTypeId.ROADMAP};var map=new google.maps.Map(document.getElementById('map_canvas'),myOptions);var bounds=new google.maps.LatLngBounds();if((zoom==15)||(mlat1!=0)){var marker=new google.maps.Marker({position:latlng,zIndex:6,map:map})}bounds.extend(latlng);if(mlat1!='NA'){var mlatlng1=new google.maps.LatLng(mlat1,mlng1);var marker1=new google.maps.Marker({position:mlatlng1,icon:"images/markers/blue_MarkerA.png",zIndex:5,map:map});bounds.extend(mlatlng1);google.maps.event.addListener(marker1,"mouseover",function(){document.getElementById('updatediv0').style.background='#ccc'});google.maps.event.addListener(marker1,"mouseout",function(){document.getElementById('updatediv0').style.background='#ffffff'})}if(mlat2!='NA'){var mlatlng2=new google.maps.LatLng(mlat2,mlng2);var marker2=new google.maps.Marker({position:mlatlng2,icon:"images/markers/blue_MarkerB.png",zIndex:4,map:map});bounds.extend(mlatlng2);google.maps.event.addListener(marker2,"mouseover",function(){document.getElementById('updatediv1').style.background='#ccc'});google.maps.event.addListener(marker2,"mouseout",function(){document.getElementById('updatediv1').style.background='#ffffff'})}if(mlat3!='NA'){var mlatlng3=new google.maps.LatLng(mlat3,mlng3);var marker3=new google.maps.Marker({position:mlatlng3,icon:"images/markers/blue_MarkerC.png",zIndex:3,map:map});bounds.extend(mlatlng3);google.maps.event.addListener(marker3,"mouseover",function(){document.getElementById('updatediv2').style.background='#ccc'});google.maps.event.addListener(marker3,"mouseout",function(){document.getElementById('updatediv2').style.background='#ffffff'})}if(mlat4!='NA'){var mlatlng4=new google.maps.LatLng(mlat4,mlng4);var marker4=new google.maps.Marker({position:mlatlng4,icon:"images/markers/blue_MarkerD.png",zIndex:2,map:map});bounds.extend(mlatlng4);google.maps.event.addListener(marker4,"mouseover",function(){document.getElementById('updatediv3').style.background='#ccc'});google.maps.event.addListener(marker4,"mouseout",function(){document.getElementById('updatediv3').style.background='#ffffff'})}if(mlat5!='NA'){var mlatlng5=new google.maps.LatLng(mlat5,mlng5);var marker5=new google.maps.Marker({position:mlatlng5,icon:"images/markers/blue_MarkerE.png",zIndex:1,map:map});bounds.extend(mlatlng5);google.maps.event.addListener(marker5,"mouseover",function(){document.getElementById('updatediv4').style.background='#ccc'});google.maps.event.addListener(marker5,"mouseout",function(){document.getElementById('updatediv4').style.background='#ffffff'})}if(mlat1!='NA'){map.fitBounds(bounds)}}function codeAddress(){var geocoder;geocoder=new google.maps.Geocoder();if(document.getElementById("UpdateLocationAddress").value.length==0){var address=document.getElementById("UpdateLocationPostcode").value}else{var address=document.getElementById("UpdateLocationAddress").value}address=address.replace(" ","");if(geocoder){geocoder.geocode({'address':address,'region':'gb'},function(results,status){if(status==google.maps.GeocoderStatus.OK){document.getElementById('UpdateLatLng').value=(results[0].geometry.location);document.forms.updateinfoform.submit()}else{document.forms.updateinfoform.submit()}})}}
