/****************************************************************************
* by: James-Ryan Merket
* coded: 06-08-2006
* for: Pendergraphics Design Group, LLC
*****************************************************************************/

function shownav(id) {
		
		var x = document.getElementById(id).style.display;

		if (x == "" || x=="none") 
			document.getElementById(id).style.display = "block"; 
		else
			document.getElementById(id).style.display = "none"; 
		
		xheight('leftcontainer','rightcolumn');


}

function xheight(col1,col2) {
		
		var leftid = document.getElementById(col1);
		var left = leftid.offsetHeight;
		var rightid = document.getElementById(col2);
		var right = rightid.offsetHeight;
		

		
		if(right>left) {
			var lh = right;
			document.getElementById(col1).style.height = (lh)+"px";
		}	
		else {
			var rh = left;
			document.getElementById(col2).style.height = (rh+30)+"px";
		}
}

//
// init() is called to initialize the accordion effect.
//



function init(){
	
	var stretchers = document.getElementsByClassName("subnav"); //div that stretches
	var toggles = document.getElementsByClassName("toggle"); //h3s where I click on
	
	//accordion effect
	var myAccordion = new fx.Accordion(
		toggles, stretchers, {opacity: true, duration: 500}
	);

}