﻿//Changes made on 2007-05-07 by K.G. (CnEY),
//to hopefully make this work in IE.

//new requirements in other files:
//the h3 in menu.inc.php now has the id quick_nav_head.
//the ul in menu.inc.php now has the id quick_nav_body.
//technically, the id quick_nav itself is no longer used.

function dropDownInit() {
  var qhead = document.getElementById('quick_nav_head');
  var qbody = document.getElementById('quick_nav_body');
  qbody.style['position'] = 'absolute';
  qbody.style['top'] = findPosBottom(qhead) + 'px';
  qbody.style['left'] = findPosX(qhead) + 'px';

  //initialize event hook to drop down:
  qhead.onclick = dropDown;
}

function dropDown() {
//[2007-05-07:CnEY] - much simpler way.
//All this requires is that the ul have the id "quicknav_body".
  var qbody = document.getElementById('quick_nav_body');
  qbody.style['display'] = '';
  //switch hook to pullUp:
  var qhead = document.getElementById('quick_nav_head');
  qhead.onclick = pullUp;
}

function pullUp(event) {
//[2007-05-07:CnEY] - much simpler way.
//All this requires is that the ul have the id "quicknav_body".
  var qbody = document.getElementById('quick_nav_body');
  qbody.style['display'] = 'none';
  //switch hook to dropDown:
  var qhead = document.getElementById('quick_nav_head');
  qhead.onclick = dropDown;
}
