function fixPhotoNav() {

  var oPhotoNav = YD.getElementsByClassName("photoNav", "div");



  for (var i=0; i < oPhotoNav.length; i++) {

    var re = /gallery\/([\d]+)(_(\w+))?\//;

    var oTitle = YD.getElementsByClassName("title", "span", oPhotoNav[i]);

    if (re.test(window.location)) {

      oTitle[0].innerHTML = "|&nbsp;" + oTitle[0].innerHTML + "&nbsp;|";

      re.exec(window.location);

      oPhotoNav[i].innerHTML = oPhotoNav[i].innerHTML + "<span ><a href='/gallery/" + RegExp.$1 + ((RegExp.$2 != undefined) ? RegExp.$2 : "") + "'>Return to Album</a></span>";

    }

  }

}





function isClass(sClass) {



  sClassName = document.body.className;



  re = new RegExp(sClass + "( |$)")







  if (!sClassName)



    return false;







  return re.test(sClassName);



}











function getHostname()



{



  re = /(http:\/\/[\w]+\.[\w]+\.[\w]+)\//;



  re.exec(window.location);



  return RegExp.$1;



}







function hasPath(sPath)



{



  re = new RegExp("\/" + sPath + "(\/|$)");



  return re.test(window.location)



}



















/*===================*/



/*== Seach by Date ==*/



/*===================*/



function searchTimeLine(response)



{



  re1 = /<div class="boxBottom">[\s\S]+<\/div>[\s]+<div class="spacer"><\/div>/;



  re2 = /Or, pick an arbitrary date range/;



  response = response.replace(re2,"Or, Pick your own Date Range");



  s = response.match(re1);



  document.getElementById("dateContainer").innerHTML = s;



}

















/***************************/



/* Menu Code               */



/***************************/















  var menuArray = new Array();



  var tableID   = null;



  var   rowID   = null;







  function collapse(subMenu)



  {



 //         alert(menuArray.length);







    if(subMenu==0)



      {



    //CLOSE ALL OPEN SUB-MENUS IN REVERSE ORDER FROM WHICH THEY WERE OPENED



        for(var i=(menuArray.length)-1; i>=0; i--)



        {



          document.getElementById(menuArray[i]).style.display="none";



            menuArray.length=i;  //DELETES ROW[I] FROM THE ARRAY



        }



      }



    else



      {



      //CLOSE APPROPRIATE SUB-MENU CHILDREN



        var j=menuArray.length;



        while(menuArray[--j]!=subMenu)



      {



          document.getElementById(menuArray[j]).style.display="none";



          menuArray.length=j;



        }



      }



  }







  function checkTable(ID)



  {



  //USED FOR TROUBLESHOOTING



  //alert("rowID="+rowID+", tableID="+tableID+", ID="+ID+", mA[0]="+menuArray[0]+", mA[1]="+menuArray[1]+", mA[2]="+menuArray[2])







  //THE MENU OPTION SELECTED HAS NO SUB-MENUS, SO CLOSE ALL OPEN SUB-MENUS AND STOP PROCESSING



    if(rowID==0)



      {



        collapse(0);



        return;



    }







  //A MENU OPTION FROM A DIFFERENT TABLE (GROUPING) HAS BEEN SELECTED, SO CLOSE ALL SUB-MENUS FROM THE OTHER TABLE



    if(tableID!=ID)



      {



         tableID =ID;



       collapse(0);



      }







      var flag=0;



  //CHECK IF THE SUB-MENU HAS ALREADY BEEN OPENED



      for(var i=0; i<menuArray.length; i++)



      {



        if(menuArray[i]==rowID)



             flag=1;



      }







  //IF THE MENU SELECTED IS ALREADY OPEN



      if(flag==1)



      {



      //COLLAPSE ALL SUB-MENU CHILDREN



        collapse(rowID);



      }



      else



      {



      //DISPLAY THE SUB-MENU



              if((rowID != null) && (rowID != "0") )



              {



                      menuArray[menuArray.length] = rowID;



                      document.getElementById(rowID).style.display = "";



                      //objSpan = eval("document.getElementById('span"+rowID+"')");



                      //objSpan.style.display = "block";



              }



      }



  }



















/**********************/



/* Right Click Warning */



/**********************/



rightClickWarning = "All images appearing in this web site and galleries are the exclusive property of Michael Scanlan and are protected under the United States and International Copyright laws. The images may not be reproduced, copied, transmitted or manipulated without the written permission of Michael Scanlan. Photography purchases are for personal use only and may not be used for promotional purposes without written consent.";




/***************************/



/* Turn off Popular Voting */



/***************************/



displaySmugPopular = true;







/****************************************/



/* Places the Smugmug Bar on the bottom */



/****************************************/



SM.PhotoBar.config.position = 'bottom';

   



