// Change Home Link (from Devbobo)
YE.onContentReady('toolbar', function () { this.innerHTML = this.innerHTML.replace(/href="http:\/\/www.smugmug.com\/([?\w&;=]+)?"/, 'href="' + webServer + '"')});

// Vanity URL's
var vanityTable = 
 {
     restrictedaccess : "http://southernmainedigital.smugmug.com/Restricted%20Access",
     portlandpirates : "http://southernmainedigital.smugmug.com/Portland%20Pirates%202008-2009",
     teamroster : "http://southernmainedigital.smugmug.com/Portland%20Pirates%202008-2009/627860",
     chrisroy : "http://southernmainedigital.smugmug.com/gallery/6747124_EgEmt",
     mhshi : "http://southernmainedigital.smugmug.com/Sports/678419",
     allstars : "http://southernmainedigital.smugmug.com/gallery/7053309_SRXfg"
      }

function CheckRedirects()
 {
     if (YD.hasClass(document.body, 'homepage'))    // only run this code on the home page
     {
         // get the path from the current URL, 
         // convert it to lowercase and remove the leading slash
         var path = window.location.pathname.toLowerCase().substr(1);
         
         var newURL = vanityTable[path];        // look it up in our table
         
         // if we found it in the table && newURL is different than where we are
         if (newURL && (newURL != window.location))
         {
             window.location.replace(newURL);        // go to the new URL
         }
     }
 }

// custom search page
function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

function doOnLoad() {
  if (window.AlbumID && (window.AlbumID == "XXXXXX")) //
  removeLinkFromImg();
}

function removeLinkFromImg()