
  // clear Search field
  function clearSearch () {
    var f = document.getElementById('keywords');
    if (f.value == 'search...') f.style.color = '#666';
    f.onfocus = function() {
      if (this.value == 'search...') this.value = '';
      this.style.color = '#222';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.style.color = '#666';
      this.value = 'search...';
    }
  }

  // clear Mailing List fields
  function clearMailingList () {
    var f = document.getElementById('mail-list-name');
    f.onfocus = function() {
      if (this.value == 'name') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'name';
    }
    
    var f = document.getElementById('mail-list-email');
    f.onfocus = function() {
      if (this.value == 'email') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'email';
    }
  }

  // clear Contact form fields
  function clearFormContact () {
    var f = document.getElementById('name');
    f.onfocus = function() {
      if (this.value == 'name') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'name';
    }

    var f = document.getElementById('email');
    f.onfocus = function() {
      if (this.value == 'email') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'email';
    }

    var f = document.getElementById('phone');
    f.onfocus = function() {
      if (this.value == 'phone') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'phone';
    }

    var f = document.getElementById('message');
    f.onfocus = function() {
      if (this.value == 'message') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'message';
    }
  }

  // clear Wholesale form fields
  function clearFormWholesale () {
    var f = document.getElementById('name');
    f.onfocus = function() {
      if (this.value == 'name') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'name';
    }

    var f = document.getElementById('email');
    f.onfocus = function() {
      if (this.value == 'email') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'email';
    }

    var f = document.getElementById('phone');
    f.onfocus = function() {
      if (this.value == 'phone') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'phone';
    }

    var f = document.getElementById('business');
    f.onfocus = function() {
      if (this.value == 'business') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'business';
    }

    var f = document.getElementById('abn');
    f.onfocus = function() {
      if (this.value == 'abn') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'abn';
    }

    var f = document.getElementById('website');
    f.onfocus = function() {
      if (this.value == 'website') this.value = '';
    }
    f.onblur = function() {
      if (this.value != '') return;
      this.value = 'website';
    }
  }

  // clear Contact form fields
  function clearFormContact2 (myform) {
  
    var thelist = 'name|email';

    // find all form fields
    var items = Form.getElements(myform);

    // focus, unfocus fields
    for (i = 0; i < items.length; i++) {
      var f = $(items[i]);
      f.onfocus = function() {
        if (this.value == thelist) this.value = '';
      }
      f.onblur = function() {
        if (this.value != '') return;
        this.value = thelist;
      }
    }
  }
