var Ll = new Array();
Ll[0] = "http://www.fthsm.com/photos/497136897_kJ6aX-L.jpg";
Ll[1] = "http://www.fthsm.com/photos/497136894_rcaoL-L.jpg";
Ll[2] = "http://www.fthsm.com/photos/497136901_3cKPu-L.jpg";
Ll[3] = "http://www.fthsm.com/photos/497136911_JB4MC-L.jpg";
Ll[4] = "http://www.fthsm.com/photos/497136916_YzSbM-L.jpg";
Ll[5] = "http://www.fthsm.com/photos/497136885_5egF5-L.jpg";
Ll[6] = "http://www.fthsm.com/photos/497136874_x4drT-L.jpg";
Ll[7] = "http://www.fthsm.com/photos/497136861_tKD86-L-1.jpg";


function choosePhoto(parray)
{
    inx = Math.floor(Math.random()*parray.length);
    img = parray[inx];
    document.write('<img border="0" width="330" height="91" src="' + img + '"/>');
}

YE.addListener(document, "keyup", pageNav);

function pageNav(e) {
  if (!e) 
    e = window.event;

  if (!YD.hasClass(document.body, "galleryPage"))
    return;

  switch (e.keyCode) {
    case 37:
      chk = "&lt;";
      break;

    case 39:
      chk = "&gt;";
      break;

    default:
      return;
  }
  
  oList = YD.getElementsByClassName("nav", "a", YD.get("albumNav_top"));
  for (var i=0; i < oList.length ; i++) {
    if (oList[i].innerHTML == chk) {
      window.location = oList[i].href;
      break;
    }
  }
}




function AddReferralCode()  {
  var links = this.getElementsByTagName("A");
  if (links && (links.length != 0)) {
    var smugLink = links.item(0);
    smugLink.href = "http://www.smugmug.com/?referrer=GkpaxTKh3sgIs";
  }
}
YE.onAvailable('footer', AddReferralCode);






function ModifyText () 
{
  if (YD.hasClass(document.body, "gallery_7927212")) 
  {
    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);

function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

