function mouseOver(id) {
  	$(id).removeClassName('mouse-off');
  	$(id).addClassName('mouse-on');
}

function mouseOut(id) {
  	$(id).removeClassName('mouse-on');
  	$(id).addClassName('mouse-off');
}

function goto(id) {
  	var selected = id.replace("menu-", "") + ".html";
  	location.href="./" + selected;
}

function enterPressed() {
	$('userName').focus();
	Event.observe('loginPage', 'keydown', function(event) {
		if(event.keyCode == 13) {
			login();
		}
	});
}

function login() {
	if($('userName').value != "" || $('userPassword').value != "") {
		document.loginPage.action = "https://" + location.hostname + "/servlet/net.icsglobal.thelma.comm.SECServlet";
		document.loginPage.submit();
	}
}

function forgottenPassword() {
        location.href="https://" + location.hostname + "/app/resetPassword";
}


function newWindow() {
	var width = 640,height = 480;
 	if (window.screen) {
  		width = 650;
 		height = 560;
 	}    
 	window.open('https://www.thelma.com.au/usercommunity/ProviderApp.jsp','POPUP_WINDOW','width=' + width + ',height=' + height + ',screenX=0,screenY=0,top=0,left=0,resizable=yes,toolbar=no,scrollbars=yes');
}

