var accordion;
var accordionTogglers;
var accordionContents;
 
window.onload = function() {

	accordionTogglers = document.getElementsByClassName('accToggler');
	
	accordionTogglers.each(function(toggler){
		//remember the original color
		toggler.origColor = toggler.getStyle('color');
		//set the effect
		toggler.fx = new Fx.Color(toggler, 'color');
	});
	
	accordionContents = document.getElementsByClassName('accContent');
		
	accordion = new Fx.Accordion(accordionTogglers, accordionContents,{
		//when an element is opened change the font color to black
		onActive: function(toggler){
			toggler.fx.toColor('#000');
		},
		onBackground: function(toggler){
			//change the background color to the original (green) 
			//color when another toggler is pressed
			toggler.setStyle('color', toggler.origColor);
		}		
	});
}

function calcHeight()
{
  //find the height of the internal page
  var the_height=
    document.getElementById('the_iframe').contentWindow.
      document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById('the_iframe').height=
      the_height;
}
