// Takes a function and adds it to this.onload.
function onload_append(func) {
	var t=this.onload;
	if(typeof(t) == "function") {
		// append to the previous onload function.
		this.onload=function() {
			t();
			func();
		}
	} else {
		// This is the first function to be assigned to onload.
		this.onload=func;
	}
}

window.onload_append=onload_append;
