/* Static variables */

var avoidElements = new Array('head','foot','topSpacer','bottomSpacing');

/* End static variables */



/* Standard function to give mCCWrapper the remaining window height if avoidElements is defined */

function autosize_mCCWrapper(){
	try { 
		var offsetHeight = 0;
		var windowHeight = window.getSize().y;
		avoidElements.each(function(el,i){
			offsetHeight += $(el).getSize().y;
		});
		var totalElementHeight = offsetHeight + $('mCC').getSize().y;
		if(totalElementHeight < windowHeight){
			var newHeight = windowHeight - offsetHeight;
			$('mCCWrapper').setStyle('height', newHeight+'px');
		}
	} 
	catch (e){ /* console.log(e);*/ }

	placeRightShim();
}


function placeRightShim(){ /* custom for this site */
	try {
		var newHeight = $('mCCWrapper').getSize().y;
		$('rightShim').setStyle('height',newHeight+'px');
	} catch (e){}
}
