function goodchars(e, goods) { var key, keychar; key = getkey(e); if (key == null) return true; // get character keychar = String.fromCharCode(key); keychar = keychar.toLowerCase(); goods = goods.toLowerCase(); // check goodkeys if (goods.indexOf(keychar) != -1) return true; // control keys if ( key==null || key==0 || key==8 || key==9 || key==13 || key==27 ) return true; return false; } function getkey(e) { if (window.event) return window.event.keyCode; else if (e) return e.which; else return null; } function currencyPopup() { var txtAmount=document.currencyFrm.txtAmount.value; var dropdownFrom=document.currencyFrm.dropdownFrom.value; var dropdownTo=document.currencyFrm.dropdownTo.value; if(txtAmount.length<=0 || document.currencyFrm.txtAmount.value==""){ alert("Please enter the amount"); document.currencyFrm.txtAmount.focus(); return false; } if(dropdownFrom.length<=0 || document.currencyFrm.dropdownFrom.value=="" ||document.currencyFrm.dropdownFrom.value=="Currency"){ alert("Please select From Currency"); document.currencyFrm.dropdownFrom.focus(); return false; } if(dropdownTo.length<=0 || document.currencyFrm.dropdownTo.value=="" || document.currencyFrm.dropdownTo.value=="Currency"){ alert("Please select To Currency"); document.currencyFrm.dropdownTo.focus(); return false; } else { window.open('/csportal/qnb/currencyConverter/currencyPopup.jsp?txtAmount='+txtAmount+'&dropdownFrom='+dropdownFrom+'&dropdownTo='+dropdownTo, "QNBforexRate", "height=350, width=450,toolbar=no,menubar=no, location=no,scrollbars=0, top=0,resizable=no"); // window.open('/csportal/english/currencyConverter/currencyPopup.jsp?txtAmount='+txtAmount+'&dropdownFrom='+dropdownFrom+'&dropdownTo='+dropdownTo, "QNB", "height=250, width=460,toolbar=no,menubar=no, location=no,scrollbars=1, top=0,resizable=no"); return true; } } function forex() { window.open('/csportal/qnb/enexchangeRate/exchangeRates.jsp?name=normal', "QNB", "height=650, width=800,toolbar=no,menubar=no, top=0, location=no,scrollbars=yes, resizable=no, target=_blank"); } function forexRate() { window.open('/csportal/qnb/enexchangeRate/exchangeRates.jsp?name=normal', "QNB", "height=650, width=800,toolbar=no,menubar=no, top=0, location=no,scrollbars=yes, resizable=no, target=_blank"); }