codice:
var larg, alt;

if (screen.width > 800) {
larg = 921;
alt = 691;
}
else if (screen.width == 800) {
larg = 720;
alt = 540;
}
else {
larg = 576;
alt = 432;
}
e nel window.open

codice:
window.open("pag.htm","","width="+larg+",height="+alt);