fixed the arabic probelm with the javascript code