var oStyleSwitch = {
	mCheck : function() {
		var screenW = (document.body) ? document.body.clientWidth : innerWidth;
		var theStyle = (parseInt(screenW) > 1000) ? 'large' : 'small';
		var body = document.getElementsByTagName("body")[0];
		body.className = theStyle;
	}
}

var oHeightPairs = {
	"content" : {
		domino : "shadowborder",
		margin : 30
	} 
}

var oHeightMeasure = {
	mSetHeight : function() {
		if(window.navigator.userAgent.indexOf("MSIE ") > -1)
			return;
		for(var elm in oHeightPairs){
			var target = document.getElementById(elm);
			if(!target)
				continue;
			oElm = oHeightPairs[elm];
			var domino = document.getElementById(oElm.domino);
			if(!domino)
				continue;
			var height;
			
			try {
				height = document.getElementById(oElm.domino).offsetHeight;
				height = parseInt(height);
			}
			catch(exception){
				height = 0;
			}
			
			height += oElm.margin;
			target.style.height = height + "px;";
		}
	}
}

oDOMUtils.mAddEvent(window, "load", oStyleSwitch.mCheck, false);
oDOMUtils.mAddEvent(window, "resize", oStyleSwitch.mCheck, false);
oDOMUtils.mAddEvent(window, "load", oHeightMeasure.mSetHeight, false);
oDOMUtils.mAddEvent(window, "resize", oHeightMeasure.mSetHeight, false);
