// JScript source code
	function SubmitLogin()
	{
		if(document.LOGIN.PASSWORD.value.length > 4 && document.LOGIN.USERID.value.length > 4)
		{
			document.LOGIN.submit();
		}
		else
		{
			document.getElementById("error").innerHTML = "Invalid User Name / Password<br/><br/>"
		}
		return false;
	}
	function FocusName()
	{
		document.LOGIN.USERID.focus();
	}
	function FocusPassword()
	{
		document.LOGIN.PASSWORD.focus();
	}
	function CheckReturn()
	{
		if(window.event.keyCode == 13)
		{
			if(document.LOGIN.USERID)
			{
				if(document.LOGIN.USERID.value.length > 0 && document.LOGIN.PASSWORD.value.length > 0)
					SubmitLogin();
			}
			else
			{
				document.LOGIN.action = "../you/you.asp";
				document.LOGIN.submit();
			}	
		}
	}
	function CheckReturnLogout()
	{
		document.Logout.submit();
	}


	function SubmitSend()
	{		
		if(document.SEND.FILENAME.value == "")
		{
			alert("Please enter a file name for the document you are sending.");
			return false;
		}
		else
		{
			var selectemail = document.getElementById("SelectEmail");
			var szEmail = selectemail.options[selectemail.selectedIndex].text;
			if (szEmail=="") {
			    alert("Please select a destination email address for the document you are sending.");
			    return false;
		    	}

			document.SEND.EMAILADDRESS.value = selectemail.options[selectemail.selectedIndex].text;	
			
			var select = document.getElementById("SelectType");
			document.SEND.DOCTYPE.value = parseInt(select.options[select.selectedIndex].id);

			document.SEND.submit();
			return false;
			
		}
	}
	
function SubmitDocuments()
	{
		document.documents.submit();
		return false;
	}
