Jon Hughes wrote: > window.onload = WindowLoad(); > this runs WindowLoad() and then assigns the result to window.onload. you probably meant to say this: window.onload = function() { WindowLoad(); };