added javascript to show and hide graph