var photoWin = null;function viewPhoto( imgSrc, imgTitle ) {	if( photoWin ) {		photoWin.close();	}	photoWin = window.open( '', 'photoWin', 'width=150,height=150' );	var htm = '<html>' +	'<head>' +	'<title>' + imgTitle + '</title>' +	'<meta http-equiv="imagetoolbar" content="false" />' +	'</head>' +	'<body style="margin: auto; padding: auto; overflow: hidden;" onload="document.getElementById(\'theDiv\').style.visibility=\'visible\';document.getElementById(\'closeWin\').style.visibility=\'visible\';window.resizeTo(document.images[ \'theImage\' ].width+30,document.images[ \'theImage\' ].height+70);">' +	'<p style="font: 11px Verdana,sans-serif; position: absolute; top: 10px; left: 10px;">Image Loading<br /><blink>Please wait...</blink></p>' +	'<div id="theDiv" style="visibility: hidden; position: absolute; top: 10px; left: 10px; text-align: center;"><img src="' + imgSrc + '" border="0" id="theImage" alt="' + imgTitle + '" /></div>' +	'<div id="closeWin" style="visibility: hidden; position: absolute; top: 5px; left: 0; width: 100%; z-index: 100; text-align: right; display: block;"><form><input type="button" style="background: #fff; border: 1px solid #000000; color: #000000; font: bold 11px Verdana, sans-serif; margin-right: 5px; display: inline;" onclick="window.close();" value="Close Window" /></form></div>' +	'</body>' +	'</html>';	photoWin.document.write( htm );	photoWin.document.close();}var popUpWin = null;function openWindow( winUrl, winWidth, winHeight ) {    if( popUpWin ) {		popUpWin.close();	}	popUpWin = window.open( winUrl, 'popUpWin', 'width=' + winWidth + ',height=' + winHeight + ',status=yes,scrollbars=yes,resizable=yes' );}function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank"; } } window.onload = externalLinks;function mailTo( e, m, v) {	var d = 'avonautobodies.co.uk';		if( ! v ) var v = e + '@' + d;		return '<a href="mailto:' + e + '@' + d + '?subject=' + m + '" title="' + m + '">' + v + '</a>';}function replaceTag() {	if( document.createElement && document.getElementsByTagName ) {		var target = document.getElementsByTagName( 'h1' );		var replace = document.createElement( 'img' );		for( var i = 0; i < target.length; i ++ ) {			if( target[ i ].id ) {				var y = replace.cloneNode( true );				y.src = '_img/headers/' + target[ i ].id;				y.alt = target[ i ].firstChild.nodeValue;				with ( y.style ) {width = '458px';height = '29px';marginRight = '0';marginBottom = '0';marginLeft = '0';marginTop = '0';paddingRight = '0';paddingBottom = '20px';paddingLeft = '0';paddingTop = '5px';backgrounColour = 'transparent';}				target[ i ].replaceChild( y, target[ i ].firstChild );			}		}	}	return;}function preLoadNav() {var aa= new Array();a[0]=new Image;a[0].src="_img/nav/home_f2.gif";a[1]=new Image;a[1].src="_img/nav/about_f2.gif";a[2]=new Image;a[2].src="_img/nav/whatwedo_f2.gif";a[3]=new Image;a[3].src="_img/nav/carsforsale_f2.gif";a[4]=new Image;a[4].src="_img/nav/contact_f2.gif";}window.onload = function() {	preLoadNav();	externalLinks();	replaceTag();}