var	productWin;
var	WIDTH  = 600;
var	HEIGHT = 450;
var x = 100;
var y = 100;
/*
function	_openProduct( arg )
{
	if( productWin && !productWin.closed ) 
		productWin.close();
	if( screen ) {
		x = Math.round( (screen.availWidth - WIDTH) / 2) ;
		y = Math.round( (screen.availHeight - HEIGHT) / 2);
	}
	
	productWin = window.open( '../catalog/product.htms?'+arg, 'product','top='+y+',left='+x+',width='+WIDTH+',height='+HEIGHT+',resizable=no,scrollbars=yes' );
	return false;
}

function	_openWorks( arg )
{
	if( productWin && !productWin.closed ) 
		productWin.close();
	if( screen ) {
		x = Math.round( (screen.availWidth - WIDTH) / 2) ;
		y = Math.round( (screen.availHeight - HEIGHT) / 2);
	}
	
	productWin = window.open( '../catalog/works.htms?'+arg, 'works','top='+y+',left='+x+',width='+WIDTH+',height='+HEIGHT+',resizable=no,scrollbars=yes' );
	return false;
}
*/

var catWin;

function	openCatWin( arg )
{
	if( catWin && !catWin.closed ) 
		catWin.close();
	if( screen ) {
		x = Math.round( (screen.availWidth - WIDTH) / 2) ;
		y = Math.round( (screen.availHeight - HEIGHT) / 2);
	}
	
	catWin = window.open( arg, 'product','top='+y+',left='+x+',width='+WIDTH+',height='+HEIGHT+',resizable=no,scrollbars=yes' );
	return false;
}


function	openProduct( arg )
{
	openCatWin( '../catalog/product.htms?'+arg );
	return false;
}

function	openWorks( arg )
{
	openCatWin( '../catalog/works.htms?'+arg );
	return false;
}

