Manyasha,
Firefox ждёт onblur. Можно так сделать
<select name="elemId" id="elemId">
<option value=""></option>
<option value="1" id="elemId_1">пункт 1</option>
<option value="2" id="elemId_2">пункт 2</option>
<option value="3" id="elemId_3">пункт 3</option>
<option value="4" id="elemId_4">пункт 4</option>
<option value="5" id="elemId_5">пункт 5 (вписать)</option>
</select>
<div id="txt">
<input type="text" name="txt" size="20" id="txt_input">
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
var el = document.getElementById("elemId");
var divTxt = document.getElementById("txt");
var inpTxt = document.getElementById("txt_input");
el.onchange = function () {
if (el.value != 5) {
divTxt.style.display = "none";
} else {
divTxt.style.display = "block";
inpTxt.value = "";
}
}
el.onkeyup = function (e) {
e.target.blur();
e.target.focus();
}
});
</script>