﻿
function BreadCrumbMenu(domIdOfListOrListItself, initialText) {
   var that = this;
   var list = $(domIdOfListOrListItself);

   // first thing, hide list
   //hideElement(list);

   // create the prompt
   var menu = SPAN({ style: "border: outset 2px #000; padding: 2px; margin:2px" }, initialText); // I think we may want to use that hack where we measure how wide the text is, etc. etc. to set the width?
   swapDOM(list, menu);

   connect(menu, DomEvent.onmouseover, function() {
      // I think we should make it do something to indicate it will do something - maybe we just open it up
      var popupMenu = new PopupMenu(["a", "b", "c"])
      popupMenu.Display(menu);
   });

   connect(menu, DomEvent.onclick, function() {
      // get all of the top-level items first,
      var firstSet = findChildElements(list, ["ul"]);

   });




}
