function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

if (hasPath("galleries"))
YD.addClass(document.body, "galleries");

rightClickWarning = "All photos are property of Calvin Photography. All rights reserved. Unauthorized use is prohibited.";

function clearTab() {
 var galleriesLinkStyle = document.getElementById('galleriesLink');
 var url = location.href;

 if (url.substring(url.length-13, url.length) == "6195091_p2hvm" || url.substring(url.length-13, url.length) == "6184268_dsqAZ" || url.substring(url.length-13, url.length) == "6194410_TgQa7" || url.substring(url.length-13, url.length) == "6194889_XUtbX" || url.substring(url.length-13, url.length) == "6195300_AB3bN" || url.substring(url.length-13, url.length) == "6195686_44T9b") {
  galleriesLinkStyle.className = "unselectedTab";
 }

}

clearTab();

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

