var objPopUp = null;
var popitem = null;

function openBackWin(thePath, imgWidth, imgHeight){
	newWidth = imgWidth + 80;
	newHeight = imgHeight + 80;
	window.open('http://ebgames.com/ebx/categories/products/ssWindow.asp?file_path='+thePath, 'ssWindow', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,location=no,resizable=yes,width='+newWidth+',height='+newHeight+',screenX=75,screenY=150');
	return true;
}

function openSSWin(thePath, sku, imgWidth, imgHeight)
{
newWidth = 480;
newHeight = 400;
window.open('http://ebgames.com/ebx/categories/products/flipBook.asp?file_path='+thePath+'&pf_id='+sku, 'flipBook', 'toolbar=no,directories=no,status=no,menubar=no,title=no,scrollbars=no,location=no,resizable=no,width='+newWidth+',height='+newHeight+',screenX=75,screenY=150,top=75,left=150');
return true;
}

function openShotsWin(Path)
{
newWidth = 480;
newHeight = 400;
window.open(Path, 'flipBook', 'toolbar=no,directories=no,status=no,menubar=no,title=no,scrollbars=no,location=no,resizable=no,width='+newWidth+',height='+newHeight+',screenX=75,screenY=150,top=75,left=150');
return true;
}

function screenShotsWindow(i, sList) {
url = "http://ebgames.com/product_screenshots.asp?image=" + i + "&image_list=" + sList;
window.open(url, "CtrlWindow", "toolbar=no,resizable=no,menubar=no,location=no,scrollbars=no,width=470,height=430");
return;
}

function openGuide(thePath){
	newWidth = 800;
	newHeight = 600;
	window.open(thePath, 'guide', 'toolbar=no,directories=no,status=no,menubar=yes,scrollbars=yes,location=no,resizable=yes,width='+newWidth+',height='+newHeight+',screenX=75,screenY=150');
	return true;
}

function popUp(event, objectID)
{
objPopTrig = document.getElementById(event);
objPopUp = document.getElementById(objectID);
xPos = objPopTrig.offsetLeft + 30;
yPos = objPopTrig.offsetTop + objPopTrig.offsetHeight + 60;
if (xPos + objPopUp.offsetWidth > document.body.clientWidth)
	xPos = xPos - objPopUp.offsetWidth
if (yPos + objPopUp.offsetHeight > document.body.clientHeight)
	yPos = yPos + objPopUp.offsetHeight - objPopTrig.offsetHeight;
objPopUp.style.left = xPos + 'px';
objPopUp.style.top = yPos + 'px';
objPopUp.style.visibility = 'visible';
popitem=objectID
}

function testpopUp(iId)
{
if (popitem != iId)
	{
	popHide()
	}
}

function popHide()
{
objPopUp.style.visibility = 'hidden';
objPopUp = null;
}