common js methods for toggling divs and fields