fire off some javascript on page load
document.addEventListener("DOMContentLoaded", theDomHasLoaded, false);
window.addEventListener("load", pageFullyLoaded, false);
function theDomHasLoaded(e) {
// do something
}
function pageFullyLoaded(e) {
// do something again
}