1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
customArgs = {};
customArgs.width = '800';
customArgs.height = '568.5';
customArgs.title = "Enspire";
var agt=navigator.userAgent.toLowerCase();
var is_opera = (agt.indexOf("opera") != -1);
var appVer = navigator.appVersion.toLowerCase();
var is_ie = ((appVer.indexOf('msie')!=-1) && (!is_opera));
var is_mac = (agt.indexOf("mac")!=-1);
var is_gecko = (agt.indexOf('gecko')!=-1);
function openAppWindow(url) {
if(url.indexOf("?") != -1) {
url = url + "&launched=true";
}
else {
url = url + "?launched=true";
}
var features = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,left=0,top=0';
if (is_ie) {
var width = (customArgs.width=="100%") ? (screen.availWidth-14) : customArgs.width;
var height = (customArgs.height=="100%") ? (screen.availHeight-38) : customArgs.height;
features += ',resizable=yes,width='+width+',height='+height;
}
else if(!(is_gecko || is_opera)) {
// do not allow resizing on netscape < 5 b/c resizing causes the page to reload (including the flash movie)
var swidth = (customArgs.width=="100%") ? ('outerWidth='+screen.availWidth) : ('width='+customArgs.width);
var sheight = (customArgs.height=="100%") ? ('outerHeight='+screen.availHeight) : ('height='+customArgs.height);
features += ',resizable=no,'+swidth+','+sheight;
}
else {
var swidth = (customArgs.width=="100%") ? ('outerWidth='+(is_mac ? (screen.availWidth-30) : screen.availWidth)) : ('width='+customArgs.width);
var sheight = (customArgs.height=="100%") ? ('outerHeight='+(is_mac ? (screen.availHeight-6) : screen.availHeight)) : ('height='+customArgs.height);
features += ',resizable=yes,'+swidth+','+sheight;
}
var w = window.open(url, "_blank", features);
}
|