function login(form)
{
     if (form.user_name.value=='' || form.user_pass.value=='')
          {
          alert('You must supply both user name and password to log in.');
          return false;
          }
     var url='modules.php?mod=user&req=login'+
               '&user_name='+form.user_name.value+
               '&user_pass='+form.user_pass.value;
     ret=serverFunction(url);
     if (ret=='false')
          {
          alert('Invalid login');
          return false;
          }
     // the login function will return the proper home page to load.
     // display the home page for the user that logged in and put the right links in the header.
     // load the menu into the menu span area in the theme.
     displaypage(ret);
     displaydiv('headerlinks','theme/logged_in_links.html');
     displayText('leftheaderlinks','modules.php?mod=user&req=welcome');
     mainmenu();
}


