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(lgCode,alertMsg) { 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"); alert(alertMsg[0]); document.currencyFrm.txtAmount.focus(); return false; } if(dropdownFrom.length<=0 || dropdownFrom==alertMsg[3]){ // alert("Please select From Currency"); alert(alertMsg[1]); document.currencyFrm.dropdownFrom.focus(); return false; } if(dropdownTo.length<=0 || dropdownTo==alertMsg[3]){ //alert("Please select To Currency"); alert(alertMsg[2]); document.currencyFrm.dropdownTo.focus(); return false; } else { if(lgCode=="ar"){ window.open('/csportal/qnb/arcurrencyConverter/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"); return true; } else{ window.open('/csportal/qnb/arcurrencyConverter/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"); return true; } } } function forex(lgCode) { if(lgCode=="ar") { window.open('/csportal/qnb/arexchangeRate/exchangeRates.jsp?name=normal', "QNB", "height=650, width=800,toolbar=no,menubar=no, top=0, location=no,scrollbars=yes, resizable=no, target=_blank"); } else{ window.open('/csportal/qnb/arexchangeRate/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(lgCode) { if(lgCode=="ar"){ window.open('/csportal/qnb/arexchangeRate/exchangeRates.jsp?name=normal', "QNB", "height=650, width=800,toolbar=no,menubar=no, top=0, location=no,scrollbars=yes, resizable=no, target=_blank"); } else{ window.open('/csportal/qnb/arexchangeRate/exchangeRates.jsp?name=normal', "QNB", "height=650, width=800,toolbar=no,menubar=no, top=0, location=no,scrollbars=yes, resizable=no, target=_blank"); } }