  function frmlogin_validate()
  {
    var txtuname = document.getElementById("txtuname").value;
    var txtupass = document.getElementById("txtpassword").value;
    
    if(isEmpty(txtuname))
    {
        alert("Please enter username.");
        return false;
    }
    if(isEmpty(txtupass))
    {
        alert("Please enter password.");
        return false;
    }
	if(txtuname=="E-mail"||txtupass=="Password"){ // Make sure that user has not left the default values in the password field
		alert("Please enter a valid username and password.");
		return false;
	}
  }
  function isEmpty( str){
    strRE = new RegExp( );
    strRE.compile( '^[\s ]*$', 'gi' );
    return strRE.test(str);
  }
