function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

  
<!--
var debug = true;
function right(e) {
  if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false;
  else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
    alert('Dui bu chi! Ni bu keyi!');
    return false;
  }

  return true;
}


YE.onAvailable('mapTitle', function() {this.innerHTML = 'Click a green icon below to view a photo & its corresponding location on the map!'}); 


YE.onAvailable('subCatGalleryTitle', function() {this.innerHTML = ''});

YE.onContentReady('breadCrumbTrail', function() {this.innerHTML =
this.innerHTML.replace('galleries','galleries')});

YE.onContentReady('breadcrumb', function() {this.innerHTML =
this.innerHTML.replace('galleries', 'galleries')});

YE.onContentReady('breadCrumbTrail', function() {
    for (var i in this.childNodes) {
        if (this.childNodes[i].tagName == "A") {
            this.childNodes[i].href="/galleries";
            break;
        }
    }
});

YE.onContentReady('breadcrumb', function() {
    for (var i in this.childNodes) {
        if (this.childNodes[i].tagName == "A") {
            this.childNodes[i].href="/galleries";
            break;
        }
    }
});

document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
//-->

function AddReferralCode()  {
  var links = this.getElementsByTagName("A");
  if (links && (links.length != 0)) {
    var smugLink = links.item(0);
    smugLink.href = "http://www.smugmug.com/?referrer=4U4iqv3FxrBgc";
  }
}
YE.onAvailable('footer', AddReferralCode);