var ie4, ns4, ns6 ie4 = (document.all) ? true:false; ns4 = (document.layers) ? true:false; ns6 = (document.getElementById) ? true:false; // addChat() // adds the input to the chatboard if validation is correct function addChat() { var sName; var sText; // get field values. if (ie4) { sName = document.all.inpName.value; sText = document.all.inpText.value; } else if (ns4) { sName = document.inpName.value; sText = document.inpText.value; } else if (ns6) { sName = document.getElementById('inpName').value; sText = document.getElementById('inpText').value; } // check fields. if (sName.length == 0 || sText.length == 0) { alert('Niet alle verplichte velden zijn ingevuld! '); return false; } else { return true; } } function getUser() { if (ie4) { document.all.inpText.value=''; } else if (ns4) { document.frmChat.inpText.value=''; } else if (ns6) { document.getElementById('inpText').value=''; } } function getUserORG() { // clear input field document.frmChat.inpText.value = ''; if (document.frmChat.inpName.value.length == 0) { // set focus to inpName document.frmChat.inpName.select(); } else { // set focus to inpText document.frmChat.inpText.select(); } } function refreshFrameInOpener(pFrameName) { opener.item(pFrameName).location.reload(); } function insertSmile(pScbId) { var win; win=window.open('http://www.snefit.com/products/chatboard/smileys.asp?id='+pScbId,'smileys','location=no,menu=no,scrollbars=yes,width=220,height=300'); win.focus(); } function showSmile(pScbId) { var win; win=window.open('http://www.snefit.com/products/chatboard/smileys.asp?id='+pScbId,'smileys','location=no,menu=no,scrollbars=yes,width=220,height=300'); win.focus(); }