function SearchBox(name, resultsPath, inFrame, label) { this.searchLabel = label; this.DOMSearchField = function() { return document.getElementById("MSearchField"); } this.DOMSearchBox = function() { return document.getElementById("MSearchBox"); } this.OnSearchFieldFocus = function(isActive) { if (isActive) { this.DOMSearchBox().className = 'MSearchBoxActive'; var searchField = this.DOMSearchField(); if (searchField.value == this.searchLabel) { searchField.value = ''; } } else { this.DOMSearchBox().className = 'MSearchBoxInactive'; this.DOMSearchField().value = this.searchLabel; } } }