/*--------------------------------------------------------*/
//
//  Executive Chauffuerred Services
//
/*--------------------------------------------------------*/

var Generic = {
  hideAll: function() { //Hide a list elements based on classname
    for(var i = 0; i < arguments.length; i++){
      var hideables = document.getElementsByClassName(arguments[i]);
      var nodes = $A(hideables);
      nodes.each( function(node){
        Element.hide(node);
      });
    }
  },

  showAll: function() { //Show a list elements based on classname
    for(var i = 0; i < arguments.length; i++){
      var showables = document.getElementsByClassName(arguments[i]);
      var nodes = $A(showables);
      nodes.each( function(node){
        Element.show(node);
      });
    }
  },

  showPopup: function(mypage, myname, w, h, scroll) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',nonresizable'
    win = window.open(mypage, myname, winprops)
    if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
  }
}

var Menu = {
  reset: function(classname){
    var mos = document.getElementsByClassName(classname);
    for(var i=0;i<mos.length;i++){
      mos[i].src = mos[i].src.replace("_hl","");
    }
  },

  show: function(el,menu){
    Menu.reset('menu_option');
    el.src = el.src.replace(".gif","_hl.gif");
    Generic.hideAll('menu_bar');
    if(menu){
      Element.show(menu);
    }
  },
  
  goTo: function(loc){
    document.location = loc;
  }
}
