function add_hebrew_char (textBox, hebrew_char, max_string_length) { var activeTextBox = document.getElementById(textBox); if (activeTextBox.value.length < max_string_length) { activeTextBox.value = activeTextBox.value + hebrew_char; activeTextBox.focus (); } }