
// Popup window routines

// is browser sufficiently advanced for true W3C DOM scripting ?
var W3CDOM;

if (document.getElementById && document.createElement && document.childNodes)
	W3CDOM = true;
else
	W3CDOM = false;


var popUpWin=0;
var screenW, screenH;
var popX=150, popY=100, popW=425, popH=450;
var popWwide=525, popHwide=525;
var popWtall=425, popHtall=600;


	if (W3CDOM)
	{
		screenW = screen.width;
		screenH = screen.height;
		popX = (screenW / 2) - (popW / 2);
		popY = (screenH / 2) - (popH / 2) - 25;
	}


var strImagesPath = "images/products/";

var strImageProdName = "";


function PopWin(URLStr)
{
	OpenPopWin(URLStr,popX,popY,popW,popH)
}


function PopWinWide(URLStr)
{
	OpenPopWin(URLStr,popX,popY,popWwide,popHwide)
}


function PopWinTall(URLStr)
{
	OpenPopWin(URLStr,popX,popY,popWtall,popHtall)
}


function OpenPopWin(URLStr, left, top, width, height)
{
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}


function CloseWin()
{
	window.close();
}
