if (document.images) {       //if image object is available
   //   preload images
   SideNavArrowOff = new Image();       SideNavArrowOff.src = "/Images/clear.gif";
   SideNavArrowOn = new Image();        SideNavArrowOn.src = "/Images/SideNavArrow.gif";
}

//function to move to a new category
function fChangeCategory(sCatId) {
   if(parent.window.frames['display']){
      parent.window.frames['display'].location.href = "/ImageLibrary/Favorites.asp?FavCategory=" + sCatId;
   }
   
   window.location.href = "/ImageLibrary/ifFavNav.asp?Category=" + sCatId;

   return true;
}

function fChangeSubCategory(sCatId, sSubId) {
   if(parent.window.frames['display']){
      parent.window.frames['display'].location.href = "/ImageLibrary/Favorites.asp?FavCategory=" + sCatId + "&FavSubCategory=" + sSubId;
   }

   return;
}

//Function that does image "rollover" swap
function DoSwap(imgName, imgObjName) {
   if (document.images) {
      document.images[imgName].src = eval(imgObjName + ".src");
   }
}