// Check user exists
function checkUserNameExists(usernameParam) {
   new Ajax.Updater('usernameError', '/checkUserNameExists.jsp', 
   {
      method: 'get',
      parameters: 
      {
         username: usernameParam
      }
   });
}

// Check email exists
function checkEmailExists(emailParam) {
   new Ajax.Updater('emailError', '/checkEmailExists.jsp', 
   {
      method: 'get',
      parameters: 
      {
         email: emailParam
      }
   });
}

function changePage(a_listId, a_module, a_moduleAction, a_forumId, a_pageNum)
{   
   $('forumContent').startWaiting('bigBlackWaiting');

   new Ajax.Updater('forumContent', '/modules/forum/ajax_changePage.jsp', 
      {
         method: 'get',
         parameters: 
         {
            listId: a_listId,
            module: a_module,
            moduleAction: a_moduleAction,
            forumId: a_forumId,
            page: a_pageNum
         },
         onComplete: function() { $('forumContent').stopWaiting(); }         
      }
   );
}

function getPhotos(flickrName)
{
//   $('thumbsContainer').startWaiting('bigBlackWaiting');

   new Ajax.Updater('photos', '/modules/photographer/getImages.jsp', 
      {
         method: 'get',
         parameters: {photogName: flickrName},
         onComplete: function() 
            { 
               updateImages();
            }
      }
   );
}


