1 |
function popup(link) { |
function popup(link) { |
2 |
var target = 'popup'; |
var target = 'popup'; |
3 |
if (! link) link = this; |
var url = this.href; |
4 |
if (link.target) target = link.target; |
|
5 |
//alert("open "+link.href+" in "+target); |
if (link.href) { |
6 |
var popup_win = window.open(link.href,target,'width=400,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes'); |
if (link.target) target = link.target; |
7 |
|
url = link.href; |
8 |
|
} |
9 |
|
|
10 |
|
//alert("open "+url+" in "+target+" link:"+link+" this:"+this); |
11 |
|
|
12 |
|
var popup_win = window.open(url,target,'width=400,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes'); |
13 |
|
|
14 |
if (popup_win) { |
if (popup_win) { |
15 |
popup_win.moveTo((screen.width/2),(screen.height/2)-200); |
popup_win.moveTo((screen.width/2),(screen.height/2)-200); |
16 |
popup_win.focus(); |
popup_win.focus(); |
17 |
} |
} |
18 |
|
|
19 |
return false; |
return false; |
20 |
} |
} |