/* Expandable and Collapsible Nav v1.1 (09/26/08)- by Will Peavy */

function headings() {
	
	if (!document.getElementById('section_1_heading')) return false;
	var s1h = document.getElementById('section_1_heading');
	var heading1 = s1h.firstChild.nodeValue;
	s1h.firstChild.nodeValue = '';
	BetterInnerHTML(s1h, '<a href="#" id="section_1_opener" class="toggler" ><img src="/includes/expandable_nav/arrow.png" alt="" class="down" />heading1</a><a href="#" id="section_1_closer" class="toggler"><img src="/includes/expandable_nav/arrowDown.png" alt="" class="down" />heading1</a>');
	document.getElementById('section_1_opener').onclick = function() {show('section_1'); show('section_1_closer'); hide('section_1_opener'); return false;};	
	document.getElementById('section_1_closer').onclick = function() {hide('section_1'); hide('section_1_closer'); show('section_1_opener'); return false;};	
	document.getElementById('section_1_opener').lastChild.nodeValue = ' ' + heading1;
	document.getElementById('section_1_closer').lastChild.nodeValue = ' ' + heading1;

	if (!document.getElementById('section_2_heading')) return false;
	var s2h = document.getElementById('section_2_heading');
	heading2 = s2h.firstChild.nodeValue;
	s2h.firstChild.nodeValue = '';
	BetterInnerHTML(s2h, '<a href="#" id="section_2_opener" class="toggler" ><img src="/includes/expandable_nav/arrow.png" alt="" class="down" />heading2</a><a href="#" id="section_2_closer" class="toggler"><img src="/includes/expandable_nav/arrowDown.png" alt="" class="down" />heading2</a>');
	document.getElementById('section_2_opener').onclick = function() {show('section_2'); show('section_2_closer'); hide('section_2_opener'); return false;};	
	document.getElementById('section_2_closer').onclick = function() {hide('section_2'); hide('section_2_closer'); show('section_2_opener'); return false;};	
	document.getElementById('section_2_opener').lastChild.nodeValue = ' ' + heading2;
	document.getElementById('section_2_closer').lastChild.nodeValue = ' ' + heading2;
	
	if (!document.getElementById('section_3_heading')) return false;
	var s3h = document.getElementById('section_3_heading');
	heading3 = s3h.firstChild.nodeValue;
	s3h.firstChild.nodeValue = '';
	BetterInnerHTML(s3h, '<a href="#" id="section_3_opener" class="toggler" ><img src="/includes/expandable_nav/arrow.png" alt="" class="down" />heading3</a><a href="#" id="section_3_closer" class="toggler"><img src="/includes/expandable_nav/arrowDown.png" alt="" class="down" />heading3</a>');
	document.getElementById('section_3_opener').onclick = function() {show('section_3'); show('section_3_closer'); hide('section_3_opener'); return false;};	
	document.getElementById('section_3_closer').onclick = function() {hide('section_3'); hide('section_3_closer'); show('section_3_opener'); return false;};	
	document.getElementById('section_3_opener').lastChild.nodeValue = ' ' + heading3;
	document.getElementById('section_3_closer').lastChild.nodeValue = ' ' + heading3;
	
	if (!document.getElementById('section_4_heading')) return false;
	var s4h = document.getElementById('section_4_heading');
	heading4 = s4h.firstChild.nodeValue;
	s4h.firstChild.nodeValue = '';
	BetterInnerHTML(s4h, '<a href="#" id="section_4_opener" class="toggler" ><img src="/includes/expandable_nav/arrow.png" alt="" class="down" />heading4</a><a href="#" id="section_4_closer" class="toggler"><img src="/includes/expandable_nav/arrowDown.png" alt="" class="down" />heading4</a>');
	document.getElementById('section_4_opener').onclick = function() {show('section_4'); show('section_4_closer'); hide('section_4_opener'); return false;};	
	document.getElementById('section_4_closer').onclick = function() {hide('section_4'); hide('section_4_closer'); show('section_4_opener'); return false;};	
	document.getElementById('section_4_opener').lastChild.nodeValue = ' ' + heading4;
	document.getElementById('section_4_closer').lastChild.nodeValue = ' ' + heading4;
	
	if (!document.getElementById('section_5_heading')) return false;
	var s5h = document.getElementById('section_5_heading');
	heading5 = s5h.firstChild.nodeValue;
	s5h.firstChild.nodeValue = '';
	BetterInnerHTML(s5h, '<a href="#" id="section_5_opener" class="toggler" ><img src="/includes/expandable_nav/arrow.png" alt="" class="down" />heading5</a><a href="#" id="section_5_closer" class="toggler"><img src="/includes/expandable_nav/arrowDown.png" alt="" class="down" />heading5</a>');
	document.getElementById('section_5_opener').onclick = function() {show('section_5'); show('section_5_closer'); hide('section_5_opener'); return false;};	
	document.getElementById('section_5_closer').onclick = function() {hide('section_5'); hide('section_5_closer'); show('section_5_opener'); return false;};	
	document.getElementById('section_5_opener').lastChild.nodeValue = ' ' + heading5;
	document.getElementById('section_5_closer').lastChild.nodeValue = ' ' + heading5;
	
	if (!document.getElementById('section_6_heading')) return false;
	var s6h = document.getElementById('section_6_heading');
	heading6 = s6h.firstChild.nodeValue;
	s6h.firstChild.nodeValue = '';
	BetterInnerHTML(s6h, '<a href="#" id="section_6_opener" class="toggler" ><img src="/includes/expandable_nav/arrow.png" alt="" class="down" />heading6</a><a href="#" id="section_6_closer" class="toggler"><img src="/includes/expandable_nav/arrowDown.png" alt="" class="down" />heading6</a>');
	document.getElementById('section_6_opener').onclick = function() {show('section_6'); show('section_6_closer'); hide('section_6_opener'); return false;};	
	document.getElementById('section_6_closer').onclick = function() {hide('section_6'); hide('section_6_closer'); show('section_6_opener'); return false;};	
	document.getElementById('section_6_opener').lastChild.nodeValue = ' ' + heading6;
	document.getElementById('section_6_closer').lastChild.nodeValue = ' ' + heading6;
	
	if (!document.getElementById('section_7_heading')) return false;
	var s7h = document.getElementById('section_7_heading');
	heading7 = s7h.firstChild.nodeValue;
	s7h.firstChild.nodeValue = '';
	BetterInnerHTML(s7h, '<a href="#" id="section_7_opener" class="toggler" ><img src="/includes/expandable_nav/arrow.png" alt="" class="down" />heading7</a><a href="#" id="section_7_closer" class="toggler"><img src="/includes/expandable_nav/arrowDown.png" alt="" class="down" />heading7</a>');
	document.getElementById('section_7_opener').onclick = function() {show('section_7'); show('section_7_closer'); hide('section_7_opener'); return false;};	
	document.getElementById('section_7_closer').onclick = function() {hide('section_7'); hide('section_7_closer'); show('section_7_opener'); return false;};	
	document.getElementById('section_7_opener').lastChild.nodeValue = ' ' + heading7;
	document.getElementById('section_7_closer').lastChild.nodeValue = ' ' + heading7;
	
	if (!document.getElementById('section_8_heading')) return false;
	var s8h = document.getElementById('section_8_heading');
	heading8 = s8h.firstChild.nodeValue;
	s2h.firstChild.nodeValue = '';
	BetterInnerHTML(s8h, '<a href="#" id="section_8_opener" class="toggler" ><img src="/includes/expandable_nav/arrow.png" alt="" class="down" />heading8</a><a href="#" id="section_8_closer" class="toggler"><img src="/includes/expandable_nav/arrowDown.png" alt="" class="down" />heading8</a>');
	document.getElementById('section_8_opener').onclick = function() {show('section_8'); show('section_8_closer'); hide('section_8_opener'); return false;};	
	document.getElementById('section_8_closer').onclick = function() {hide('section_8'); hide('section_8_closer'); show('section_8_opener'); return false;};	
	document.getElementById('section_8_opener').lastChild.nodeValue = ' ' + heading8;
	document.getElementById('section_8_closer').lastChild.nodeValue = ' ' + heading8;
	
	if (!document.getElementById('section_9_heading')) return false;
	var s9h = document.getElementById('section_9_heading');
	heading9 = s9h.firstChild.nodeValue;
	s9h.firstChild.nodeValue = '';
	BetterInnerHTML(s9h, '<a href="#" id="section_9_opener" class="toggler" ><img src="/includes/expandable_nav/arrow.png" alt="" class="down" />heading9</a><a href="#" id="section_9_closer" class="toggler"><img src="/includes/expandable_nav/arrowDown.png" alt="" class="down" />heading9</a>');
	document.getElementById('section_9_opener').onclick = function() {show('section_9'); show('section_9_closer'); hide('section_9_opener'); return false;};	
	document.getElementById('section_9_closer').onclick = function() {hide('section_9'); hide('section_9_closer'); show('section_9_opener'); return false;};	
	document.getElementById('section_9_opener').lastChild.nodeValue = ' ' + heading9;
	document.getElementById('section_9_closer').lastChild.nodeValue = ' ' + heading9;

}

headings();