Optimize the use of scripts in your pages.
Using unobtrusive JavaScript can be better than extensive HTML markup. The page is smaller and the JavaScript is on the bottom, so the page renders faster. You can also try to do the same for Flash files: give a progress bar and render the page, with the JavaScript at the bottom of the page.
If you modify the DOM on-the-fly, page loading performance could be negatively affected. If you must modify the DOM, test the performance with multiple browsers and browser versions.