function hasPath(sPath)
{
  re = new RegExp("\/" + sPath + "(\/|$)");
  return re.test(window.location)
}

rightClickWarning = “All photos are property of Jose Rojas. All rights reserved. Unauthorized use is prohibited. To download your image, click Buy this photo, then you will see the download tab”;

/*=========================================*/
/*== Position Paypal - ==*/
/*=========================================*/
YE.onContentReady("altViews", MovePaypalContent);
function MovePaypalContent()
{
var paypalObj = document.getElementById("paypalButtonSet");
var altViews = document.getElementById("altViews");
var smugmug= document.getElementById("smugmug");
if (altViews && paypalObj && smugmug)
{
var paypalSetObj = paypalObj.parentNode.removeChild(paypalObj);
altViews.appendChild(paypalSetObj);
paypalSetObj.style.display = "inline";
}
}
// script to automatically redirect to the iphone interface from any 
// small screen webkit browser (e.g. iPhone, iPod Touch, Palm Pre, Android, etc...)

// Check if we are on a small screen
function CheckForSmallScreen(minWidth, minHeight)
{
    return(window.screen.height < minHeight || window.screen.width < minWidth);
}

// Check if the browser userAgent string is AppleWebKit
function CheckForWebKitUA()
{
    return(navigator.userAgent.search(/AppleWebKit/i) != -1);
}

// Check if the URL already has /iphone in it
function CheckForIPhoneURL()
{
    return(window.location.pathname.toString().search(/^\/iphone/i) != -1);
}

// Switch to the iphone UI if we're a webkit browser, are not already the /iPhone URL and are on a small screen
function RedirectIfSmallWebKitBrowser()
{
    var parms = window.location.search;
    if (parms.search(/autoPhoneRedirect=no|stripiPhoneCookie=yes/i) != -1)
    {
        SM.util.setCookie("autoPhoneRedirect", "no", 1);
    }
    else if (parms.search(/autoPhoneRedirect=yes/i) != -1)
    {
        SM.util.setCookie("autoPhoneRedirect", "yes", 1);
    }
    // check to see if redirection has been turned off via cookie
    var value = "";
    value = SM.util.getCookie("autoPhoneRedirect");
    if (value != "no")
    {
        if (CheckForWebKitUA() && !CheckForIPhoneURL() && CheckForSmallScreen(600,600))
        {
            window.location.replace("/iphone");
        }
    }
}

RedirectIfSmallWebKitBrowser();