<!--Hide script from old browsers

//################################################################
//Function to rotate the image on the index page each time the page loads. Selects an image at random
//################################################################
function mainImage() {
	myImage = new Array("siteImages/main01.jpg", "siteImages/main02.jpg", "siteImages/main03.jpg", "siteImages/main04.jpg", "siteImages/main05.jpg", "siteImages/main06.jpg", "siteImages/main07.jpg");
	count = myImage.length;
	if (document.images) {
		myNumber = Math.floor((Math.random() * count));
		document.mainPic.src = myImage[myNumber];
	}
}

//################################################################
//function to countdown the number of daysuntil the start of the season
//The first part of the code is to overcome a Y2K bug that older versions of javascript have.
//Reference Javascript for the world wide web, Tom Negrino and Dori Smith.
//################################################################
function seasonStart() {
	var now = new Date();
	var thisYr = now.getYear();
	if (thisYr < 1900) {
		thisYr = thisYr + 1900;
	}
	nextYr = thisYr + 1;
	var Season = new Date(thisYr,4,28);
	if (Season.getTime() < now.getTime()) {
		Season.setYear(nextYr);
	}
	return (Math.ceil(Season.getTime() / (1000 * 60 * 60 * 24) - now.getTime() / (1000 * 60 * 60 * 24))); 
}


//################################################################
//Function to detect the browser type to render lists how I want them
//################################################################
function browserDetect() {
	if (navigator.appName != "Microsoft Internet Explorer"){
		document.getElementById("list1").style.textIndent = "-1cm";
		document.getElementById("list2").style.textIndent = "-1cm";
		document.getElementById("list3").style.textIndent = "-1cm";
	}
}


//################################################################
//Next lines write detail to an area of the page without changing the page
//################################################################
function writePage(n){
//	var detail = "<script type='text/javascript' src='fixture_list" + n + ".js'></script>";
	var detail = n;
	var pageObj = document.getElementById("display");
	pageObj.innerHTML = detail;
}


//################################################################
//Creates a popup window
//Parameters:	Passes in the match date
//################################################################
function newWindow(n) {
	var date = match(n);
	var myWindow = window.open("report.htm","Match Report","scrollbars=yes");
	myWindow.document.open;
	myWindow.document.write("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>\n");	
	myWindow.document.write("<html>\n");
	myWindow.document.write("<head>\n");
	myWindow.document.write("<title>Crowhurst Cricket Club Match Report</title>\n");
	myWindow.document.write("<link href='../cssStyles/style1.css' rel='stylesheet' type='text/css' />\n");
	myWindow.document.write("<script type='text/javascript' src='../jsCode/jsCode.js'></script>\n");
	myWindow.document.write("</head>\n");
	myWindow.document.write("<body>\n");
	myWindow.document.write(date);
	myWindow.document.write("<br /><br /><a href='javascript: onClick=window.close();'>Close</a>\n");
	myWindow.document.write("</body>\n");
	myWindow.document.write("</html>\n"); 
	myWindow.focus();
}


//temp function to test a function
function match(n) {
	var text = "Text from the Match Function " + n;
	return text;
}




-->

