Javascript: ensure banner appears before %begin code