window.finishedloading = false;

window.runxload = function() {
	for (var i=0; i<window.queueload.length; i++)
		window.queueload[i]();
	if (window.queueload.length)
		Tools.alignColumns();
	window.queueload = [];
}

window.onload = function() {
	window.finishedloading = true;
	if ($("marquee-text"))
		Marquee.start($("marquee-text"));
	if (window.xload)
		window.xload();
	window.runxload();
	Tools.alignColumns();
}

window.queueload.push(function() {
	if (typeof swfobject != "undefined")
		swfobject.embedSWF('/img/mrs_anim.swf', "flashlogo", 44, 44, "9.0.0", "", { }, { wmode: "transparent" }, { });
});

window.queueload.push(function() {
	if ($("highlight-widget"))
		setInterval(function() {
			request.html(prefix+"highlights/widget/?excludehighlight="+$("highlight-widget-help").className, function(h) {
				dropAllElements($("highlight-widget"));
				$("highlight-widget").innerHTML = h;
			});
		}, 15000);
	if ($("left-dailymatch"))
		setInterval(function() {
			var ex = $("left-match-id") ? $("left-match-id").className : "";
			request.html(prefix+"dailymatch/widget/"+(ex?"?excludematch="+ex:""), function(h) {
				dropAllElements($("left-dailymatch"));
				$("left-dailymatch").innerHTML = h;
			});
		}, 12000);
});


