
function NavMover(img_id) {
	var imgobj = document.getElementById(img_id);
	imgobj.style.visibility = "visible";
}

function NavMOut(img_id) {
	var imgobj = document.getElementById(img_id);
	imgobj.style.visibility = "hidden";
}
	
function EqualiseMainColumns() {
	// Equalisese the columns on the home page
	var columns = new Array(2);
	var newHeight,i;
	newHeight = 0;
	for(i=0; i<2; i++) {
		if(columns[i] = document.getElementById('column'+(i+1))) {
			if(columns[i].offsetHeight > newHeight) newHeight = columns[i].offsetHeight;
		}
	}
	for(i=0; i<2; i++)
		if(columns[i]) columns[i].style.height = newHeight + "px";
}

function GetDirections(to) {
	
		var from = document.getElementById('postcode').value;
			
		window.open('http://maps.google.com/maps?saddr=' + from + '&daddr=' + to,'harrisDirections','width=800,height=600');
		
	}



function PlayTour()
{
	var filename = "/downloads/tour_low.mp4";
	OpenWindow=window.open("", "newwin", "height=244,width=360,toolbar=no,scrollbars="+scroll+",menubar=no");
	OpenWindow.document.write('<html>');
	OpenWindow.document.write('<title>Virtual Tour</title>');
	OpenWindow.document.write('<body style="margin:0px;" bgcolor="000000">')
	if(isBrowser("Microsoft", 3))
		OpenWindow.document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="360" height="244">');
	else
		OpenWindow.document.write('<object type="video/quicktime" data="' + filename + '" width="360" height="244">');
	OpenWindow.document.write('<param name="src" value="' + filename + '" />');
	OpenWindow.document.write('<param name="autoplay" value="true" />');
	OpenWindow.document.write('<param name="controller" value="true" />');
	OpenWindow.document.write('</object>');
	OpenWindow.document.write("</body></html>")
	OpenWindow.document.close()
	self.name="main"
}



function isBrowser(b,v) {
  /*
  ** Check if the current browser is compatible
  **  b  browser name
  **  v  version number (if 0 don't check version)
  ** returns true if browser equals and version equals or greater
  */
  browserOk = false;
  versionOk = false;

  browserOk = (navigator.appName.indexOf(b) != -1);
  if (v == 0) versionOk = true;
  else  versionOk = (v <= parseInt(navigator.appVersion));
  return browserOk && versionOk;
  }


