

// Toggle (show/hide) content box, with animation
function toggleDiv(buttonID, divID) {
	
	button = document.getElementById(buttonID);

	// HANDLE SHOW DIV
	if (button.src.match("right") != null) {

		button.src = button.src.replace(/right/,"down") // change arrow to down
		
		// Animation 
		var attributes = {  height: { from: 0, to: document.getElementById(divID).scrollHeight + 10  }   };   
		var anim = new YAHOO.util.Anim(divID, attributes, .5, YAHOO.util.Easing.easeOut);   
		anim.animate();  

	// HANDLE HIDE DIV
	} else {	

		// Change class name of image button
		button.src = button.src.replace(/down/,"right");

		// Animation 
		var attributes = { height: { to: 0 }  };   
		var anim = new YAHOO.util.Anim(divID, attributes, .5, YAHOO.util.Easing.easeIn);   
		anim.animate();

	}
	
}


