winsiz = "height=100,width=300,scrollbars=no,toolbar=no"

function balthor(winsrc) {
	foo = window.open(winsrc,'key',winsiz);
	//give the new window the focus
	foo.focus();
}

function validate_the_form()
{
	if (document.admin.login.value == "")
	{
		alert('User ID is required.');
		document.admin.login.focus();
		return false;
	}
	
	if (document.admin.password.value == "")
	{
		alert('Password is required.');
		document.admin.password.focus();
		return false;
	}
	
	if (document.admin.newpassword.value != "" & document.admin.newpassword2.value == "")
	{
		alert('You must enter a new password and verify it.');
		document.admin.newpassword.value="";
		document.admin.newpassword2.value="";
		document.admin.newpassword.focus();
		return false;
	}
	
	if (document.admin.newpassword.value == "" & document.admin.newpassword2.value != "")
	{
		alert('You must enter a new password and verify it.');
		return false;
	}
	
	if (document.admin.newpassword.value != "" & document.admin.newpassword2.value != "" & document.admin.newpassword.value != document.admin.newpassword2.value)
	{
		alert('The new and verified passwords do not match - Please re-enter.');
		document.admin.newpassword.value="";
		document.admin.newpassword2.value="";
		document.admin.newpassword.focus();
		return false;
	}
	return true;
}

function changePW()
{
	getObj("oPW1").style.display = "";
	getObj("oPW2").style.display = "";
	getObj("oPW3").style.display = "";
	getObj("oPWBtn").style.display = "none";
	document.admin.login.focus();
}

function getObj(sObj)
{
	if (document.all)
		var oObj = eval("document.all['" + sObj + "']");
	else if (document.getElementById)
		var oObj = eval("document.getElementById('" + sObj + "')");
	else
		var oObj = null;

	return oObj;
}

