tried to extract javascript from search.jsp to search.js but did not succeed.