function getMaxHeight() {
	 var myHeight = 0;
   if( typeof( window.innerWidth ) == 'number' ) { myHeight = window.innerHeight; }
   else { if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
   	 { myHeight = document.documentElement.clientHeight; }
   else { if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
      { myHeight = document.body.clientHeight; }
   }
	}
	return myHeight;
}


function setMaxDivheight(Layer1, dheight) {
	if (document.getElementById(Layer1)) {
		document.getElementById(Layer1).style.height = dheight + 'px';
	}
}

window.onload = function() {
	setMaxDivheight('contents', (getMaxHeight() - 190));
};
window.onresize = function() {
	setMaxDivheight('contents', (getMaxHeight() - 190));
};