    function highlightitem(item){
      var category = $("category").value;
      if(item != $("item-"+category)){
        item.style.fontWeight = "bold";
        item.style.color = "#ffffff";
        item.style.backgroundColor = "#cccccc";
      }
      return false;
    }

    function unhighlightitem(item){
      var category = $("category").value;
      if(item != $("item-"+category)){
        item.style.fontWeight = "normal";
        item.style.color = "#1E1E52";
        item.style.backgroundColor = "#ffffff";
      }
      return false;
    }

    function loadnav(){
      //get new content and update main div
      var ajax = new Ajax.Updater("nav-top", "nav-top.htm", {method:'get', evalScripts:false});
      var ajax = new Ajax.Updater("nav-left", "nav-left.htm", {method:'get', evalScripts:true});
      $("footer").innerHTML = "Copyright &copy; 2007, NuView, Inc.  All rights reserved.";
      if($("thumbs"))
        $("thumbs").innerHTML = generateImagePageContent($("category").value, $("thumbCount").value);
    }

    function selectCurrentItem(category){
      var item = $("item-"+category);
      if(item){
        item.style.fontWeight = "normal";
        item.style.color = "#1E1E52";
        item.style.backgroundColor = "#ffffff";

        //create highlight effect
        new Effect.Highlight(item, {
            startcolor: "#cccccc", endcolor: "#1E1E52", duration: 0.8});
        item.style.fontWeight = "bold";
        item.style.color = "#ffffff";
        item.style.backgroundColor = "#1E1E52";
      }
    }

    function selectoption(option, content){
      return false;
    }

    function hoverthumb(index){
      //new Effect.Pulsate("thumb-div-" + index);
    }

    function selectpicturetype(index){
      new Effect.Pulsate("thumb-div-" + index, {duration:1.5});
      var category = $("category").value;
      $("pic-selected").src = "images/" + category + "_" + index + ".jpg";
      $("pic-selected-annotation").innerHTML = index;
    }

    function generateImagePageContent(category, numImages){
      var content = "";

      //preload thumbnails
      for(var i=1;i<=numImages;i++){
        //var newImage = new Image(574, 430);
        //newImage.src = "images/" + category + "_" + i + ".jpg";
        var newThumb = new Image(110, 82);
        newThumb.src = "images/thumbs/" + category + "_" + i + "_sm.jpg";
      }

      //generate thumb image code
      for(var i=1;i<=numImages;i++){        
        content += "<div id='thumb-div-" + i + "' class='thumb' onmouseover='hoverthumb(" + i + ")' " +
          "onclick='selectpicturetype(" + i + ")'><image id='thumb-" + i + "' " +
          "src='images/thumbs/" + category + "_" + i + "_sm.jpg' width=110 height=82 border=0></div>\n";
      }
      return content;
    }

window.onload = loadnav;
