      dojo.require("dojox.widget.FisheyeList");
      dojo.require("dojo.parser");
  
      dojo.addOnLoad(function(){
        dojo.parser.parse(dojo.byId('fisheyeImages'));
      });
      
      var activeTypeId;
      
      // clear
      function clearActive() {
        //document.getElementById(activeTypeId).style.borderStyle = 'none';
        //document.getElementById(activeTypeId).style.backgroundColor = '#ffffff';
        return true;
      }
      
      function setActive(e,url,updateElement,updateText) {
        setActiveId(e);
        updateType(updateText);
        var newActivityId = activeTypeId.replace('fe','');
        if (document.forms['date_range']) {
          queryObject = getQueryObject(document.forms['date_range']);
        } else {
          var queryObject = new Object;
        }
        queryObject.activity_id = newActivityId;
        getPageAjax(url,queryObject,updateElement);
        // FIRE off AJAX request here, or hide/unhide divs
        return true;
      }
      
      // make the icon active
      function setActiveId(e) {
        //e.style.borderStyle='solid';
        //e.style.backgroundColor='#cccccc';
        activeTypeId = e.id;
      }
      
      // onclick handler for all clicking of a fisheye image
      function fisheyeClick(e,url,updateElement,updateText) {
        clearActive();
        setActive(e,url,updateElement,updateText);
      }
      
      // updates the type of icon selected
      function updateType(uT) {
        dojo.byId('fisheyeUpdate').innerHTML = "Active Exercise: " + uT;
      }
      
      function clearType() {
        dojo.byId('fisheyeUpdate').innerHTML = "";
      }
      
    function getPageAjax(url,parms,fillId) { 
      dojo.xhrGet( {
        // The following URL must match that used to test the server.
        url: url, 
        handleAs: "text",
        content: parms,
        timeout: 5000, // Time in milliseconds

        // The LOAD function will be called on a successful response.
        load: function(response, ioArgs) {
          dojo.byId(fillId).innerHTML = response;
          // load the mapping function if an activity that uses it
          if(parms["activity_id"] == 1 || parms["activity_id"] == 2 || parms["activity_id"] == 3 || parms["activity_id"] == 4) {
            google.load("maps","2", {"callback" : initmaps});
          }
          return response;
        },

        // The ERROR function will be called in an error case.
        error: function(response, ioArgs) {
          console.error("HTTP status code: ", ioArgs.xhr.status);
          return response;
          }
        });
      }
      


