// JavaScript Document
function trim(s)
{
  return s.replace(/^\s+|\s+$/, '');
} 
function ChkValid()
{
  if(trim(document.getElementById('txtUsername').value) == "" || trim(document.getElementById('txtUsername').value) == "Username")
  {
	 alert("Please enter your username");
	 document.getElementById('txtUsername').focus();
	 return false;
  }
  if(trim(document.getElementById('txtPassword').value) == "" || trim(document.getElementById('txtPassword').value) == "Password")
  {
	 alert("Please enter your password");
	 document.getElementById('txtPassword').focus();
	 return false;
  }
  document.getElementById('Setmode').value = "Check"
  document.getElementById('Login').submit();
}
