I've been using the well-loved 'addLoadEvent' function to run JS functions on page load for some years, without any problems at all. In a new site I'm trying to run TWO functions on load:
<script >
No problem in Firefox8, but I've got a problem in IE7 (and IE8, but not IE9). IE7 will run whichever of those functions I place first, and ignore the second.

'setDivBg' sets a coloured background on the included contents. It's different for every page as I want my client to see some alternatives. It's preferable that it runs before 'setSlideLinks' which is setting up eventhandlers for the slide-shows. But I need both to work.

Two things are different from my normal practice:
1. For the first time (for me) I've put parameters into the function calls in 'addLoadEvent', and
2. The script is placed at the bottom of an included 'page contents' file because the parameters for the 'setDivBg' function vary from page to page. Normally I place 'addLoadEvent' in the template header.
The 'addloadEvent' function is completely standard:
	function addLoadEvent(func) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
The site (still in development) may be seen here
I can't see why this should make IE7 choke, and I am continuing to investigate; maybe it's just one of those things about IE. Can anyone help here, please ?