var contentElement = document.createElement('span');
contentElement.id = 'technologysearchbox';
contentElement.innerHTML = ' ';
var scriptElement = document.getElementById('scripttechnologysearchbox');
scriptElement.parentNode.insertBefore(contentElement, scriptElement);
function urlencode(str) {
return escape(str).replace(/\+/g,'%2B').replace(/%20/g, '+').replace(/\*/g, '%2A').replace(/\//g, '%2F').replace(/@/g, '%40');
}
function searchKeyPress(e)
{
if (window.event) { e = window.event; }
if (e.keyCode == 13)
{
widgetTechnologySearch();
}
}
function widgetTechnologySearch() {
var term = urlencode(document.getElementById('techsearchid').value);
var url = 'http://technologies.tbdo.crg.eu/searchresults.aspx?q=' + term;
if (term.length < 1) {
url += '&page=0&sort=datecreated&order=desc';
}
window.location.href = url;
}