// JavaScript Document


function fixBody()	{
	var lc = document.getElementById('leftContent');
	if(lc!=null)
		var lcoh = lc.offsetHeight;
	var rc = document.getElementById('rightContent');
	if(rc!=null)
		var rcoh = rc.offsetHeight;
	
	if(lc && rc)	{
		if(rcoh >= lcoh)	{
			lc.style.height = rcoh + "px";
		}
		if(rcoh < (lcoh + 50))	{
			if(rcoh >= saveMe)	{
				lc.style.height = rcoh + "px";
			}
			if(rcoh < saveMe)	{
				lc.style.height = saveMe + "px";
			}
			if(lcoh > saveMe)	{
				lc.style.height = lcoh + "px";
			}
		}
	}
}


function fixFooter()	{
	var dh = document.documentElement.clientHeight;
	var mc = document.getElementById('mainContent');
	if(mc!=null)
		var mcoh = mc.offsetHeight;
	var fc = document.getElementById('footerContent');
	if(fc!=null)
		var fcoh = fc.offsetHeight;
	
//	fc.style.height = 110 + "px";
	
//	alert("mcoh: " + mcoh);
//	alert("fcoh: " + fcoh);
//	alert("dh: " + dh);
//	alert("difference: " + (dh - mcoh));
		
	if((dh - mcoh) < fcoh)	{
		fc.style.height = 115 + "px";
	}
	if((dh - mcoh) >= fcoh)	{
		fc.style.height = (dh - mcoh) + "px";	
	}
}

window.onresize = fixFooter;


function toggleMe(id) {
	e = document.getElementById(id);
	he = document.getElementById("hide" + id);
	se = document.getElementById("show" + id);
	if (e.style.display == "none") {
		e.style.display = "inline";
		se.style.display = "none";
		he.style.display = "inline";
	} else {
		e.style.display = "none";
		he.style.display = "none";	
		se.style.display = "inline";
	}
}

function toggleBio(id) {
	e = document.getElementById(id);
	if (e.style.display == "none") {
		e.style.display = "inline";
	} else {
		e.style.display = "none";
	}
}

