function doOnLoad()
{
if (window.AlbumID && (window.AlbumID == "2595509" || window.AlbumID == "1447060" || window.AlbumID == "1368620")) //
{
removeLinkFromImg();
}
}

function removeLinkFromImg()
{
var links = document.getElementsByTagName("A");
for (var i = 0; i < links.length; i++)
{
var link = links[i];
var divElm = link.parentNode;
if (!divElm) continue;
if (divElm.className.indexOf("photo")<0) continue;
link.href = "javascript:void(0);";
}
}


function deleteCookie(name, path, domain) {

  if (getCookie(name))

    document.cookie = name + "=" + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "") + ";expires=Thu, 01-Jan-1970 00:00:01 GMT";

}


function isClass(sClass) {
  sClassName = document.body.className;

  re = new RegExp(sClass + "( |$)") 

  if (!sClassName)
    return false;
  return re.test(sClassName);
}

rightClickWarning = "All photos are ©1999-2007 Lewis Johnson Photography. All rights reserved. Unauthorized use is prohibited."

var vanityTable = 
 {
     jackandjill : "http://lejphotos.smugmug.com/gallery/3955843",
     birds : "http://www.lejphotography.com/gallery/2116767",
     album : "http://lejphotos.smugmug.com/gallery/3307455",
     about: "http://www.lejphotography.com/gallery/1447060",
     delta: "http://www.lejphotography.com/gallery/2320477",
     belinda_alan:  "http://lejphotos.smugmug.com/gallery/6426516_EYABV"
 };

 function IsHomePage()
 {
    return(YD.hasClass(document.body, 'homepage'));
 }
 
 function CheckRedirects()
 {
     if (IsHomePage())    // only run this code on the home page
     {
         // get the path from the current URL, 
         // convert it to lowercase and remove the leading slash
         var path = window.location.pathname.toLowerCase().substr(1);
         
         var newURL = vanityTable[path];        // look it up in our table
         
         // if we found it in the table && newURL is different than where we are
         if (newURL && (newURL != window.location))
         {
             window.location.replace(newURL);        // go to the new URL
         }
     }
 }

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 createSWF( w, h, params) {
  var args = "";
  for (var i in params) {
    args += i + "=" + params[i] + "&amp;";
  }
document.writeln('<object width="100%" height="100%" align="middle">'+ '<param name="movie" value="http://www.smugmug.com/ria/ShizamSlides-2007091201.swf?'+args+'"/>'+ '<param name="wmode" value="transparent" />'+ '<embed src="http://www.smugmug.com/ria/ShizamSlides-2007091201.swf?'+args+'" wmode="transparent" width="' + w + '" height="' + h + '" type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all"/></object>');
return 1;
}
