//xAddEventListener(window,"load",positionVariableMenuItems);
//xAddEventListener(window,"resize",positionVariableMenuItems);
function positionVariableMenuItems()
{
	positionLeftMenu();
	positionFooter();
}


function positionLeftMenu()
{
//MOVE THE LEFT MENU, DEPENDING ON THE WIDTH OF THE BROWSER
						var leftMenu = document.getElementById('nav');
						if(xWidth(document) > 1024)
							leftMenu.style.paddingLeft = '310px';
						else
							leftMenu.style.paddingLeft = null;
}



function positionFooter()
{
	//document.write(xHeight(document.getElementById('content')) );
	var footer = document.getElementById('footer');

	var browserOffset =0;
//	if(!window.event) browserOffset=14;
//	else browserOffset=-36;


	var usedSpace = xHeight(document.getElementById('banner'))+xHeight(document.getElementById('nav'))+xHeight(document.getElementById('footer'))+browserOffset;
	var contentHeight = (xHeight(document)-usedSpace-40)


	if(contentHeight> xHeight(document.getElementById('content')))
	{
		//document.getElementById('content').style.height = contentHeight-15  +'px';
		footer.style.position = 'absolute';
		footer.style.width = '100%';
		footer.style.bottom = '0px';

	}
	else
	{
		footer.style.position = 'relative';
		footer.style.bottom = null;
	}

//EITHER OR, or menu will DISAPPEAR!!!!!!!!!
	footer.style.display = 'block';
//	footer.style.display = 'none';

}



/*
if(window.attachEvent)
{
	xAddEventListener(window,"load",setFooterWidth);
	xAddEventListener(window,"resize",setFooterWidth);
}
*/

function setFooterWidth()
{
	var footer = document.getElementById('footer');
		footer.style.left = '0px';
		footer.style.width = (xWidth(document) - 18) + 'px';
}
