Added form and javascript for auto-refresh