ajax and javascript updates for window