extracted repetitive flash code in view into partials