function windowHeight() {
  if (window.innerHeight) {
    return window.innerHeight;
  } else  if (screen.availHeight) {
    return screen.availHeight;
  } else {
    return 800;
  }
}



	var stretchers = $$('div.accordion');
	stretchers.each(function(item){
		item.setStyles({'height': '0', 'overflow': 'hidden'});
	});
	
	
	window.onload = function(){ //safari cannot get style if window isnt fully loaded
		
		var togglers = $$('h3.toggler');
		
		var bgFx = [];
		
	
		var myAccordion = new Fx.Accordion(togglers, stretchers, { opacity: false, start: false, alwaysHide: true, transition: Fx.Transitions.quadOut});
		
		//anchors
		function checkHash(){
			var found = false;
			$$('h3.toggler a').each(function(link, i){
				if (window.location.hash.test(link.hash)){
					myAccordion.showThisHideOpen(i);
					found = true;
				}
			});
			return found;
		}

		if(!checkHash()){
		gap = document.getElementById('body').offsetHeight - windowHeight();
		if(gap < 0){

			document.getElementById('body').style.height = windowHeight()+"px";
		} else {
			// document.getElementById('body').style.height = 20+document.body.offsetHeight+"px";
		}
}
		
		

	};
	
	try {
		Window.disableImageCache();
	}catch(e){}