reposition javscript function gets called but donest work unles smanual resize