document.observe('dom:loaded', pmInit);
function pmInit() {
    switch(PMPAGE.TYPE()) {
        case "FIND_PEOPLE":
            PMPAGE.FIND_PEOPLE();
            break;
        default:
            PMPAGE.BASIC();
            break;
    };
}

var PMPAGE = {
	TYPE : function(pt) {
    function returnTYPE() {
      if (!this.pageType) { this.pageType = "BASIC"; }
      if (pt) { this.pageType = pt; }
      return this.pageType;
    }
    return returnTYPE();
	},
  BASIC : function() {
    basic_click_events();
  },
  FIND_PEOPLE : function() {
    PMPAGE.BASIC();
    var findPeopleOptions = function () {
      $$("#findPeopleOptions a").each(function(node) {
        Event.observe(node, "click", function(e) {
          Event.stop(e);
          var dest = node.readAttribute('href').substring(1);
          $$(".findPeopleOption").each(function(node) {
            node.hide();
          })
          if ($(dest)) {$(dest).show();}
          $$("#findPeopleOptions a").each(function(node) {
            node.removeClassName("selected");
          });
          node.addClassName("selected");
        });
      })
    }();
  }
}