function init() {
	getFiles("news", "main/", "mainContent", "");
	setSectionTitle("Recent News", "mainTitle");
	setTimeout("startList();", 1000);
}

function loginStatus(inStatus) {
	if (inStatus) {
		document.getElementById('mainloginButton').innerHTML = 'Logout';
	} else {
		document.getElementById('mainloginButton').innerHTML = 'Login';
	}
}

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("galleryMenuLevel_0");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
		navRoot_ = document.getElementById("galleryMenuLevel_1");
		for (j=0; j<navRoot_.childNodes.length; j++) {
			node = navRoot_.childNodes[j];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
		navRoot_ = document.getElementById("navLevel0");
		for (j=0; j<navRoot_.childNodes.length; j++) {
			node = navRoot_.childNodes[j];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
		navULs = document.getElementsByTagName('UL');
		temp = navULs.length;
		for (i = 0; i < navULs.length; i++) {
			navRoot_ = navULs[i];
			if (navRoot_.id == 'navLevel1') {
				for (j=0; j<navRoot_.childNodes.length; j++) {
					node = navRoot_.childNodes[j];
					if (node.nodeName=="LI") {
						node.onmouseover=function() {
							this.className+=" over";
						}
						node.onmouseout=function() {
							this.className=this.className.replace(" over", "");
						}
					}
				}
			}
		}
/*
		navRoot_ = document.getElementById("navLevel1");
		for (j=0; j<navRoot_.childNodes.length; j++) {
			node = navRoot_.childNodes[j];
			if (node.nodeName=="LI") {
				alert(node.innerHTML);
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
*/
	}
}

lastGame = function () {
	document.getElementById('nextGame_btn').className = 'notSelected';
	document.getElementById('lastGame_btn').className = 'selected';
	getFile('nextRound_include.php', 'nextRound/', 'gameContent', '?last=1');
//	document.getElementById('gameContent').innerHTML = '';
//	nextRound/nextRound_include.php
};

nextGame = function () {
	document.getElementById('nextGame_btn').className = 'selected';
	document.getElementById('lastGame_btn').className = 'notSelected';
	getFile('nextRound_include.php', 'nextRound/', 'gameContent', '');
};