/**
* Assign the view handler
*/

viewHandler = Showrooms;

/**
* Creates a new object with methods used by the Showrooms page
*
* @author				Matt Gifford
* @copyright			2008 Timeshifting Interactive Limited
*/
function Showrooms()
	{
	// 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);

		// Init email address links
		var anchors = document.getElementById('showroomsBody').getElementsByTagName('a');
		for (var x = 0; x < anchors.length; x++)
			{
			if (anchors[x].innerHTML.indexOf('-at-') != -1)
				{
				var text = new String(anchors[x].innerHTML);
				text = text.replace(/-at-/g, '@');
				text = text.replace(/-dot-/g, '.');
				anchors[x].innerHTML = text;
				anchors[x].href = 'mailto:' + text;
				}
			}
		}
	}
