var newWin = '';

function openWin(uri,width,height)
{
	var x=((screen.width-width)/2);
	var y=((screen.height-height)/2)-50;
	newWin=window.open(uri,'','top='+y+',left='+x+',width='+width+',height='+height+',scrollable=no,resizable=no,toolbar=no,status=no,location=no');
	newWin.focus();
}

function popUp(url,width,height)
{
	if (!newWin.closed && newWin.location){
		newWin.focus;
	}
	else{
		openWin(url,width,height);
		if (!newWin.opener) {newWin.opener = self;}
	}
	if (window.focus) {newWin.focus();}
	return false;
}
