var popUpWin=0;

function popUpWindow(URLStr,width,height)
{
	var left		= 100;
	var top			= 100;
	
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

// -------------------------------------

function popUpImageWindow(phpfile,image,width,height)
{
	var left		= 100;
	var top			= 100;
	var w			= Number(width)+20;
	var h			= Number(height)+50;
	var url			= 'login/'+phpfile+'?img='+image+'&w='+width+'&h='+height;
	
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	popUpWin = open(url, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+w+',height='+h+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
