rightClickWarning = "Please see the store to purchase downloads."; //Goto Recent Gallery 
 function showRecent(days)
{
   endDate = new Date();
   oneDay = 1000*60*60*24;
   startDate = new Date(endDate.getTime() - (parseInt(days) * oneDay));
   sUrl = "/date/";
   sUrl += startDate.getFullYear() + "-" + padDate(startDate.getMonth() + 1) + "-" + padDate(startDate.getDate());
   sUrl += "/";
   sUrl += endDate.getFullYear() + "-" + padDate(endDate.getMonth() + 1) + "-" + padDate(endDate.getDate());
    window.location = sUrl;
}

function padDate(datePart)
{
   if (datePart.toString().length != 1)
     return datePart
   return "0" + datePart;
}

//Smugmug Link as referral
function AddReferralCode() {
var links = this.getElementsByTagName("A");
if (links && (links.length != 0)) {
var smugLink = links.item(0);
smugLink.href = "http://www.smugmug.com/?referrer=yumG9ZeF17aIo";
}
}
YE.onAvailable('footer', AddReferralCode);

//Change Galley title text
YE.onAvailable('galleryTitle', function() {this.innerHTML = 'galleries'});
YE.onAvailable('recentPhotosBoxTitle', function() {this.innerHTML = 'recent photos'});
YE.onAvailable('keywordsTitle', function() {this.innerHTML = 'keywords'});
YE.onAvailable('datesTitle', function() {this.innerHTML = 'timeline search'});

//Change right click message
rightClickWarning = "All photos are property of Photography by Sherwin James. All rights reserved. Unauthorized use is prohibited.";

//Change gallery comments title for guestbook
function ModifyText ()
{
  if (YD.hasClass(document.body, "gallery_2021542")) 
  {
    var objElement = YD.get("comment")
    if (objElement != null) 
    {
      var str = new String(objElement.innerHTML);
      str = str.replace(/\gallery Comments/gi, 'guestbook comments');
      objElement.innerHTML = str;
    }
  }
}

YE.onAvailable("comment", ModifyText);