function bR(d){var H=null;var m=document.getElementById(d.bw);if(m!=null){H=new G(m,d.be);if(d.cP!=undefined)H.cP=d.cP;if(d.pause!=undefined)H.pause=d.pause;if(d.aP!=undefined)H.aP=d.aP;if(d.as!=undefined)H.as=d.as;if(d.aD!=undefined)H.aD=d.aD;if(d.ai!=undefined)H.ai=d.ai;if(d.D!=undefined)H.D=d.D;if(d.I!=undefined)H.I=d.I;}return H;};function cb(l){var menu=null;var m=document.getElementById(l.bw);if(m!=undefined){menu=new aB(m,l.ag);if(l.aw!=undefined)menu.aw=l.aw;if(l.aQ!=undefined)menu.aQ=l.aQ;if(l.A!=undefined)menu.A=l.A;if(l.au!=undefined)menu.au=l.au;if(l.L!=undefined)menu.L=l.L;if(l.ab!=undefined)menu.ab=l.ab;}return menu;};apImportScript=function(url){bL=document.createElement("script");bL.src=url;bL.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(bL);};function dF(){ 
	try 
	{  
		var pageTracker = _gat._getTracker("UA-18677706-1");
		pageTracker._initData();
		pageTracker._trackPageview();
	}
	catch(err) {}
	 };function dg(m,name,address,dv){this.w=c.add(this);this.name=name;this.address=address;var du=new bj.ce.ep(51.463274,-0.159115);var bE;if(dv)bE={zoom:14,center:du,dk:bj.ce.dp.dI};else bE={zoom:14,center:du,dk:bj.ce.dp.dI,dE:true,cI:true,ee:false,dy:false,dM:false,dz:false,dV:false,dY:false};this.map=new bj.ce.et(m,bE);var cz=cz=new bj.ce.eg();eval("cz.geocode({'address': address}, function(ah, status){c.item("+this.w+").cV(ah, status);});");};dg.prototype.cV=function(ah,status){if(status==bj.ce.dK.eu){this.map.ef(ah[0].dB.location);var eo=new bj.ce.eq({map:this.map,position:ah[0].dB.location});}else{}};function SetBookMotForm(){var garage=document.getElementById("garage");switch(garage.options[garage.selectedIndex].value){case "":document.getElementById("bookLive").style.display="none";document.getElementById("bookOnline").style.display="none";break;case "Aldershot":case "Camberley":case "Farnham":case "Reading":case "Eastleigh":case "Swindon":case "Hemel Hempstead":case "New Malden":case "Hillingdon": document.getElementById("bookLive").style.display="block";document.getElementById("bookOnline").style.display="none";break;default:document.getElementById("bookLive").style.display="none";document.getElementById("bookOnline").style.display="block";break;}};function Ap_Init(){var H=bR({bw:"slideshow",be:"/SlideShow_Slides.htm",pause:5000});var slideTicks=bR({bw:"slideTicks",be:"/Ticks_Slides.htm",pause:2500});var slideTicks=bR({bw:"slideTicks2",be:"/Ticks_Slides2.htm",pause:2500});var ea;if(ap.r()=="MSIE 6.0")ea=cb({bw: "ddm",ag:{x:0,y:30},L:{x:0,y:0},ab:"off"});else ea=cb({bw: "ddm",ag:{x:0,y:30},L:{x:0,y:0},ab:"off"});var aZ=document.getElementById("tabs");if(aZ!=null)new cF(aZ);dF();if(document.body.className=="bookAnMOT"){SetBookMotForm();var garage=document.getElementById("garage");garage.onchange=function(){SetBookMotForm();};var bookLive=document.getElementById("bookAnMOT_Live");bookLive.onclick=function(){var form=document.getElementById("enquirey");var garage=document.getElementById("garage");if(validate(form))window.open(garage.options[garage.selectedIndex].title);}}} 
apImportScript("/scripts/ApCore.js");
apImportScript("/scripts/ApDDM.js");
apImportScript("/scripts/ApTabs.js");
apImportScript("/scripts/ValidateSubmit.js");
apImportScript("/scripts/ImageSwap.js");
apImportScript("/scripts/ApAsync.js");
apImportScript("/scripts/ApSlideShow.js");
/*
apImportScript("/scripts/ApAsyncLogin.js");
apImportScript("/scripts/ApEvents.js");
apImportScript("/scripts/ApCommandNav.js");
apImportScript("/scripts/ApTabs.js");
apImportScript("/scripts/GoogleMaps.js");
apImportScript("/scripts/Reviews.js");
apImportScript("/scripts/RestrictTextArea.js");
*/
apImportScript("http://www.google-analytics.com/ga.js");

window.onload = function(){setTimeout("Ap_Init()", 100)};

var loginAs = null;









//	*********************************************************************************************		CSS Hax


function Ap_importIECssHax()
{
	var browserType = Ap_getBrowserType();
	
	if(browserType == "MSIE 6")
	{
		Ap_importCSS("/styles/ie6Hax.css");
	}
	if(browserType == "MSIE 7")
	{
		Ap_importCSS("/styles/ie7Hax.css");
	}
	if(browserType == "MSIE 8")
	{
		Ap_importCSS("/styles/ie8Hax.css");
	}	
	if(browserType == "Safari")
	{
		Ap_importCSS("/styles/safariHax.css");
	}		
	/*
	if(browserType == "Opera")
	{
		Ap_importCSS("/styles/operaHax.css");
	}		
	*/
}

function Ap_importCSS(url)
{
	var head = document.getElementsByTagName("head")[0];

	var newStyle = document.createElement("link");
	newStyle.setAttribute("rel","stylesheet");
	newStyle.setAttribute("type", "text/css");
	newStyle.setAttribute("href", url);

	head.appendChild(newStyle);	
}

function Ap_getBrowserType()
{
	if(navigator.userAgent.indexOf("MSIE 6") > -1)
	{
		return "MSIE 6";
	}
	if(navigator.userAgent.indexOf("MSIE 7") > -1)
	{
		return "MSIE 7";
	}		
	if(navigator.userAgent.indexOf("MSIE 8") > -1)
	{
		return "MSIE 8";
	}		
	if(navigator.userAgent.indexOf("Firefox") > -1)
	{
		return "Firefox";
	}	
	if(navigator.userAgent.indexOf("Safari") > -1)
	{
		return "Safari";
	}	
	if(navigator.userAgent.indexOf("Opera") > -1)
	{
		return "Opera";
	}		
	
	return "unknown";
}

Ap_importIECssHax();
