
function maxNum(num1, num2)
{
	if (num1>num2)
		return num1;
	else
		return num2;
}

function positionElementsFront()
{
	// our elements have good base starting locations and offsets.  However, given that the genre navigation area
	//	could have significant flex in the Y dimension, we need to scoot the elements below it down to match the increase
	//	in size

	maxH = document.getElementById('GameList').offsetHeight;

	//theobj = document.getElementById('Favorites');
	//theobj.style.top = maxH+150;

	currTop = maxH+450;// + theobj.offsetHeight + 60; 

	document.getElementById('DotEvents').style.top = currTop;
	document.getElementById('TryNBuy').style.top = currTop;
	
	currTop += document.getElementById('TryNBuy').offsetHeight;
	
	currTop += 200;

//alert(currTop);

	// 550 is the pixel space taken by our static elements at the top
	// 90 is the space taken by the bottom banner ad
	document.getElementById('baseDiv').style.height = currTop;
	
	document.getElementById('footerDiv').style.top = -150;
	document.getElementById('bottomAd').style.top = -105;
	
	var isIE    = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	if (!isIE)
	{
		document.getElementById('GameList').style.right = 0;
		document.getElementById('MembersPanel').style.right = -21;
	}
	
	// take care of a growing DS member box overwriting the member panel
	//if (document.getElementById('MemberPanel') != null)
//	{
	//	var currHeight = document.getElementById('dotSpot').offsetHeight;
	//	document.getElementById('MemberPanel').style.top = 400 + (currHeight - 180);
//	}
}

function positionElementsProduct()
{
	baseH = document.getElementById('product_info').offsetHeight;
	baseH += document.getElementById('screenshots').offsetHeight;
	baseH += 130; //add 130 to cover other vertical space used on page, this should work for any number of rows.

	if (baseH>1500)
	{
		document.getElementById('baseContent').style.height = baseH; 
		document.getElementById('baseDiv').style.height = baseH;
	}
	else
	{
		document.getElementById('baseContent').style.height = 1500;
		document.getElementById('baseDiv').style.height = 1500;
	}
}