function writeEMail(pLinkText, pSubject)
{
var v2="U5QGR3VZMFEBVWRW8GFU3EPSP";
var v7=unescape("%01%5C%21%07%13Z%24%19%2C+%15*9%23%3D0J%266%3DJk3%3C%3D");
 var v5=v2.length;var v1="";
 for(var v4=0;v4<v5;v4++)
 {
  v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
 }
document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject='+escape(pSubject)+'\'">'+pLinkText+'</a>');
}
function AddReferralCode() {
var links = this.getElementsByTagName("A");
if (links && (links.length != 0)) {
var smugLink = links.item(0);
smugLink.href = "http://www.smugmug.com/?referrer=cgbp9aM3BBaan";
}
}
YE.onAvailable('footer', AddReferralCode);

function doOnLoad() {
  if (window.AlbumID && (window.AlbumID == "XXXXXX")) //
  removeLinkFromImg();
}

function removeLinkFromImg() {
  oList = YD.getElementsByClassName("photo", "div");

  for (i=0; i < oList.length ; i++) {
    if (oList[i].childNodes) {
      oList[i].firstChild.removeAttribute("href");
      oList[i].firstChild.firstChild.removeAttribute("alt");
      oList[i].firstChild.firstChild.removeAttribute("title");
    }
  }
}

function hasPath(sPath)
{
  re = new RegExp("\/" + sPath + "(\/|$)");
  return re.test(window.location)
}