rightClickWarning = "Files can be purchased for download by clicking the buy button. Thanks. Steven Szabo"; /*========================================*/
/*==   Paypal shopping functionality    ==*/
/*========================================*/
function setPaypalForm(form) {
urlToImage = "/gallery/" + AlbumID + "_" + AlbumKey + "/1/" + ImageID + "_" + ImageKey;
i = form.photoselection.selectedIndex

sPhotoType = form.photoselection.options[i].text;
sPhotoPrice = form.photoselection.options[i].value;
urlToImage = urlToImage + " " + photoInfo[ImageID].caption + " " + sPhotoType;
form.item_name.value = urlToImage;
form.amount.value = sPhotoPrice;
}

function delHover() {
    oLst = YD.getElementsBy(function(el) {return (YD.hasClass(el,'imgBorder') || YD.hasClass(el,'imgBorderOn'))},'img');
    for (i=0; i < oLst.length ; i++) {
        if (oLst[i].title && oLst[i].title != '') oLst[i].title = '';
        if (oLst[i].alt && oLst[i].alt != '') oLst[i].alt = '';
    }
}
YE.onContentReady('bodyWrapper', function() {if (!YD.hasClass(document.body, 'smugmug_ajax')) delHover()});
onPhotoShow.subscribe(function(){YE.onAvailable('mainImage', delHover)});

function ModifyText ()
{
  if (YD.hasClass(document.body, "gallery_8165536"))
  {
    var objElement = YD.get("comment")
    if (objElement != null)
    {
      var str = new String(objElement.innerHTML);
      str = str.replace(/\gallery/gi, 'guestbook');
      objElement.innerHTML = str;
    }
  }
}
function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

if (hasPath("galleries"))
YD.addClass(document.body, "galleries");

YE.onAvailable("comment", ModifyText);