function loginValidation(thisform)
{ 
	with (thisform)
	{
		
		if (emptyvalidation(login_uname,"You forgot to Enter your Username")==false) 
		{				
		login_uname.focus();
		return false;
		}
if (emptyvalidation(login_password,"You forgot to Enter your Password")==false) 
		{				
		login_password.focus();
		return false;
		}
	}

 thisform.submit();
} 

function emptyvalidation(entered, alertbox)
{
	with (entered)
	{
		while (value.charAt(0) == ' ')
			value = value.substring(1);
		while (value.charAt(value.length - 1) == ' ')
			value = value.substring(0, value.length - 1);
		if (value==null || value=="")
		{
			if (alertbox!="") alert(alertbox);
			return false;
		}
		else return true;
	}
}

