rightClickWarning = "Right click is disabled on this gallery. If you are interested in purchasing images, please lets us know via the Contact Form."; showPhotoBar = false;

function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
} 

if (hasPath("galleries"))
YD.addClass(document.body, "galleries");

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;
}