function posFooter(top, forcerID) {
	var pageHeight = 437;
	var marginHeight = 15;
	var PagePanel, FooterPanel, LHMPanel, LogoPanel
	var forcerHeight 
	var forcer
	
	forcer = document.getElementById(forcerID)
	if(top == null && forcer) top = forcer.offsetTop;

	if(document.getElementById(forcerID)) {
		if(forcer) forcerHeight = forcer.offsetHeight + top;

		if(pageHeight < forcerHeight + marginHeight){
			PagePanel = document.getElementById('pnlPagePanel');
			FooterPanel = document.getElementById('pnlFooterPanel');
			LHMPanel = document.getElementById('lhmPanel')
			LogoPanel = document.getElementById('pnlLogoPanel')

			if(PagePanel) PagePanel.style.height = forcerHeight + marginHeight;
			if(FooterPanel) FooterPanel.style.top = forcerHeight - 4 + marginHeight;
			if(LHMPanel) LHMPanel.style.height = forcerHeight - 4 + marginHeight - 43;
			if(LogoPanel) LogoPanel.style.top = forcerHeight - 4 + marginHeight - 47;
		}
	}
	document.getElementById('pnlFooterPanel').style.visibility = 'visible';
	document.body.style.backgroundColor = '#666666';
	document.getElementById('pnlPagePanel').style.borderBottom = '1px solid #000000';
	document.getElementById('pnlPagePanel').style.borderRight = '1px solid #000000';
}

function newWin( width, height, url, title, bCentered, x, y ) {
	newWin2=null;
	var Options = '';

	var strX = x.toString();
	var strY = y.toString();

	if ( bCentered )
	{
		strY = (screen.availHeight/2 - height/2 ).toString();
		strX = (screen.availWidth/2 - width/2 ).toString();
	}

	Options += "toolbar=no,width=" + width + ",height=" + height + ",left=" + strX;
	Options += ",top=" + strY + ",screenX=" + strX + ",screenY=" + strY +",resizable=yes,scrollbars=yes"

	newWin2 = window.open( url, title, Options );

	newWin2.focus();
	return newWin2;
}

function popupLargeImage(imageLocation, product) {
	imageLocation = imageLocation.slice(0, imageLocation.length - 5) + "l.jpg";
	newWin(550, 400, 'ImagePopup.aspx?img=' + imageLocation + '&prd=' + product, 'ImagePopup', true, 0, 0);
}