function left_before_destinationCheck(DnEvents)
{
	K = navigator.appName=="Netscape" ? DnEvents.which : DnEvents.keyCode
	if (K==13) left_destinationCheck(); 
}

function left_destinationCheck()
{
	var strUserName = "Please enter your Username"
	var strPassword = "Please enter your Password"
	
	var check_flag = true;

 	if ( document.loginForm.username.value == "" && check_flag )	{
 		alert(strUserName)
 		document.loginForm.username.focus();
 		check_flag = false;
 	}
 	if ( document.loginForm.password.value == "" && check_flag )	{
 		alert(strPassword)
 		document.loginForm.password.focus();
 		check_flag = false;
 	}
	if (check_flag)
	{
		document.loginForm.action = "https://"+location.hostname+"/mypetersons/code/login.asp";		
		document.loginForm.submit();				
	}	
}