// JavaScript Document
String.prototype.trim = function()
{
	return this.replace(/(^\s*)|(\s*$)/g, "");
} 
function check()
{
	var text1 = document.getElementById("username");
	var text2 = document.getElementById("password");	
	var t1 = text1.value.trim();
	if (t1 == "")
	{
	  alert("UserName Can't Be Empty.");
	  text1.focus();
	  return false;
	}
	if (text2.value=="")
	{
		alert("PassWord Can't Be Empty.");
		text2.focus();
		return false;
	}
	document.getElementById("submitbtn").click();
}