<!--
// Browser detect (v2.1) - T. Nelson '06
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

// AJAX call for server-side session variables (v1.0) - T. Nelson '06
var req;
function callAjax(url, params)
{
  //alert(params);
  if(window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch(e) {
      req = false;
    }
  } else if(window.ActiveXObject) {
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch(e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch(e) {
        req = false;
      }
    }
  }
  if(req) {
    req.open("GET", url + '?' + params, true);
    req.send(null);
    return true;
  }
  return false;
}

// Determine window width and set column sizes with DOM (v1.5) - T. Nelson '06
function resizeColumns() {
var leftColumn = 9
var rightColumn = 9
if ((OS == "Windows") & (browser == "Internet Explorer")) { // Win IE
	var windowWidth = parseInt(document.body.clientWidth,10);
	if (version == "6") {
		var windowHeight = parseInt(document.documentElement.clientHeight,10); // IE 6
	}
	else {
		var windowHeight = parseInt(document.body.clientHeight,10); // IE 5 or earlier
	}		
		if (windowWidth > 778) {
			document.getElementById('content').style.width = 'auto';
			leftColumn = Math.round((windowWidth-760)/2);	
			rightColumn = Math.round((windowWidth-760)/2);  
				if ((leftColumn + rightColumn + 760) != (windowWidth)) { // Factor in rounding of odd numbers
					rightColumn = (rightColumn - 1);
				}
			document.getElementById('leftColumn').style.width = leftColumn;
			document.getElementById('rightColumn').style.width = rightColumn;
		}
		else if (windowWidth <= 778) {
			document.getElementById('leftColumn').style.width = 9;
			document.getElementById('rightColumn').style.width = 9;
			document.getElementById('content').style.width = 778;
		}			
		document.getElementById('centreColumn').style.height = windowHeight;
		var rightColumnHeight = document.getElementById('centreColumn').offsetHeight
		document.getElementById('rightColumn').style.height = rightColumnHeight;
	}
else if ((OS == "Mac") & (browser == "Internet Explorer")) { // Mac IE
	var windowWidth = parseInt(document.body.offsetWidth,10);
	var windowHeight = parseInt(document.body.offsetHeight,10);
	var bodyHeight  = parseInt(document.getElementById('centreColumn').offsetHeight,10);
	if (bodyHeight > windowHeight) { // Check content height vs. screen height and choose greater
		windowHeight = (bodyHeight);
	}	
		if (windowWidth > 778) {
			var content = document.getElementById('content');
			content.style.width = "100%";
			leftColumn = Math.round((windowWidth-760)/2);	
			rightColumn = Math.round((windowWidth-760)/2);  
				if ((leftColumn + rightColumn + 760) != (windowWidth)) { // Factor in rounding of odd numbers
					rightColumn = (rightColumn - 1);
				}
			var leftColumnDIV = document.getElementById('leftColumn')
			leftColumnDIV.style.width = leftColumn + "px";
			var rightColumnDIV = document.getElementById('rightColumn')
			rightColumnDIV.style.width = rightColumn + "px";			
		}
		else if (windowWidth <= 778) {
			var leftColumnDIV = document.getElementById('leftColumn')
			leftColumnDIV.style.width = "9px";
			var rightColumnDIV = document.getElementById('rightColumn')
			rightColumnDIV.style.width = "9px";
			var content = document.getElementById('content');
			content.style.width = "778px";
		}
		var centreColumn = document.getElementById('centreColumn')
		centreColumn.style.height = windowHeight + "px";			
		var rightColumnHeight = document.getElementById('centreColumn').offsetHeight
		rightColumnDIV.style.height = rightColumnHeight + "px";	
	}
else { // Mozilla, Firefox, Safari, Netscape - Both platforms 
	var windowWidth = parseInt(document.body.clientWidth ,10);
	var windowHeight = parseInt(self.innerHeight,10);
	var bodyHeight  = parseInt(document.getElementById('centreColumn').offsetHeight,10);
	if (bodyHeight > windowHeight) { // Check content height vs. screen height and choose greater
		windowHeight = (bodyHeight);
	}
			if (windowWidth > 778) {
			document.getElementById('content').style.width = windowWidth + "px";
			leftColumn = Math.round((windowWidth-760)/2);
			rightColumn = Math.round((windowWidth-760)/2);  
				if ((leftColumn + rightColumn + 760) != (windowWidth)) { // Factor in rounding of odd numbers
					rightColumn = (rightColumn - 1);
				}
			document.getElementById('leftColumn').style.width = leftColumn + "px";
			document.getElementById('rightColumn').style.width = rightColumn + "px";
		}
		else if (windowWidth <= 778) {
			document.getElementById('leftColumn').style.width = "9px";
			document.getElementById('rightColumn').style.width = "9px";
			document.getElementById('content').style.width = "778px";
		}
		document.getElementById('centreColumn').style.height = windowHeight + "px";
		var rightColumnHeight = document.getElementById('centreColumn').offsetHeight
		document.getElementById('rightColumn').style.height = rightColumnHeight + "px";	
	}
ajaxParams = ('l=' + leftColumn + '&r=' + rightColumn)
window.setTimeout('callAjax(\'/NoIndex/AJAX/resizeColumns.asp\',ajaxParams)', 100);
}

// Fire layout function on page load
function init() {
resizeColumns();
window.onresize = function onresize() {
	if ((OS == "Mac") & (browser == "Internet Explorer")) {
		window.setTimeout("resizeColumns()",100);
	}
	else {
		resizeColumns();
	}
  }
validDate(); // Set date 'Day' menu length based on month
analyseSeason(); // Work out which season we're in
setMenu(); // Set drop menus if form submitted
}
// -->