///	<summary>Control all aspects of awards</summary>
///	<remarks>
///	Dependencies:
///		DHTML_lib.js
///	</remarks>
function Awards() {
	
}
		// Constants

Awards.MAX_COLUMNS	= 3;
Awards.MAX_ROWS		= 3;


		// Private variables
		
Awards.maxColumns	= Awards.MAX_COLUMNS;
Awards.maxRows		= Awards.MAX_ROWS;

		// Public Methods


///	<summary>Gets the max height for a particular row.</summary>
Awards.SetMaxRowHeight = function(index) {
			//get names for the div ids 
	var nameDivInfant = "infantProduct" + index;
	var nameDivToddler = "toddlerProduct" + index;
	var nameDivPreschool = "preschoolProduct" + index;
			//get the divs
	var divInfant = document.getElementById(nameDivInfant);
	var divToddler = document.getElementById(nameDivToddler);
	var divPreschool = document.getElementById(nameDivPreschool);
	
			//get div heights
	if ( divInfant.offsetHeight ) {
		var divInfantHeight = divInfant.offsetHeight;
	}
	else if ( divInfant.style.pixelHeight ) {
		var divInfantHeight = divInfant.style.pixelHeight;
	} 
	
	if ( divToddler.offsetHeight ) {
		var divToddlerHeight = divToddler.offsetHeight;
	}
	else if ( divToddler.style.pixelHeight ) {
		var divToddlerHeight = divToddler.style.pixelHeight;
	}

	if ( divPreschool.offsetHeight ) {
		var divPreschoolHeight = divPreschool.offsetHeight;
	}
	else if ( divInfant.style.pixelHeight ) {
		var divPreschoolHeight = divPreschool.style.pixelHeight;
	}

			//pick the max out of the columns
	var max1 = Math.max(divInfantHeight, divToddlerHeight);
	var maxHeight = Math.max(max1, divPreschoolHeight);

			//set the divs to max height
	divInfant.style.paddingBottom = (maxHeight - divInfantHeight) + "px";
	divToddler.style.paddingBottom = (maxHeight - divToddlerHeight) + "px";
	divPreschool.style.paddingBottom = (maxHeight - divPreschoolHeight) + "px";
}


///	<summary>Go through all the rows and set the max heights.</summary>
Awards.AlignDivs = function() {
	var i;
	for ( i = 0; i < Awards.maxRows; i++){
		Awards.SetMaxRowHeight(i);
	}
	
}
