function hp_searchit(val) { newVal = ''; if (val == undefined) { if (typeof formsearch != undefined) { if (typeof formsearch.textfieldsearch != undefined) { val = formsearch.textfieldsearch.value; } } } if (val != '') { val = val.split(' '); for (var c = 0; c < val.length; c++) { newVal += ((c == 0) ? '' : '-') + val[c].substring(0,1).toUpperCase() + val[c].substring(1,val[c].length); } if (newVal != '') { top.location.href = newVal + '.html'; } } }