/**
* Assign the view handler
*/

viewHandler = News;

/**
* Creates a new object with methods used by the News page
*
* @author				Matt Gifford
* @copyright			2008 Timeshifting Interactive Limited
*/
function News()
	{
	// Step 1. Define Properties

	var _instance = this;



	// Step 2. Define Public Methods

	/**
	* Sets up the initial page state and event handlers
	*/
	this.init = function()
		{
		// Call generic page init method
		this.base.init.call(this);

		// Add event handlers to news items
		var headings = document.getElementById('insideBody').getElementsByTagName('h4');
		for (var x = 0; x < headings.length; x++)
			{
			// Add event handler to show/hide content paragraph
			headings[x].firstChild.onclick = function()
				{
				var paragraph = this.parentNode.parentNode.getElementsByTagName('p')[0];
				if (paragraph.className == 'hidden')
					{
					paragraph.className = '';
					}
				else
					{
					paragraph.className = 'hidden';
					}
				}
			}
		}
	}
