// JavaScript Document
function validateLogin()
{									
	var myFormOne = document.LoginForm;
	var lg = myFormOne.Login.value;
	var password = myFormOne.Password.value;
	
	 if(lg.length == 0)
	{ 
	alert("Please Enter Your username");
	myFormOne.Login.focus();
	return false;
	}
	if(password.length == 0)
	{ 
	alert("Please Enter Password");
	myFormOne.Password.focus();
	return false;
	}
	return true;
}
function submitOnClickingSubmit()
{   
   
	if(validateLogin())
	{
		document.LoginForm.submit();
	}
	
}
document.onkeypress = processKey;
function processKey(e)
{
 if (null == e)
   e = window.event;
 if (e.keyCode == 13)  {
   submitOnClickingSubmit();
 }
}