function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

function bakAdjust() {
	if (!document.getElementsByTagName) return false;
	if (!document.getElementById) return false;
	if (!document.getElementById("maincontentsubcell")) return false;
	
	var mainContentTable = document.getElementById("maincontenttable");
	
	if (document.getElementById("leftnavcell")) {
		if (document.getElementById("rightnavcell")) {
			mainContentTable.setAttribute("class", "leftrightcol");
		} else {
			mainContentTable.setAttribute("class", "leftcol");
		}
	} else if (document.getElementById("rightnavcell")) {
		mainContentTable.setAttribute("class", "rightcol");
	}
}

addLoadEvent(bakAdjust);