// Functions to be used with the 2-column, liquid layout with header and footer or 
// 2-column, fixed-width layout with header and footer at http://www.searchenginefriendlylayouts.com.
// This code may be freely distributed and used in any commercial or non-commercial application, as long as
// these comments are maintained.  All other comments may be removed.

function clearOld (oldDivName) {
	// hides a div and absolutely positions it outside of the viewable area of the page.
	var oldDiv = document.getElementById(oldDivName);
	oldDiv.style.visibility = 'hidden';
	oldDiv.style.overflow = 'hidden';
	oldDiv.style.display = 'none';
	oldDiv.style.top = '-2px';
	oldDiv.style.left = '-2px';
	oldDiv.style.width = '1px';
	oldDiv.style.height = '1px';
}

function replaceDivs(floatLeftDiv, absoluteLeftDiv, floatLeftDivBG, floatLeftDivBGColor, floatrightDiv, absoluterightDiv, floatrightDivBG, floatrightDivBGColor, leftWrapper, leftWrapperBG, rightWrapper, rightWrapperBG) {
	// This function replaces the contents of the floating left div with the contents of the absolutely positioned left div, followed by the same procedure with the corresponding right divs..
	var leftDiv = document.getElementById(floatLeftDiv);
	var oldLeftDiv = document.getElementById(absoluteLeftDiv);
	var leftHTML = oldLeftDiv.innerHTML;
	leftDiv.innerHTML = leftHTML;
	// clear the inner HTML of the absolutely positioned div and hide it to be safe.
	oldLeftDiv.innerHTML = null;
	clearOld (absoluteLeftDiv);
	var rightDiv = document.getElementById(floatrightDiv);
	var oldrightDiv = document.getElementById(absoluterightDiv);
	var rightHTML = oldrightDiv.innerHTML;
	rightDiv.innerHTML = rightHTML;
	// clear the inner HTML of the absolutely positioned div and hide it to be safe.
	oldrightDiv.innerHTML = null;
	clearOld (absoluterightDiv);
}