var Ll = new Array;
Ll[0] = "http://Rutt.smugmug.com/photos/21687833-O.jpg";
Ll[1] = "http://Rutt.smugmug.com/photos/21687837-O.jpg";
Ll[2] = "http://Rutt.smugmug.com/photos/21687840-O.jpg";
Ll[3] = "http://Rutt.smugmug.com/photos/33366375-O.jpg"; 
Ll[4]  = "http://Rutt.smugmug.com/photos/34098910-O.jpg";
Ll[5] = "http://Rutt.smugmug.com/photos/34101424-O.jpg";
var P = new Array;
P[0] = "http://Rutt.smugmug.com/photos/21690263-O.jpg";
P[1] = "http://Rutt.smugmug.com/photos/21690264-O.jpg";
P[2] = "http://Rutt.smugmug.com/photos/21690267-O.jpg";
P[3] = "http://Rutt.smugmug.com/photos/33368373-O.jpg";
P[4] = "http://Rutt.smugmug.com/photos/34096379-O.jpg";
P[5] = "http://Rutt.smugmug.com/photos/34096987-O.jpg";
P[6] = "http://Rutt.smugmug.com/photos/34098630-O.jpg";
var Lr = new Array;
Lr[0] = "http://Rutt.smugmug.com/photos/21687900-O.jpg";
Lr[1] = "http://Rutt.smugmug.com/photos/21687905-O.jpg";
Lr[2] = "http://Rutt.smugmug.com/photos/21687909-O.jpg";
Lr[3] = "http://Rutt.smugmug.com/photos/33370702-O.jpg";
Lr[4] = "http://Rutt.smugmug.com/photos/34100296-O.jpg";
Lr[5] = "http://Rutt.smugmug.com/photos/34107385-O.jpg";

function choosePhoto(parray,width)
{
    var inx = Math.floor(Math.random()*parray.length);
    var img = parray[inx];
    document.write('<img border="1" src="' + img + '" height="110"/>');
}

var vanityTable = 
 {
     mtn2007 : "http://rutt.smugmug.com/gallery/3821210"
};

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
         }
     }
 }
