function trimString(str) 
{
		while (str.charAt(0) == ' ')
		str = str.substring(1);
			while (str.charAt(str.length - 1) == ' ')
			str = str.substring(0, str.length - 1);
			return str;
}//
function CheckEmptyText()
{
			var str=trimString(document.getElementById("txtLoginId").value);
			var str1=trimString(document.getElementById("txtPassword").value);
			if(str.length==0)
			{
				alert("Login Id required");
				return false;
			}
			else if(str1.length==0)
			{
				alert("Password required");
				return false;
			}
			else
			{
				return true;
			}
}//
