// JavaScript Document
var minHeight = 550;

function getHeight(id)
{	
	var d = document.getElementById(id);
	var divHeight;
   if(d.offsetHeight) { divHeight=d.offsetHeight; }
   else if(d.style.pixelHeight){ divHeight=d.style.pixelHeight; }
   
   return divHeight;
} 

function setHeight(id, h)
{
	var e = document.getElementById(id);
	e.style.height = h + 'px';

}

function setContentHeight()
{
	var h = getHeight('colHeader');
	h += 5;
	setHeight('colHeader',(h));
	h = getHeight('colwhite') - h;
	h -= 7;
	setHeight('contentContainer',h);
}

function setContentContainer()
{
	var h = getHeight('colHeaderCell');
	var id = document.getElementById('colHeaderCell').parentNode.parentNode.parentNode.parentNode.getAttribute('id');
	var h2 = getHeight(id);
	h = h2 - h - 5;
	//if (h < minHeight) { h = minHeight; }
	setHeight('contentContainer',h);
}

function adjustColumnHeights()
{       document.getElementById('faqInnerContent').style.height = null; 
        var h1 = getHeight('faqInnerContent');
        var h2 = getHeight('homemenubar');
		if (h1 < h2) {
			setHeight('faqInnerContent', h2)
		}
}

function getBrowserHeight() {
 	var viewportheight;
 
	 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	 
	 if (typeof window.innerHeight != 'undefined')
	 {
	      viewportheight = window.innerHeight
	 }
	 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	
	 else if (typeof document.documentElement != 'undefined'
	     && typeof document.documentElement.clientHeight !=
	     'undefined' && document.documentElement.clientHeight != 0)
	 {
	       viewportheight = document.documentElement.clientHeight
	 }
	 
	 // older versions of IE
	 
	 else
	 {
	       viewportheight = document.getElementsByTagName('body')[0].clientHeight
	 }
	return(viewportheight);
}

function getBrowserWidth() {
 	var viewportWidth;
 
	 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	 
	 if (typeof window.innerWidth != 'undefined')
	 {
	      viewportheight = window.innerWidth
	 }
	 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	
	 else if (typeof document.documentElement != 'undefined'
	     && typeof document.documentElement.clientWidth !=
	     'undefined' && document.documentElement.clientWidth != 0)
	 {
	       viewportWidth = document.documentElement.clientWidth
	 }
	 
	 // older versions of IE
	 
	 else
	 {
	       viewportWidth = document.getElementsByTagName('body')[0].clientWidth
	 }
	return(viewportWidth);
}

