function getBrowserHeight() {
	if (window.innerHeight) {
		return window.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight != 0) {
		return document.documentElement.clientHeight;
	} else if (document.body) {
		return document.body.clientHeight;
	}	
	return 0;
};

function returnObjById(id) {
	if (document.getElementById)
		var returnVar = document.getElementById(id);
	else if (document.all)
		var returnVar = document.all[id];
	else if (document.layers)
		var returnVar = document.layers[id];
	return returnVar;
};
	
function contentAreaSize() {
	var browserHeight = getBrowserHeight();
	if (isPortfolio == true) {
		var contentAreaHeight = browserHeight - 140;	
		var portfolioWrap = returnObjById("portfoliowrap");
		var portfolioWrapHeight = browserHeight - 140;
		portfolioWrap.style.height = portfolioWrapHeight + "px";			
	} else if (isChildPage == true) {
		var contentAreaHeight = browserHeight - 160;		
	} else if (isParentPage == true) {
		var contentAreaHeight = browserHeight - 395;		
	} else {
		var contentAreaHeight = browserHeight - 365;		
	}
	var contentArea = returnObjById("contentarea");
	/*
	contentArea.setAttribute("style", "height:" + contentAreaHeight + "px");	
	contentArea.style.setAttribute("cssText", "height:100px"); 
	*/			
	if (contentAreaHeight >= minimumHeight) {	
		contentArea.style.height = contentAreaHeight + "px";
		contentArea.style.width = "755px";
		contentArea.style.overflow = "auto";
	}
};

window.onload = contentAreaSize; 
