implements header/footer hiding for embedding purposes