/*
	$Id: csFixDWActiveMenu.js,v 1.0 2005-05-20 16:01:14+02 chriz Exp chriz $
	Code (c) 2004 by ://steinmeier.dk - Chriztian Steinmeier
*/

// Put an ID of "activemenu" on the parentNode of the span with the className "L1_Active"
function csFixDWActiveMenu() {
	var aSPANs, oSPAN, s=0;
	aSPANs = document.getElementsByTagName("span");
	while(oSPAN = aSPANs[s++]) {
		if (oSPAN.className == "L1_Active") {
			oSPAN.parentNode.setAttribute("id", "activemenu", 0);
			break;
		}
	}
}

function checkform(){
	if (document.ExtUserForm.ForgotPassword.checked) {
		if((document.ExtUserForm.ForgotPassword.checked) && (document.ExtUserForm.Username.value.length <= 0)) {
			alert('Type your email to recieve your password.');
			document.ExtUserForm.Username.focus();
			return false;	
		}
	}
	else {
		if(document.ExtUserForm.Username.value.length <= 0){
			alert('Type username');
			document.ExtUserForm.Username.focus();
			return false;
		}

		if(document.ExtUserForm.Password.value.length <= 0){
			alert('Type password');
			document.ExtUserForm.Password.focus();
			return false;
		}
	}
	
	return true;
}

function ToggleForgotPassword() {
		document.all("ShowPasswordText").disabled = document.ExtUserForm.ForgotPassword.checked;
		document.ExtUserForm.Password.disabled = document.ExtUserForm.ForgotPassword.checked;

		if (document.ExtUserForm.ForgotPassword.checked) {
			document.all("UsernameText").innerText = "Type e-mail";
		}
		else {
			document.all("UsernameText").innerText = "Username";
		}

}