This function is a perfect example of why I am sad we no longer have a templating framework. Can't we at least have a shell page with it's own CSS file? Removing the inline styles and innerHTML is at least slightly less depressing...