Removed /usr/local from CDPATH
[clearscm.git] / maps / JavaScript / CheckLogin.js
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File:        $RCSFile$
4 // Revision:    $Revision: 1.1 $
5 // Description: This JavaScript is included in the MAPS login form to check
6 //              the fields of the form.
7 // Author:      Andrew@DeFaria.com
8 // Created:     Fri Nov 29 14:17:21  2002
9 // Modified:    $Date: 2013/06/12 14:05:47 $
10 // Language:    JavaScript
11 //
12 // (c) Copyright 2000-2006, Andrew@DeFaria.com, all rights reserved.
13 //
14 ////////////////////////////////////////////////////////////////////////////////
15 function validate (login) {
16   with (login) {
17     username = trim_trailing_spaces (username);
18
19     if (username.value == "") {
20       alert ("You must specify your Username!");
21       username.focus ();
22       return false;
23     } // if
24
25     if (password.value == "") {
26       alert ("You need to specify a password!");
27       password.focus ();
28       return false;
29     } // if
30
31     if (password.value.length < 6) {
32       alert ("Passwords must be greater than 6 characters.");
33       password.focus ();
34       return false;
35     } // if
36   } // with
37
38   return true;
39 } // validate