function collapse_init() {
	if (typeof document.getElementsByTagName=='undefined') return;
	var collapsibles = collapse_getCollapsibles();
	var togglers = new Array;
	var more_togglers = new Array;
	var potentialToggle, j;
	for(var i=0; i<collapsibles.length; i++)
	{
		if(!collapsibles[i].id)
		{
			collapsibles[i].id = 'collapsible'+i;
		}
		togglers[i] = document.createElement('a');
		togglers[i].className = 'collapse_toggle';
		togglers[i].href = 'javascript:collapse_toggle("'+collapsibles[i].id+'");';
		togglers[i].title = 'toggle display';
		togglers[i].appendChild(document.createTextNode('toggle display'));
		collapsibles[i].appendChild(togglers[i]);
		if(collapsibles[i].className=='collapsible')
		{
			collapsibles[i].className='collapsible collapsed';
		}
		
		j=0;
		while (potentialToggle=collapsibles[i].childNodes[j])
		{
			if (potentialToggle.nodeType==1
				&& potentialToggle.className.indexOf('toggle_heading')!=-1)
			{
				eval("potentialToggle.onclick = function() {collapse_toggle('"+collapsibles[i].id+"');}");
			}
			j++;
		}
	}
}
function collapse_getCollapsibles()
{
	var element, i = 0,	num_members = 0, members = new Array, test_string;
	while((element = document.getElementsByTagName('div').item(i++)))
	{
		test_string = " "+element.className+" ";
		if(test_string.indexOf(" collapsible ")!=-1)
		{
			members[num_members++] = element;
		}
	}
	return members;
}
function collapse_toggle(id)
{
	var collapsible = document.getElementById(id);
	collapsible.className = (collapsible.className=='collapsible collapsed')? 
		'collapsible expanded' : 'collapsible collapsed';
}
function collapse_expand(id)
{
	if (typeof document.getElementsByTagName=='undefined') return;
	document.getElementById(id).className = 'collapsible expanded';
}
function collapse_writeNote()
{
	if (typeof document.getElementsByTagName=='undefined') return;
	document.write('<div id="collapse_note"><p>Note: The [+] &amp; [-] icons toggle the display of the following sections of the page.  Only the visible sections will be printed.</p></div>');
}
function alz_collapse_writeNote()
{
	if (typeof document.getElementsByTagName=='undefined') return;
	document.write('<div id="collapse_note" class="noprint"><p><small><img src="/images/reminder_hand.jpg" alt="Note: " width="26" height="40" class="reminderHand"> The <img src="/scripts/collapse/collapse_show.gif" alt="[+]" title="show"> &amp; <img src="/scripts/collapse/collapse_hide.gif" alt="[-]" title="hide"> icons toggle the display of the following sections of the page.  Only the visible sections will be printed.</small></p></div>');
}