Как вариант:
<a href="/blabla/" target="_blank">Link</a>
document.getElementsByTagName('a')[0].onmousedown = function() {
var scr_wdt = screen.width,
scr_hgt = screen.height,
win_wdt = (scr_wdt / 2) + 300,
win_hgt = (scr_hgt / 2) + 200;
this.href += "?width=" + win_wdt + "&height=" + win_hgt;
}
Или второй вариант:
<a href='/calc/index.php?step=1&TB_iframe=true&height=%(my_param_x)%&width=%(my_param_y)%' onmousedown='work();' rel='sexylightbox'>
function work() {
var scr_wdt = screen.width,
scr_hgt = screen.height,
win_wdt = (scr_wdt / 2) + 300,
win_hgt = (scr_hgt / 2) + 200,
my_params = {
my_param_x: win_wdt,
my_param_y: win_hgt
}, param_name;
for (param_name in my_params) {
this.href = this.href.replace('%(' + param_name + ')%', my_params[param_name]);
};
}