You see that the first action that each form has is action="merda.php?s=" and the JS says:
myForm.action = 'search.php?s=' + textValue;
So, if you press the form's button you'll see that the action keeps "merda.php?s=" but it should be "search.php?s=". So it redirects you to the "http://merda.php?s=" and not to "http://search.php?s=" has it should be if the JS didnt crash.
It means that the script crashes in the line that comes before that statement:
var textValue = myForm.getElementById('s').value;