// Fix Hier Menus v1.1 by Matt Ditter (Jan. 2008)
// Enables drop downs in IE6 and supports tabbing through sublists
function fixMenu() {
 var lists = document.getElementsByTagName('ul');
 for (var i=0, list; list = lists[i]; i++) {
  if (!list.id.indexOf('menu')) {
   var lis = list.getElementsByTagName('li');
   for (var j=0, li; li = lis[j]; j++) {
    li.onmouseover = function() { this.className += ' hierover'; }
    li.getElementsByTagName('a')[0].onfocus = function() { this.parentNode.className += ' hierover'; }
    li.onmouseout = function() { this.className = this.className.replace(/ ?\bhierover\b/gi,''); }
    if (li.getElementsByTagName('ul').length) {
     var anchors = li.getElementsByTagName('a');
     anchors[anchors.length-1].onblur = function() {
      this.parentNode.parentNode.parentNode.className = this.parentNode.parentNode.parentNode.className.replace(/ ?\bhierover\b/gi,'');
      var n = this;
      while (n.parentNode) {
       if (n.parentNode.tagName == 'UL') {
        var links = n.getElementsByTagName('a');
        if (links[links.length-1] == this) n.className = n.className.replace(/ ?\bhierover\b/gi,'');
       }
       n = n.parentNode;
}}}}}}}

// pop-upChap function
var newWinChap = null;
function closeWin(){
	if (newWinChap != null){
		if(!newWinChap.closed)
			newWinChap.close();
	}
}
function popUpChap(strURL,strType,strTop,strLeft,strHeight,strWidth) {
closeWin();
var strOpt="";
if (strType=="console") strOpt="resizable,scrollbars,top="+strTop+",left="+strLeft+",height="+strHeight+",width="+strWidth;

newWinChap = window.open(strURL, 'newWinChap', strOpt);
newWinChap.focus();
}

// pop-up function
var newWin = null;
function closeWin(){
	if (newWin != null){
		if(!newWin.closed)
			newWin.close();
	}
}
function popUp(strURL,strType,strTop,strLeft,strHeight,strWidth) {
closeWin();
var strOptions="";
if (strType=="console") strOptions="resizable,scrollbars,top="+strTop+",left="+strLeft+",height="+strHeight+",width="+strWidth;

newWin = window.open(strURL, 'newWin', strOptions);
newWin.focus();
}


