////////////////////////////////////////////////////////////////////////////////
//NAME: sizeDivTwoCol
//
//PURPOSE: Sizes the target element according to the source element and sets
//         a margin between the two elements.
//
//DATA: n0/e0 - the name of the containing element
//      n1/e1 - the name of the target element
//      n2/e2 - the name of the source element
//      marg - the size of the margin around the elements
//      tmp - temporary variable to calculate the margin between elements
//
//NOTES: uses the padding property of the containing element and the margin 
//       property of the two contained elements to create a uniform margin 
//       around the contents of the containing element. 
////////////////////////////////////////////////////////////////////////////////
function fix(){
	var e1 = document.getElementById('leftframe');
	var e2 = document.getElementById('rightframe');
	var e3 = document.getElementById('container');
	var e4 = document.getElementById('sidebar');
	var e5 = document.getElementById('content');

	var e1Height = e1.clientHeight;
	var e2Height = e2.clientHeight;
	var e3Height = e3.clientHeight;
	var e4Height = e4.clientHeight;
	var e5Height = e5.clientHeight;
	var e3mod = e3Height%80;
	var ketchup = 80-e3mod;
	var pickle = e3.clientHeight+ketchup;

	/*
	if(e3mod > 0) {
		e3.style.height = e3.clientHeight + (80-e3mod) + "px"
	}
	*/
	e3.style.height = pickle + "px"


	if(e1Height < e3Height) {
		//sets the height of the target element based on the source element
		e1.style.height = e2.style.height = e3.clientHeight + "px";
	}
	else {
		e3.style.height = e1.clientHeight + "px";
	}

	if(e4Height < e5Height) {
		e5.style.height = e5.clientHeight + ketchup + "px"
		e4.style.height = e5.clientHeight + "px";
	}
	else {
		e4.style.height = e4.clientHeight + ketchup + "px"
		e5.style.height = e4.clientHeight + "px";
	}



}

