You are missing the closing right brace } for the left brace { that follow the
if.
You are also missing the left brace { for beginning the function.
Code:
function loginvalidation()
{
if(document.loginsubmit.usernameform == '' )
{
alert('Please enter your username');
return false;
}
}