Close some while's and the document.forms[0].onsubmit function

document.forms[0].onsubmit
while(query.charAt(query.length-1) === ""){
var searchSomething = function(query){
fixed spacing for var goSearch = function(query){