window.onload = function() { setWindowHeight(); }
window.onresize = function() { setWindowHeight(); }

function setWindowHeight() {
   var height = 0;
   var width = 0;
   
   if (typeof(window.innerHeight) == 'number') {
      width = window.innerWidth;
      height = window.innerHeight;
   } else if (document.documentElement && document.documentElement.clientHeight) {
      height = document.documentElement.clientHeight;
   } else if (document.body && document.body.clientHeight) {
      height = document.body.clientHeight;
   }
   
   var offsetHeight = document.getElementById('container').offsetHeight;
   if (height > offsetHeight) {
      document.getElementById('container').style.height = height+'px';
   }
}

function toggleVisible(elm) {
   var elm = document.getElementById(elm);
	
	if (elm.style.display == 'none')
		elm.style.display = 'block';
	else
		elm.style.display = 'none';
	
	return;
}
