(function()
{
    var f = document.getElementById('cse-search-box');
    if (!f)
    {
      f = document.getElementById('searchbox_demo');
    }
    if (f && f.q)
    {
      var q = f.q;
      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 == '')
        {
          /*
            change the path to your intended background image or color.
           */
          q.style.background = 'url(images/search.png) no-repeat';
        }
      };
      var f = function() {
        /*
           This part is when query box is in focus
         */
        q.style.background = 'none';
      };
      q.onfocus = f;
      q.onblur = b;
      /* JS regex that calls blur function when query is not submitted */
      if (!/[&?]q=[^&]/.test(l.search))
      {
        b();
      }
    }
  }
)();