trunk 20080912
[gitenigma.git] / data / htdocs / window.js
blobc31435f01bbeaf283e2b792b57d93a7baf20264c
1 function NewWindow(mypage, myname, w, h, scroll, timeout)
3         if (screen.width >= 800)
4         {
5                 var winl = (screen.width - w) / 2;
6                 var wint = (screen.height - h) / 2;
7                 winprops = 'height='+h+', width='+w+', top='+wint+', left='+winl+', scrollbars='+scroll+', resizable'
8                 win = window.open(mypage, myname, winprops)
9                 if (parseInt(navigator.appVersion) >= 4)
10                         win.window.focus();
11                 if (timeout > 0)
12                         win.window.setTimeout("close()", timeout);
13         }
14         else
15                 document.location = mypage;
18 function maximizeWindow()
20         top.window.moveTo(0, 0);
21         if (document.all)
22         {
23                 top.window.resizeTo(screen.availWidth, screen.availHeight);
24         }
25         else
26         {
27                 top.window.outerHeight = screen.availHeight;
28                 top.window.outerWidth = screen.availWidth;
29         }
30         top.window.focus();