rightClickWarning = "All images are property of Scott Keating and are protected by US and International copyright laws. All rights reserved. Unauthorized use is prohibited.  Please contact us for image-use requests.";
//-------------------------------------------------------------------------------
// Part of the ShizamSlides slideshow SWF code
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;
}
//-------------------------------------------------------------------------------

//-------------------------------------------------------------------------------
// Adds my own referral code to the smugmug link
function AddReferralCode()  {
  var links = this.getElementsByTagName("A");
  if (links && (links.length != 0)) {
    var smugLink = links.item(0);
    smugLink.href = "http://www.smugmug.com/?referrer=nZBMtSpGK4YRM";
  }
}
YE.onAvailable('footer', AddReferralCode);
//-------------------------------------------------------------------------------

// removes the pipes characters in the toolbar header
YE.onAvailable('toolbar', function(e) {
this.innerHTML = this.innerHTML.replace(new RegExp(/\|/g),"");
});

// change the link on the SmugMug Logo
YE.onAvailable('homelink', function(e) {
    this.href = "http://pix.aerog.com/";
    this.firstChild.alt = "Keating Photographic";
    this.firstChild.title = "Keating Photographic";
});

// Normally the subcategories appear above the galleries in
// a category page - this moves the subcategories to under the galleries
function swapBoxes() {
   box1 = YD.get("subcategoriesBox");
   box2 = YD.get("galleriesBox");
   if (box1 && box2)
   {
      swap = box1.innerHTML;
      box1.innerHTML = box2.innerHTML;
      box2.innerHTML = swap;
   }
}

// Vanity URL Vars
var vanityTable = 
  {
          maine : "http://pix.aerog.com/keyword/maine"
  };

// Vanity Script
function CheckRedirects()
 {
     if (YD.hasClass(document.body, 'homepage'))    // 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
         }
     }
 }

// Change the images for sale galleries title
YE.onContentReady('galleryTitle', function() {this.innerHTML = this.innerHTML.replace('Images For Sale Galleries', 'Galleries')})

// Saved code to change subCat titles
// YE.onContentReady('subCatGalleryTitle', function() {this.innerHTML =
// this.innerHTML.replace('Images For Sale Sub-Categories', 'sub-cats')}) 

