function disableEnterKey(e) { var key; if(window.event) { key = window.event.keyCode; //IE } else { key = e.which; //firefox } if(key == 13) return false; else return true; } function opWin(tURL,winName,winFeatures) { extwindow=open(tURL,winName,winFeatures) extwindow.focus(); } function submitFrm() { var frm = document.forms[0]; frm.submit(); window.opener.location.href=window.opener.location.href; } function refresh() { window.location.reload(true); } function checkQFields() { var frm = document.forms[0]; if(frm.FullName.value=="") { alert('Namn är inte angivet. '); frm.FullName.focus(); return false; } if(frm.Question.value=="") { alert('Fråga är inte angivet. '); frm.Question.focus(); return false; } submitFrm(); } function checkAFields() { var frm = document.forms[0]; if(frm.QuestionAnswer.value=="") { alert('Svar är inte angivet. '); frm.QuestionAnswer.focus(); return false; } submitFrm(); } function checkTA() { var frm = document.forms[0]; if (frm.Question.value.length >= 200) frm.Question.value = frm.Question.value.substring(0, 200); } function winClose() { window.opener.location.href=window.opener.location.href; window.close(); }