function AddReferralCode() {
var links = this.getElementsByTagName("A");
if (links && (links.length != 0)) {
var smugLink = links.item(0);
smugLink.href = "http://www.smugmug.com/?referrer=gIgdk8ERMGpjU";
}
}
YE.onAvailable('footer', AddReferralCode);
rightClickWarning = "All photos are property of Pro Perspective - David Pollitt. All rights reserved. Unauthorized use is prohibited."; 
function ModifyText () 
{
  if (YD.hasClass(document.body, "gallery_5630975")) 
  {
    var objElement = YD.get("comment")
    if (objElement != null) 
    {
      var str = new String(objElement.innerHTML);
      str = str.replace(/\gallery/gi, 'Guestbook');
      objElement.innerHTML = str;
    }
  }
}

YE.onAvailable("comment", ModifyText);




// change the link on the SmugMug Logo

YE.onAvailable('homelink', function(e) {

this.href = "http://www.properspective.com/";

this.firstChild.alt = "Pro Perspective";

this.firstChild.title = "Pro Perspective";

});

// removes the pipes characters in the toolbar header

YE.onAvailable('toolbar', function(e) {

this.innerHTML = this.innerHTML.replace(new RegExp(/\|/g),"");

});

function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

if (hasPath("galleries"))
YD.addClass(document.body, "galleries");


      <!-- Hide Categories -->
function delCategory() {
  re = /\/(Client%20Login|Guestbook)$/;

  var oList = YD.getElementsByClassName('miniBox', 'div', this);

  for (i = 0; i < oList.length; i++) {
    if (re.test(oList[i].getElementsByTagName('a')[0].href))
      oList[i].parentNode.removeChild(oList[i]);
  }
}
YE.onContentReady('categoriesBox', delCategory);
     <!-- End Hide Categories -->