

		function ExplorerFix() {
			for (a in document.links) document.links[a].onfocus = document.links[a].blur;
		}

		if (document.all) {
			document.onmousedown = ExplorerFix;
		}

		if (document.images) {

			pic0_on = new Image();
			pic0_on.src = "/images/nav0.gif";

			pic1_on = new Image();
			pic1_on.src = "/images/nav1.gif";

			pic2_on = new Image();
			pic2_on.src = "/images/nav2.gif";

			pic3_on = new Image();
			pic3_on.src = "/images/nav3.gif";

			pic4_on = new Image();
			pic4_on.src = "/images/nav4.gif";

		}

		function imgOn(imgName) {
			if (document.images) {
				document.change.src = eval(imgName + "_on.src");
			}
		}

		function imgOff(imgName) {
			if (document.images) {
				document.change.src = pic4_on.src;
			}
		}

		function showVehicles() {

			if (document.all) {
				var xMax = screen.width;
				var yMax = screen.height;
			}
			else if (document.layers) {
				var xMax = window.outerWidth; 
		    		var yMax = window.outerHeight;
			}
			else {
				var xMax = 800;
				var yMax=600;
			}

			var xOffset = (xMax - 600)/2, yOffset = (yMax - 500)/2;
			window.open('http://www.hirelimos-berkshire.co.uk/cm/interiors/index.html','newWin',config='width=600,height=500,resizable=yes,scrollbars=yes,toolbar=no,status=no,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
		}

		function showCustomers() {

			if (document.all) {
				var xMax = screen.width;
				var yMax = screen.height;
			}
			else if (document.layers) {
				var xMax = window.outerWidth; 
		    		var yMax = window.outerHeight;
			}
			else {
				var xMax = 800;
				var yMax=600;
			}

			var xOffset = (xMax - 600)/2, yOffset = (yMax - 500)/2;
			window.open('http://www.hirelimos-berkshire.co.uk/cm/customers/index.html','newWin',config='width=600,height=500,resizable=no,scrollbars=yes,toolbar=no,status=no,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
		}

		function copyAddress(whichelements) {

			if (whichelements == 1) {

				if (document.forms[0].elements.copycheckbox1.checked == false) {

					return;

				}

				var addr = '';
				var postcode = '';

				var addr1 = document.forms[0].elements.Addr1.value;
				var addr2 = document.forms[0].elements.Addr2.value;
				var addr3 = document.forms[0].elements.Addr3.value;
				var addr4 = document.forms[0].elements.Addr4.value;
				var postcode = document.forms[0].elements.Postcode.value;

				if (addr1) {
					document.forms[0].elements.Pickup_Addr1.value = addr1;
				}

				if (addr2) {
					document.forms[0].elements.Pickup_Addr2.value = addr2;
				}

				if (addr3) {
					document.forms[0].elements.Pickup_Addr3.value = addr3;
				}

				if (addr4) {
					document.forms[0].elements.Pickup_Addr4.value = addr4;
				}

				if (postcode) {
					document.forms[0].elements.Pickup_Postcode.value = postcode;
				}

				return;
			}
			else {

				if (document.forms[0].elements.copycheckbox2.checked == false) {

					return;

				}

				var addr = '';
				var postcode = '';

				var addr1 = document.forms[0].elements.Pickup_Addr1.value;
				var addr2 = document.forms[0].elements.Pickup_Addr2.value;
				var addr3 = document.forms[0].elements.Pickup_Addr3.value;
				var addr4 = document.forms[0].elements.Pickup_Addr4.value;
				var postcode = document.forms[0].elements.Pickup_Postcode.value;

				if (addr1) {
					document.forms[0].elements.Return_Addr1.value = addr1;
				}

				if (addr2) {
					document.forms[0].elements.Return_Addr2.value = addr2;
				}

				if (addr3) {
					document.forms[0].elements.Return_Addr3.value = addr3;
				}

				if (addr4) {
					document.forms[0].elements.Return_Addr4.value = addr4;
				}

				if (postcode) {
					document.forms[0].elements.Return_Postcode.value = postcode;
				}

				return;


			}
		}

		function untick(whichtickbox) {

			if (whichtickbox == 1) {
				document.forms[0].elements.copycheckbox1.checked = false;
			}
			else {
				document.forms[0].elements.copycheckbox2.checked = false;
			}

		}

		function enableSearchBox(box,obj1) {

			if (document.layers) { //Netscape 4

				postcodeBox = document.postcodearea;
				countyBox = document.countyarea;

				if (box == 'county') {
					countyBox.display = 'none'; // Disable first, firefox fix
					countyBox.display = 'inline';
					postcodeBox.display = 'none';
					obj1.county.disabled = false;
					obj1.postcode.value = '';
				}
				else if (box == 'postcode') {
					countyBox.display = 'none';
					postcodeBox.display = 'inline';
					obj1.county.disabled = true;
				}
			}

			else if (document.all) { //IE 4 & Opera

				postcodeBox = document.all.postcodearea;
				countyBox = document.all.countyarea;

				if (box == 'county') {
					countyBox.style.display = 'none'; // Disable first, firefox fix
					countyBox.style.display = 'inline';
					postcodeBox.style.display = 'none';
					obj1.county.disabled = false;
					obj1.postcode.value = '';
				}
				else if (box == 'postcode') {
					countyBox.style.display = 'none';
					postcodeBox.style.display = 'inline';
					obj1.county.disabled = true;
				}
			}

			else if (document.getElementById) { //Netscape 6 & IE 5

				postcodeBox = document.getElementById('postcodearea');
				countyBox = document.getElementById('countyarea');

				if (box == 'county') {
					countyBox.style.display = 'none'; // Disable first, firefox fix
					countyBox.style.display = 'inline';
					postcodeBox.style.display = 'none';
					obj1.county.disabled = false;
					obj1.postcode.value = '';
				}
				else if (box == 'postcode') {
					countyBox.style.display = 'none';
					postcodeBox.style.display = 'inline';
					obj1.county.disabled = true;
				}
			}
		}

		var counter = 0;

		function onceOnly() {

			counter++;

			if (counter > 1) {
				alert('Your enquiry is being sent. Please click \'OK\' and wait a moment...');
				return false;
			}
			else {
				return true;
			}

		}

