		//
		//  In my case I want to load them onload, this is how you do it!
		// 
		Event.observe(window, 'load', function() { loadAccordions(); });
	
		//
		//	Set up all accordions
		//
		function loadAccordions() {

                        var navAccordion = new accordion('#nav_container', {
                                classNames : {
                                        toggle : 'expander',
                                        toggleActive : 'expanded',
                                        content : 'expand_content'
                                }
                              //  afterFinish: function() { fixheights(); }
                        });
                      var paneAccordion = new accordion('#panes', {
                                classNames : {
                                        toggle : 'pane',
                                        toggleActive : 'pane_active',
                                        content : 'pane_open'
                                },
                                defaultSize : {
                                      width : 416
                                },
                                direction : 'horizontal'
                  //,              afterFinish: function() { fixheights(); }

                        });
                           
if($$('.pane')[2]) {
paneAccordion.activate($$('.pane')[2]);
}


if(navactive) {
navAccordion.activate($$('#nav_container .expander')[navactive-1]);
} 

setTimeout("fixheights()",1000);

		}

function fixheights() {

document.getElementById('nav_container').style.padding = "12px 0 0 50px";

for(i=0; i<3; i++) { $$('.pane .activator')[i].style.padding = "0 0 0 0"; $$('.pane_content')[i].style.padding = "16px 16px 16px 16px"; }

document.getElementById('panes').style.display = 'block';

var menuheight = document.getElementById("nav_container").offsetHeight;


if(menuheight > 220) {

contentheight = $$('.pane_active')[0].next(1).offsetHeight;

if((menuheight+188) < contentheight) {
document.getElementById('nav_container').style.padding = "12px 0 "+ (contentheight - (menuheight + 188)) + "px 50px";

for(i=0; i<3; i++) { $$('.pane .activator')[i].style.padding = "0 0 "+ (contentheight - 289) + "px 0"; }
} else { 

document.getElementById('nav_container').style.padding = "12px 0 21px 50px";

for(i=0; i<3; i++) { $$('.pane .activator')[i].style.padding = "0 0 "+(menuheight - 80) + "px"; }
}
}
}

