function display(index)
{
        var topic = document.getElementById('topic_' + index);
        var content = document.getElementById('content_' + index);
		
        if (status[index] == 0)    // Now is hiding
        {
		  topic.style.background = '#FFED24';
		  content.style.display = 'block';
		  status[index] = 1;
		}
	    else    // Now is displaying 
	    {
		  topic.style.background = '#FFFFFF';
		  content.style.display = 'none';
		  status[index] = 0;
		}
}


function show_all(num_topics)
{
		for (i = 0; i < num_topics; i++)
		{
		  topic = document.getElementById('topic_' + i);
		  content = document.getElementById('content_' + i);
		  topic.style.background = '#FFED24';
		  content.style.display = 'block';
		  status[i] = 1;
		}
}


function hide_all(num_topics)
{
		for (i = 0; i < num_topics; i++)
		{
		  topic = document.getElementById('topic_' + i);
		  content = document.getElementById('content_' + i);
		  topic.style.background = '#FFFFFF';
		  content.style.display = 'none';
		  status[i] = 0;
		}
}