drophl = {
  // CSS classes
  overClass:'over', // rollover effect
  hideClass:'hide', // hide things
  currentClass:'current', // open item
  
  init:function(){
  var ps,i,hl;
  if(!document.getElementById || !document.createTextNode){return;}
    var dropList = document.getElementById('drop');
    if(!dropList){return;}
    var dropItems = dropList.getElementsByTagName('li');
    for(i = 0;i<dropItems.length;i++){
      hl = dropItems[i].getElementsByTagName('a')[0];
	  DOMhelp.addEvent(hl,'click',drophl.toggledrop,false);
	  hl.onclick = DOMhelp.safariClickFix;
      DOMhelp.addEvent(hl,'mouseover',drophl.hover,false);
      DOMhelp.addEvent(hl,'mouseout',drophl.hover,false);
    }
    var ps = dropList.getElementsByTagName('h6');
    for(i = 0;i<ps.length;i++){
      DOMhelp.cssjs('add',ps[i],drophl.hideClass);
    }
  },
  toggledrop:function(e){
    var section = DOMhelp.getTarget(e).parentNode.parentNode;
    var first = section.getElementsByTagName('h6')[0];
    var action = DOMhelp.cssjs('check',first,drophl.hideClass)?'remove':'add';
    var sectionAction = action == 'remove'?'add':'remove';
    var ps = section.getElementsByTagName('h6');
    for(var i = 0;i<ps.length;i++){
      DOMhelp.cssjs(action,ps[i],drophl.hideClass);
    }
    DOMhelp.cssjs(sectionAction,section,drophl.currentClass);
    DOMhelp.cancelClick(e);
  },
  hover:function(e){
    var hl = DOMhelp.getTarget(e).parentNode.parentNode;
    var action = e.type == 'mouseout'?'remove':'add';
    DOMhelp.cssjs(action,hl,drophl.overClass);
  }
}
DOMhelp.addEvent(window,'load',drophl.init,false);
