153 |
$opts = array("scrollbar=no", "menu=no", "personal=no"); |
$opts = array("scrollbar=no", "menu=no", "personal=no"); |
154 |
// KLUDGY!!! I have to somehow include the window chrome (ie. |
// KLUDGY!!! I have to somehow include the window chrome (ie. |
155 |
// decorations: titlebar, borders...) when calculating |
// decorations: titlebar, borders...) when calculating |
156 |
/// width/height... |
// width/height... |
157 |
if ($w) array_push($opts, "width=".($w + 6)); |
if ($w) $w += 18; |
158 |
if ($h) array_push($opts, "height=".($h + 25)); |
if ($h) $h += 25; |
159 |
return "with (window.open(this.href, this.target, '".implode(',', $opts)."')) { }; return false;"; |
if ($w) array_push($opts, "width=$w"); |
160 |
|
if ($h) array_push($opts, "height=$h"); |
161 |
|
if (!$w) $w = 0; |
162 |
|
if (!$h) $h = 0; |
163 |
|
return "var tmp = window.open(this.href, this.target, '".implode(',', $opts)."'); if (tmp && tmp.moveTo) tmp.moveTo((screen.availWidth - $w) / 2, (screen.availHeight - $h) / 2); return false;"; |
164 |
} |
} |
165 |
|
|
166 |
// input functions (input, rinput) |
// input functions (input, rinput) |