function checkUsername() {
	if (document.getElementById("username").value == '') {
		document.getElementById("username").style.backgroundImage = 'url(images/layout/login-username.gif)';
	} 
}
function checkPassword() {
	if (document.getElementById("password").value == '') {
		document.getElementById("password").style.backgroundImage = 'url(images/layout/login-password.gif)';
	} 
}
	
function submitLogin() {
	
	var username = '';
	var password = '';
	
	//if (isFlashEnabled()) {	
			if (document.getElementById) { // DOM3 = IE5, NS6
					document.getElementById('topLogin').style.visibility = 'visible';
					document.getElementById('topLogin').style.display = 'block';
					username = document.getElementById('username').value;
					password = document.getElementById('password').value;
				}
				else {
					if (document.layers) { // Netscape 4
					document.topLogin.visibility = 'visible';
					document.topLogin.display = 'block';
					username = document.loginfrm.username.value;
					password = document.loginfrm.password.value;
				}
					else { // IE 4
					document.all.topLogin.style.visibility = 'visible';
					document.all.topLogin.style.display = 'block';
					username = document.all.loginfrm.username.value;
					password = document.all.loginfrm.password.value;
				}
			}
		// Submit form if both fields are filled in
		if ((username != '') && (password != '')) {
			document.loginfrm.action = "/account/default.asp";
			document.loginfrm.submit(); 
			}
	//} else {
			//alert('Please enable Flash to login to the website');
			//closeLogin();
		//}
	}
	
	function closeLogin() {
	if (document.getElementById) { // DOM3 = IE5, NS6
			document.getElementById('topLogin').style.visibility = 'hidden';
			document.getElementById('topLogin').style.display = 'none';
		}
		else {
		if (document.layers) { // Netscape 4
			document.topLogin.visibility = 'hidden';
			document.topLogin.display = 'none';
		}
			else { // IE 4
				document.all.topLogin.style.visibility = 'hidden';
				document.all.topLogin.style.display = 'none';
			}
		}
	} 
	
	// Cabal time script
	var serverdate=new Date(currenttime)
	function padlength(what){
		var output=(what.toString().length==1)? "0"+what : what
		return output
	}
	function displaytime(){
		serverdate.setSeconds(serverdate.getSeconds()+1)
		var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())
		document.getElementById("servertime").innerHTML='Cabal ' + trTime + ': '+ timestring + '&nbsp;'
	}
	window.onload=function(){
		setInterval("displaytime()", 1000)
	}