anchor.diff:  <script type="text/javascript">
   
   
  -addEvent(window, 'load', init, false);
  -function init() {
  -    var formInputs = document.getElementsByTagName('input');
  -    for (var i = 0; i < formInputs.length; i++) {
  -        var theInput = formInputs[i];
  -
  -        if (theInput.type == 'text' && theInput.className.match(/\bcleardefault\b/)) {
  -            /* Add event handlers */
  -            addEvent(theInput, 'focus', clearDefaultText, false);
  -            addEvent(theInput, 'blur', replaceDefaultText, false);
  -
  -            /* Save the current value */
  -            if (theInput.value != '') {
  -                theInput.defaultText = theInput.value;
  -                theInput.style.color = 'gray';
  -                theInput.style.fontStyle = 'italic';
  -
  -            }
  -            theInput.style.backgroundColor = '#CCE6FF';
  +function initSearchField() {
  +
  +    $$("input[type=text].autocomplete").each(function(theInput)
  +    {
  +        /* Add event handlers */
  +        Event.observe(theInput, 'focus', clearDefaultText);
  +        Event.observe(theInput, 'blur', replaceDefaultText);
  +        /* Save the current value */
  +        if (theInput.value != '') {
  +            theInput.defaultText = theInput.value;
  +            theInput.className = 'pending-search';
   
           }
   
  -
  -    }
  -
  -}
  -function addEvent(element, eventType, lamdaFunction, useCapture) {
  -    if (element.addEventListener) {
  -        element.addEventListener(eventType, lamdaFunction, useCapture);
  -        return true;
  -    } else if (element.attachEvent) {
  -        var r = element.attachEvent('on' + eventType, lamdaFunction);
  -        return r;
  -    } else {
  -        return false;
  -    }
  -}
  -
  +    });
  +}
   function clearDefaultText(e) {
       var target = window.event ? window.event.srcElement : e ? e.target : null;
       if (!target) return;
   
       if (target.value == target.defaultText) {
           target.value = '';
  -        target.style.backgroundColor = '#CCE6FF';
  -        target.style.fontStyle = 'normal';
  +        target.className = 'search';
   
       }
   
  
positive.code:             <option value="${activityType.id}">${activityType.name}</option>
          </c:forEach>
      </select>
      <input id="activities-autocompleter-input" type="text" autocomplete="off" class="cleardefault"
             value="Search for activity"/>
  
      <div id="activities-autocompleter-div" class="autocomplete"></div>
  
negative.code:     registerHoverTips();
      registerDraggablesAndDroppables();
      createAutocompleter();
      initSearchField();
  
  }
  
  