// Historic Figures browser functions
var HFcurr = null;

// HFTog
function HFTog(cell)
{
	if (cell.style)
        {
		// using rgb colors to accomodate gecko
		cell.style.backgroundColor = (cell.style.backgroundColor == "rgb(38,182,176)") ? "" : "rgb(38,182,176)";
		cell.style.cursor="hand";
	}
	return true;
}// end navTog

// HFinit function
function HFinit()
{
  if (document.getElementById)
  {
  	oHFlistsAll = document.getElementById('HFlistsAll');
	oHFlistsAll.style.height = '440';
        for(var i=0; i < HFarray.length; i++)
        {
                HFtoggle_O(HFarray[i]);
        }
	HFcurr = null;
	HFshowSingleLetter('a');
  }
  return true;
}

// HFshowSingleLetter function
function HFshowSingleLetter(letter)
{
	if (document.getElementById)
        {
		if (HFcurr) HFtoggle(HFcurr);
		return !HFtoggle(letter);
	}

}

// HFtoggle function
function HFtoggle(letter)
{
	if (document.getElementById)
        {
		HFcurr = letter;
    	        oList = document.getElementById('HFlist' +  letter);
        	if (oList)
                {
      	        	oList.style.display = (oList.style.display == 'none')? 'block' : 'none';
        	}		
        	oCell = document.getElementById('cell' +  letter);
	      	HFTog(oCell);
		return true;
  	}
	return false;
}

function HFtoggle_O(letter)
{
	if (document.getElementById)
        {
		HFcurr = letter;
    	        oList = document.getElementById('HFlist' +  letter);
        	if (oList)
                {
      	        	oList.style.display = (oList.style.display == 'none')? 'block' : 'none';
        	}		
        	oCell = document.getElementById('cell' +  letter);
	    //  	HFTog(oCell);
		return true;
  	}
	return false;
}



