(function() {
  // use custom embedded search results page if they have js enabled
  document.forms['google-cse'].action = "http://www.emu.edu/search/results";

  var f = document.getElementById('google-cse');
  if (f && f.q) {
    var q = f.q;
    var bg = f.parentNode;
    var n = navigator;
    var l = location;
    // if (n.platform == 'Win32') {
    // q.style.cssText = 'border: 1px solid #7e9db9; padding: 2px;';
    // }
    var b = function() {
      if (q.value == '') {
        bg.style.backgroundPosition = 'left top';
      } else {
        f();
      }
    };
    var f = function() {
      bg.style.backgroundPosition = 'left bottom';
    };
    q.onfocus = f;
    q.onblur = b;
    if (!/[&?]q=[^&]/.test(l.search)) {
      b();
    }
  }
})();

