// JavaScript Document
pageType = 'normal';
if(Browser.Engine.trident) {
	DD_roundies.addRule('.curvedleft', '5px');
	
}

function init() {
	if($('authimage')!=null) getAuthImage();
	if($chk($$('.mapbox'))) {
	  if (GBrowserIsCompatible()) {
		latlngKent = new google.maps.LatLng(51.383664, 0.520223);
	  	//showAddress('TN11 0LT');
	  	if($chk($('map'))) {
	      
	       var myOptions = {
			    zoom: 13,
			    center: latlngKent,
			    disableDefaultUI: true,
			    navigationControl: true,
			    navigationControlOptions: {
			      style: google.maps.NavigationControlStyle.SMALL
			    },
			    mapTypeId: google.maps.MapTypeId.ROADMAP  
			  }
			 var mapkent = new google.maps.Map($("map"),myOptions);
			 
			 var marker = new google.maps.Marker({
			      position: latlngKent, 
			      map: mapkent, 
			      title:"Alston Ashby Solicitors"
			  });
			 
	        
	   }
	  }
	}
}

function getAuthImage() {
	var reference = Math.floor(Math.random() * 9999999);
	$('authimage').innerHTML = "&nbsp;Copy text (<a href=\"javascript:getAuthImage()\">refresh</a>) <img src='http://www.afxcms.com/getAuthImage.php?reference= " + reference + "' /><input type='hidden' name='imagereference' value='" + reference + "' /><input type='text' name='imagetext' style='width: 60px; height: 20px;' />";
}

/* DomReady Event fires when all Elements are ready, but not images. */
window.addEvent('domready', function() {
	init();	
});
