function getFeaturesToCenterWindow(width,height) {
var left = parseInt((screen.availWidth/2) - (width/2));
var top = parseInt((screen.availHeight/2) - (height/2));
var windowFeatures = ("width="+ width +",height="+ height +",status,resizable,left="+ left +",top="+ top +",screenX=" + left + ",screenY=" + top);
return windowFeatures;
}
function abrirJanela(url,largura,altura){
var myWindow;
var features = getFeaturesToCenterWindow(largura,altura);
myWindow = window.open(url,'Nome Janela', features); /** ERRADO */
}
function getFeaturesToCenterWindow(width,height) {
var left = parseInt((screen.availWidth/2) - (width/2));
var top = parseInt((screen.availHeight/2) - (height/2));
var windowFeatures = ("width="+ width +",height="+ height +",status,resizable,left="+ left +",top="+ top +",screenX=" + left + ",screenY=" + top);
return windowFeatures;
}
function abrirJanela(url,largura,altura){
var myWindow;
var features = getFeaturesToCenterWindow(largura,altura);
myWindow = window.open(url,'NomeJanela', features); /** CORRETO */
}
Problema resolvido!