EnquiriesForm = Class.create();
EnquiriesForm.prototype = {
	initialize: function()
	{},
	
	getSelected: function(element)
	{
		if(element.nodeName == 'SELECT')
		{
			// Get only the option elements from within the select list
			var options = $A(element.childNodes).findAll(function(node) {
				return node.nodeName == 'OPTION'
			})
			
			// Return the selected one
			return options[element.selectedIndex]
		}
		else
		{
			return element // Don't do anything
		}
	},
	
	highlightElement: function(element)
	{
	  colours = ['#f00', '#f22', '#f44', '#f66', '#f88', '#faa', '#fcc', '#fff']
	  
	  count = 0
	  new PeriodicalExecuter(function() {
	    if (count < colours.length)
	    {
  	    Element.setStyle(element, {backgroundColor: colours[count]})
  	    count++
	    }
	  }, .15)
	}
}

// Create a new form object
var form = new EnquiriesForm()