Here's a much cleaner version (using
onload instead of an arbitrary timer).
<script type="text/javascript">
// Move nodelets to the left side.
function move_nodelets_to_left() {
var td = document.getElementById('nodelet_container').parentNode;
var tr = td.parentNode;
tr.insertBefore(td, tr.firstChild);
}
// Execute our snippets after the page is parsed.
var old_onload = window.onload;
window.onload = function() {
if (old_onload != null)
old_onload();
move_nodelets_to_left();
// Add other free nodelet functions here.
};
</script>
As you might have noticed, we no longer need the IE-specific code. The IE-specific code was needed because IE couldn't handle the changes we were doing to the DOM objects before it was done constructing them. But now that our script only executes after IE is completely done building the DOM tree, we can mess with the DOM tree as much as we want.