<!--

function ChangeClass(obj, TheClass) {
	obj.className=TheClass;
}


function toggle(e) {
	if (e.style.display == "none") {
		e.style.display = "";
	} else {
		e.style.display = "none";
	}
}


function toggle() {
 var toggler;
 if (document.layers) {

  toggler = document.layers.tglonoff
  if (toggler.visibility == "hide") {
   toggler.visibility = "show";
  }
  else {
   toggler.visibility = "hide";
  } 
 }
 else if (document.all) {
  toggler = document.all.tglonoff;
  if (toggler.style.visibility.toLowerCase() == "visible") {
   toggler.style.visibility = "hidden";
  }
  else {
   toggler.style.visibility = "visible";
  }
 }
 else if (document.getElementById) {
  toggler = document.getElementById('tglonoff');
  if (toggler.style.visibility.toLowerCase() == 'visible')
    toggler.style.visibility = 'hidden';
  else
    toggler.style.visibility = 'visible';
 }
}


function hideIt() {
		document.divLoadCont.visibility="hidden"
		divLoadCont.style.visibility="hidden"
}


function ShowMap(strPostCode) {
	if (strPostCode == '') {
			alert('No post code provided');
		} else {
			window.open('http://www.google.co.uk/maps?f=q&hl=en&q=' + strPostCode);
	}
}

function resetDrivingDirections() {
	saddr = document.getElementById('startPostCode');
	if (saddr.value == '') {
		saddr.value = 'Enter your postcode';
	}
}

function winClose() {
	alert('called');
	if (confirm("Are you sure you want to navigate away from this page?")) {
//		window.close();
	}
		return false;
}


// Driving Directions (Note that we chop postcodes to first 4 chars, stripping spaces as Google don't allow full postcode searching)
function drivingDirections(start, finish,mapCentreLatitude,mapCentreLongitude) {
	if (start == 'Enter your postcode') {
		alert('Please enter your postcode first');
	} else if (start.indexOf(" ") == -1) {
		alert('Please include the space in your postcode - e.g: ST10 4DB not ST104DB - Thank you!');
	} else {
		var directionsPanel;
		var directions;
		directionsPanel = document.getElementById('divDirections');
		directionsPanel.innerHTML = '';
		var map = new GMap2(document.getElementById('map'));
		map.addControl(new GLargeMapControl());
		map.setCenter(new GLatLng(mapCentreLatitude,mapCentreLongitude), 9);
		directions = new GDirections(map, directionsPanel);
		directions.load(start + ' to ' + finish);
	}
}

//-->
