occhio e croce ci dovresti essere, non ho capito
codice:
var x = Math.round( (wdt / 2) - (lar / 2) );
io lo calcolo diversamente.

Prova così:
codice:
function pop(a,w,h){
	var l=(screen.width-w)/2;
	var t=(screen.height-h)/2;
	var property="scrollbars=no,width="+w+",height="+h+",top="+t+",left="+l;
	var w=window.open(a,"_blank",property);
	return w;
}