function regError(msg)
{
  alert(msg);
}

function loadPage(page) {
  var oRPC = new jsRPC();
  oRPC.href = page + ((page.indexOf('?') != -1)?'&':'?') + 'html_load=1';
  oRPC.execute();
}

$.fn.pause = function(duration) {
  $(this).animate({ dummy: 1 }, duration);
  return this;
};
     
$(window).load(function () {
});
      
$(document).ready(function() {

});

function rotateImages()
{
  var anchor = $('#hp-slider a:first');
  if (anchor.is(':visible'))
  {
    anchor.next().fadeIn(500);
    anchor.fadeOut(500, function() { 
      this.parentNode.appendChild(this);
    });
  }
  else
    anchor.fadeIn(500);
    
  if (anchor.size() != 0)
    setTimeout('rotateImages()', 7000);
}  


    function showAlbum(id)
    {
      $('#fb-album-name').html('&nbsp;');
      $('#fb-album-caption').html('&nbsp;').slideUp(500);
      showModal($('#gallery')[0]);
      $('#fb-album').fbGallery({ 
          albumID: id
        , onNameLoad: function(name) {
                        $('#fb-album-name').hide().html(name).fadeIn(500);
                      } 
        , onCaptionLoad: function(caption) {
                        $('#fb-album-caption').slideUp(300, function () { 
                          $(this).html(caption);
                          if (caption && (caption != ''))
                            $('#fb-album-caption').slideDown(500);
                        })
                      } 
      });
    }
