	(function() 
      { 

         var q = document.getElementById('q'); 

         if (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 == '') 
               { 
					  q.style.background = '#FFFFFF url(http://www.google.com/coop/images/google_custom_search_watermark.gif) left no-repeat'; 
               } 
            }; 
      
            var f = function() 
            { 
               q.style.background = '#ffffff'; 
            };

            q.onfocus = f; 
            q.onblur = b; 
      
            if (!/[&?]q=[^&]/.test(l.search)) 
            {       
               b();      
            }     
         }  
      }    
      ); 
           
      function onEnter(e)
      {
          var code = -1;
      
          if( e.keyCode ) { code = e.keyCode; }
          else { code = e.which; }

          if( code == 13 )
          {
              doSearch();
          }
      }
  
      function doSearch()    
      {   
         var q = document.getElementById('q').value;   
         var cof = document.getElementById('cof').value;    
         var cx = document.getElementById('cx').value;
			                
			if(q.trim() != "")
			{ 								  
            location.href = "http://www.hocking.edu/search?q=" + encodeURIComponent(q) + "&cof=" + encodeURIComponent(cof) + "&cx=" + encodeURIComponent(cx);
         }         
      }
      
String.prototype.trim = function () {
    return this.replace(/^\s*/, "").replace(/\s*$/, "");
}
