rtl problem

I rtl page this code does't work for me , so I changed it.
I know this change is not good but I had no time to read the code and understand it , because I'm in hurry to compelete a project.
I hope this help u!