Use javascript for switching between campaign views