startList = function() {
  if (document.all && document.getElementById) {
    navRoot = document.getElementById("nav");
    for (i=0; i<navRoot.childNodes.length; i++) {
      node = navRoot.childNodes[i];
      if (node.nodeName=="LI") {
        node.onmouseover=function() {
          this.className+=" over";
        }
        node.onmouseout=function() {
          this.className=this.className.replace(" over", "");
        }
      }
    }
  }
}

window.onload=startList;

////////////////////////////////////////////////////////////////////////////////

function nextObject(obj) {
	var n = obj;
	do n = n.nextSibling;
	while (n && n.nodeType != 1);
	return n;
}

////////////////////////////////////////////////////////////////////////////////

function makeVisible(e) {

  // Return the table associated with this button (three levels up)
	var uMe = whichElement(e);
  var parentTable = uMe.parentNode.parentNode.parentNode;
	
  // Now find the first child TR with a style of display:none
	childTRs = parentTable.rows;
  var noHit = true;
  nextTR = childTRs[0];
	
  do {
    var nextTR = nextTR.nextSibling;
		if (nextTR.style && nextTR.style.display == 'none') {
      noHit = false;
    }
  } while (noHit)

  // Toggle this element
  nextTR.style.display = '';
}

////////////////////////////////////////////////////////////////////////////////

function viewSymposia(e) {
	
	// Check the value of this dropdown
	var uMe = whichElement(e);
	
	// Get the parent TR associated with this select 
	parentTR = uMe.parentNode.parentNode;
	
	if (uMe.selectedIndex == 2) {
		// Set the next two siblings to be visible
		var nextChild = nextObject(parentTR);
		nextChild.style.display = '';
		var nextNextChild = nextObject(nextChild);
		nextNextChild.style.display = '';
	} else {
		// Set the next two siblings to be invisible
		var nextChild = nextObject(parentTR);
		nextChild.style.display = 'none';
		var nextNextChild = nextObject(nextChild);
		nextNextChild.style.display = 'none';
	}
}
	
////////////////////////////////////////////////////////////////////////////////

function toggleRow(e) {

  // Return the image object and toggle the image
  var uMe = whichElement(e);
  var srcImage = uMe.src.toLowerCase();
  uMe.src = (srcImage.lastIndexOf('minus.gif')!=-1)?
    'images/plus.gif':'images/minus.gif';

  // Return the table row associated with this image (two levels up)
  var parentTR = uMe.parentNode.parentNode;

  // Now find the next sibling TR with an expandable class tag
  var noHit = true;
  nextTR = parentTR;
  do {
    var nextTR = nextTR.nextSibling;
    if (nextTR.className == "expandable") {
      noHit = false;
    }
  } while (noHit)

  // Toggle this element
  var display = nextTR.style.display;
  nextTR.style.display = (display=='none')?'':'none';
}

////////////////////////////////////////////////////////////////////////////////

function expand(x)
{
  // Only TR tags are expandable - search for these and toggle 
  var trTags=document.getElementsByTagName("tr")
  for (var i=0; i<trTags.length; i++) {
    if (trTags[i].className == "expandable") {
      if (x == true) {
        trTags[i].style.display = '';  
      } else {
        trTags[i].style.display = 'none';  
      }
    }
  }

  // Now toggle all the images to show their correct state
  var imgTags=document.getElementsByTagName("img") 
  for (var i=0; i<imgTags.length; i++) {
    if (imgTags[i].className == "expand") {
      if (x == true) {
        imgTags[i].src = 'images/minus.gif';
      } else {
        imgTags[i].src = 'images/plus.gif';  
      }
    }
  }
  
}

////////////////////////////////////////////////////////////////////////////////

function updateFirstAuthor()
{
	var firstName = document.getElementById("txtFirstName");
	var auFirstName = document.getElementById("au0FirstName");
	auFirstName.value = firstName.value;
	
	var MI = document.getElementById("txtMI");
	var auMI = document.getElementById("au0MI");
	auMI.value = MI.value;
	
	var lastName = document.getElementById("txtLastName");
	var auLastName = document.getElementById("au0LastName");
	auLastName.value = lastName.value;
	
	var organization = document.getElementById("txtOrganization");
	var auOrganization = document.getElementById("au0Organization");
	auOrganization.value = organization.value;
}
	
///////////////////////////////////////////////////////////////////////////////

function whichElement(e)
{
  if (!e) {
    var e = window.event; 
  }

  var targ;
  if (e.target) {
    targ = e.target;
  }
  else if (e.srcElement) {
    targ = e.srcElement;
  }

  // defeat Safari bug
  if (targ.nodeType == 3) {
    targ = targ.parentNode;
  }
  return targ;
}

////////////////////////////////////////////////////////////////////////////////




