function offon(goOn, fullList){

	var j = 1;
	
	if(document.getElementById(goOn).style.display=="")
		j = 0;

	for(var i in fullList){
		document.getElementById(fullList[i]).style.display = "none";
	}
	
	if(j==1)
		document.getElementById(goOn).style.display = "";

}





/* accordion menu, modified from paranoidferret.com */

/* var ContentHeight = 15; */
var TimeToSlide = 200.0;

var openAccordion = '';

function runAccordion(index,ContentHeight)
{
  var nID = "acrd" + index + "Content";
  if(openAccordion == nID)
    nID = '';
    
	setTimeout("animate(" + new Date().getTime() + "," + TimeToSlide + ",'" + openAccordion + "','" + nID + "','"+ContentHeight+"')", 33);
  

  
  openAccordion = nID;
}


function animate(lastTick, timeLeft, closingId, openingId, ContentHeight)
{  
  var curTick = new Date().getTime();
  var elapsedTicks = curTick - lastTick;
  
  var opening = (openingId == '') ? null : document.getElementById(openingId);
  var closing = (closingId == '') ? null : document.getElementById(closingId);
 
  if(timeLeft <= elapsedTicks)
  {
    if(opening != null)
      opening.style.height = ContentHeight + 'em';
    
    if(closing != null)
    {
      closing.style.display = 'none';
      closing.style.height = '0em';
    }
    return;
  }
 
  timeLeft -= elapsedTicks;
  var newClosedHeight = Math.round((timeLeft/TimeToSlide) * ContentHeight);

  if(opening != null)
  {
    if(opening.style.display != 'block')
      opening.style.display = 'block';
    opening.style.height = (ContentHeight - newClosedHeight) + 'em';
  }
  
  if(closing != null)
    closing.style.height = newClosedHeight + 'em';

  setTimeout("animate(" + curTick + "," + timeLeft +",'" + closingId + "','" + openingId + "','"+ContentHeight+"')", 33);
}
