-
Notifications
You must be signed in to change notification settings - Fork 1
/
clientInformation.0026.js
885 lines (788 loc) · 35.2 KB
/
clientInformation.0026.js
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
//
// class.lang.Environ.js
//
Package("lang");
/**
* Establece variable globales de contexto y
* configurac$ion.
*/
public.Class.Environ = function () {
eval(lang);
with (private)
with (protected)
with (public)
with (static) {
//_____________________________________________________________________________________
// Usuario interno.
global.isInternal = null;
//_____________________________________________________________________________________
// Usuario de confianza
global.isTrusted = null;
//_____________________________________________________________________________________
// Current date.
global.$DATE = null;
//_____________________________________________________________________________________
// Charset actual.
global.$CHARSET = null;
//_____________________________________________________________________________________
// URL actual (http://ntwasdes/draw00/img/allianz.gif).
global.$URL = null;
//_____________________________________________________________________________________
// Protocolo (http:).
global.$PROTOCOL = null;
//_____________________________________________________________________________________
// Dominio (ntwasdes).
global.$DOMAIN = null;
//_____________________________________________________________________________________
// Domino + purto (ntwasdes:8080).
global.$HOST = null;
//_____________________________________________________________________________________
// Uniform Resource Folder (http://ntwasdes/draw00/img/).
global.$URF = null;
//_____________________________________________________________________________________
// Uniform Resource Name (allianz.gif).
global.$URN = null;
//_____________________________________________________________________________________
// Ruta completa de carpeta (/draw00/img).
global.$PATH = null;
//_____________________________________________________________________________________
// Name Space: main folder (/draw00).
global.$NS = null;
//_____________________________________________________________________________________
// Name Sub-Space: last folder ( /img).
global.$NSS = null;
//_____________________________________________________________________________________
// Configuraci$on de pantalla.
global.$SCREEN = null;
//_____________________________________________________________________________________
// Modo de conexi$on (lan, modem, offline, unknown).
global.$CONNECTION = null;
//_____________________________________________________________________________________
// Plataforma del sistema operativo.
global.$PLATFORM = null;
//_____________________________________________________________________________________
// Famila de la CPU.
global.$CPU = null;
//_____________________________________________________________________________________
// Indicador de Java habilitado.
global.$JAVA = null;
//_____________________________________________________________________________________
// Indicador de cookies habilitadas.
global.$COOKIES = null;
//_____________________________________________________________________________________
// Indicador de soporte Microsoft Active X Object.
global.$AXO = null;
//_____________________________________________________________________________________
// Versi$on de widgets.
global.$WIDGETS = null;
//_____________________________________________________________________________________
// Versi$on de SEA.
global.$SEA = null;
//_____________________________________________________________________________________
// Objeto proveedor de configuraci$on del navegador.
static.Object.clientCaps = null;
//_____________________________________________________________________________________
// Muestara una ventana con la lista de las variables
// de entorno (pulsando [ALT] + [¡].
private.showVariables = function () {
var oEvent = DOMEvent();
// [ALT] + '¡'
if (oEvent.altKey && oEvent.getKey() == 221) {
var sAux = "";
for (var Member in window)
if (Member.charAt(0) == "$" && Member.length > 1)
// Excluimos la funcion general de jquery
sAux += Member + "=" + window[Member] + "\n";
if (sAux != "") alert("\n" + sAux + "\n", 3);
}
return true;
};
//_____________________________________________________________________________________
// Establece variables de generales de entorno.
// En la siguiente lista, se muestran todas la variables de configuraci$on
// incluyendo las que se arrastran de P$agina en p$agina.
//
// $AGENT Si hay sesi$on, c$odigo de agente del usuario agente (por ejemplo 100)
// $AREA Si hay sesi$on, descripci$on del $area del usuario empleado
// $AXO Indicador de soporte de ActiveX (true o false)
// $BRANCH Si hay sesi$on, c$odigo de sucursal del usuario agente (por ejemplo 0105)
// $BROWSER Tipo de navegador:
// FF = Mozilla Firefox
// GG = Generic Gecko
// GM = Generic Mozilla
// IE = Internet Explorer
// CR = Chrome
// KM = K-Meleon
// KO = Konqueror
// MZ = Mozilla Firebird o Phoenix
// NS = Netscape
// OP = Opera
// PE = Pocket Explorer
// SF = Safari
// XX = Otros
// $BROWVER Versi$on del navegador
// $BROWRENDER Versi$on de la renderizaci$on del navegador (p.e. emulaci$on IE7 con IE8)
// $CHARSET Juego de caracteres actual (normalmente ISO-8859-1)
// $CN Si hay sesi$on, nombre corriente del usuario (Common Name)
// $COL Si hay sesi$on, c$odigo de colaborador del usuario agente (por ejemplo 0001)
// $COMPANY Si hay sesi$on, c$odigo de compañ$ia (por ejemplo 02)
// $CONNECTION Modo de conexi$on:
// lan = Red
// modem = Modem
// offline = Disco local
// unknown = Otros
// $CONTEXT Si hay sesi$on, contexto de la aplicaci$on:
// IN = Intrallianz
// EP = ePac
// $COOKIES Indicador de soporte de cookies (true o false)
// $COUNTRY Si hay sesi$on, pa$is del usuario (por ejemplo ES)
// $CPU Familia de la CPU:
// Intel: x86
// AMD: ia64
// Motorola: 68K, PPC
// Digital: Alpha
// Otros: XXX
// $DATE Fecha actual auto-actualizable
// $DEP Si hay sesi$on, descripci$on del departamento del usuario empleado
// $DIV Si hay sesi$on, descripci$on del la divisi$on del usuario empleado
// $DOMAIN Dominio actual (por ejemplo ntwasdes)
// $DOMW3C Indicador de soporte DOM W3C (true o false)
// $ENVIRON Si hay sesi$on, entorno de la aplicaci$on:
// DESA = Desarrollo
// INTE = Integraci$on
// PROD = Producci$on
// $HOST Dominio y puerto (por ejemplo ntwasdes:80)
// $IE Versi$on extendida del Internet Explorer (por ejemplo 6,0,2900,2180)
// $IP Si hay sesi$on, direcci$on IP de red (por ejemplo 100.1.226.3)
// $JAVA Indicador de soporte JAVA habilitado (true o false)
// $JS Versi$on del motor JavaScript (por ejemplo 1,2)
// $JWS Versi$on de la m$aquina virtual de JAVA Sun, Java Web Start (por ejemplo 1,5)
// $LANG Si hay sesi$on, idioma del usuario (por ejemplo es)
// $LIBURI URI de las librer$ias est$aticas (por ejemplo /AlllLibComu)
// $MACHINE Si hay sesi$on, nombre de m$aquina (por ejemplo AZ-640809)
// Si no hay sesi$on, la variable est$a informada en DESA e intranet y con Explorer.
// $MVM Versi$on de la m$aquina virtual de JAVA Microsoft , (por ejemplo 5,0,3810,0)
// $NS Carpeta del recuso o namespace (por ejemplo draw00)
// $NSS Subcarpeta del recurso so sub-namespace (por ejemplo /img)
// $OU Si hay sesi$on, colectivo al que pertenece el usuario empleado,
// Organization Unit (por ejemplo empleados)
// $PATCH Parches o paquetes de servicio del navegador (por ejemplo SP2)
// $PATH Carpeta completa (por ejemplo /draw00/img)
// $PLATFORM Plataforma del S.O.
// Windows: WinCE, Win16, Win32, Win64
// Macintosh: MacPPC, Mac68K
// Sun: SunOS
// Otros: XXX
// $PROTOCOL Protocolo de conexi$on (por ejemplo http:)
// $SCREEN Configuraci$on de la pantalla (por ejemplo 1280x1024x32)
// $SEA Si es una aplicaci$on SEA, versi$on del entorno SEA
// $SERVER Si hay sesi$on, nombre del servidor (por ejemplo ntwasp09)
// $SESSION Si hay sesi$on, identificaci$on de la sesi$on (JSESSION)
// $STYLE Nombre del archivo maestro de estilos CSS (por ejemplo allianz6.0)
// $TECHNOLOGY Tecnolog$ia del sistema:
// WVI = Windows Vista
// WS3 = Windows Server 2003
// WXP = Windows XP
// W2K = Windows 2000
// W40 = Windows NT 4.0
// WNT = Windows NT ( NT < 4.0)
// WME = Windows ME
// W98 = Windows 98 (1a y 2a edici$on)
// W95 = Windows 95
// WCE = Windows CE / Windows Mobile
// POS = PalmOS
// SUN = Sun Microsystems
// MAC = Macintosh
// LNX = Linux
// IRX = IRIX
// OS2 = OS/2
// XXX = Otros
// $TERMINAL Si hay sesi$on, direcci$on IP en base decimal (por ejemplo 6401E203)
// $TIMER Ventana del reloj general de sesi$on
// $URF Dominio y carpeta completa (por ejemplo http://ntwasdes/draw00/img/)
// $URL URL completa (por ejemplo http://ntwasdes/draw00/img/allianz.gif)
// $URN Nombre del recurso (por ejemplo allianz.gif)
// $USER Si hay sesi$on, nombre de usuario (por ejemplo orsiyes)
// $USERID Si hay sesi$on, identificador de usuario (por ejemplo un NIF. 12345678Z)
// $WIDGETS Si es una aplicaci$on con widgets, versi$on de los widgets
// $WINUSR Usuario windows, s$olo en DESA e intranet, con Explorer (por ejemplo orsiyes)
// $WINVER Versi$on numérica del sistema windows:
// WVI = 6.0
// WS3 = 5.2
// WXP = 5.1
// W2K = 5.0
// W40 = 4.0
// WNT = 3.0
// WME = 2.5
// W98 = 2.2
// W95 = 2.0
// WCE = 1.0
static.Void.setEnvironment = function () {
var sAux =
location.pathname.charAt(0) == "/"
? location.pathname
: "/" + location.pathname;
$PROTOCOL = location.protocol.toLowerCase();
$DOMAIN = location.hostname.toLowerCase();
$HOST = location.host.toLowerCase();
$URL = location.href;
$URN = sAux.substr(sAux.lastIndexOf("/") + 1);
$NS = sAux.substring(0, sAux.indexOf("/", 1));
$PATH = sAux.substring(0, sAux.lastIndexOf("/"));
$URF = $PROTOCOL + "/" + "/" + $HOST + $NS + "/";
$NSS =
$NS == $PATH ? $NS : $PATH.substr($PATH.lastIndexOf("/") + 1);
$OVERLOAD = clientCaps.uniqueNumber ? clientCaps.uniqueNumber : 0;
$CONNECTION = clientCaps.connectionType
? clientCaps.connectionType
: "unknown";
$PLATFORM = navigator.platform ? navigator.platform : "XXX";
$CPU = navigator.cpuClass ? navigator.cpuClass : "XXX";
$SCREEN =
screen.width + "x" + screen.height + "x" + screen.colorDepth;
$JAVA = navigator.javaEnabled();
$COOKIES =
typeof window.dialogArguments == "undefined"
? navigator.cookieEnabled
: true;
$WIDGETS = document.getElementById("widgetsVersion")
? document
.getElementById("widgetsVersion")
.content.replace(/\./g, ",")
: "0,0";
$SEA = document.getElementById("seaVersion")
? document
.getElementById("seaVersion")
.content.replace(/\./g, ",")
: "0,0";
try {
$CHARSET = document.charset
? document.charset.toUpperCase()
: document.characterSet.toUpperCase();
} catch (e) {
$CHARSET = "";
}
$AXO = isIE && activexof("Scripting.Dictionary") ? true : false;
$DATE = dateof(null, "@dd/@mm/@yyyy");
var oSrc = window.environment;
// Si no existeix el envion.$TIMER, sera ella mateixa
//
try {
var oAux = oSrc.$TIMER;
} catch (e) {
oSrc = self;
}
window.$TIMER = oSrc.$TIMER ? oSrc.$TIMER : null;
window.$USER = oSrc.$USER ? oSrc.$USER : "";
window.$CN = oSrc.$CN ? oSrc.$CN : "";
window.$IP = oSrc.$IP ? oSrc.$IP : "";
window.$SERVER = oSrc.$SERVER ? oSrc.$SERVER : "";
window.$SESSION = "";
window.$TERMINAL = oSrc.$TERMINAL ? oSrc.$TERMINAL : "";
//Support DOM W3C
window.$DOMW3C =
document.createElement != null && document.getElementById != null;
if (!oSrc.$WINUSR) {
if (isIE && (isIntra || isTrial)) {
var oAux = activexof("WScript.Network");
if (oAux) {
oSrc.$WINUSR = oAux.UserName; // Nombre local del usuario windows
oSrc.$MACHINE = oAux.ComputerName; // Nombre local de la maquina
}
}
}
window.$MACHINE = oSrc.$MACHINE ? oSrc.$MACHINE : "";
window.$WINUSR = oSrc.$WINUSR ? oSrc.$WINUSR : "";
if (window.$MACHINE != "") {
var iAux = window.$MACHINE.indexOf(".");
if (iAux != -1)
window.$MACHINE = window.$MACHINE.substring(0, iAux);
}
// Si no hay usuario, Not User
if (window.$USER == "") window.$USER = "NOTUSER";
// Si es desarrollo y no hay usuario, utilizar el del windows
if (isTrial && window.$USER == "NOTUSER" && window.$WINUSR != "")
window.$USER = window.$WINUSR.toUpperCase();
window.$USERID = oSrc.$USERID
? oSrc.$USERID
: oSrc.strEmpNIF
? oSrc.strEmpNIF
: "";
window.$COUNTRY = oSrc.$COUNTRY
? oSrc.$COUNTRY
: oSrc.pais
? oSrc.pais
: "";
window.$COMPANY = oSrc.$COMPANY
? oSrc.$COMPANY
: oSrc.codEmpresa
? oSrc.codEmpresa
: "";
window.$ENVIRON = oSrc.$ENVIRON
? oSrc.$ENVIRON
: oSrc.entorno
? oSrc.entorno
: "";
window.$CONTEXT = oSrc.$CONTEXT
? oSrc.$CONTEXT
: oSrc.APP
? oSrc.APP
: "";
// Problemas con la variable $LANG : redefinida en EPAc y SEA-Widgets
//
if (
typeof window.$LANG == "undefined" ||
window.$LANG.length == 0
) {
window.$LANG = oSrc.$LANG
? oSrc.$LANG
: oSrc.idioma
? oSrc.idioma
: "";
}
if (
typeof window.$LANGCOUNTRY == "undefined" ||
window.$LANGCOUNTRY.length == 0
) {
window.$LANGCOUNTRY = oSrc.$LANGCOUNTRY ? oSrc.$LANGCOUNTRY : "";
}
window.$AREA = oSrc.$AREA
? oSrc.$AREA
: oSrc.ALLar
? oSrc.ALLar
: "";
window.$DIV = oSrc.$DIV
? oSrc.$DIV
: oSrc.ALLdiv
? oSrc.ALLdiv
: "";
window.$DEP = oSrc.$DEP
? oSrc.$DEP
: oSrc.ALLdep
? oSrc.ALLdep
: "";
window.$OU = oSrc.$OU ? oSrc.$OU : oSrc.ALLcol ? oSrc.ALLcol : "";
window.$BRANCH = oSrc.$BRANCH
? oSrc.$BRANCH
: oSrc.sucursal
? oSrc.sucursal
: "";
window.$AGENT = oSrc.$AGENT
? oSrc.$AGENT
: oSrc.agente
? oSrc.agente
: "";
window.$COL = oSrc.$COL
? oSrc.$COL
: oSrc.colaborador
? oSrc.colaborador
: "";
if (window.$ENVIRON.length > 3)
window.$ENVIRON = window.$ENVIRON.substring(0, 4);
if (window.$TERMINAL == "" && window.$IP != "")
try {
var aAux = window.$IP.split(".");
aAux[0] = valueof(aAux[0]).toString(16);
aAux[1] = valueof(aAux[1]).toString(16);
aAux[2] = valueof(aAux[2]).toString(16);
aAux[3] = valueof(aAux[3]).toString(16);
window.$TERMINAL = (
fillof(aAux[0], "0>2") +
fillof(aAux[1], "0>2") +
fillof(aAux[2], "0>2") +
fillof(aAux[3], "0>2")
).toUpperCase();
} catch (e) {}
window.$CN = window.$CN.toUpperCase();
window.$DEP = window.$DEP.toUpperCase();
window.$DIV = window.$DIV.toUpperCase();
window.$AREA = window.$AREA.toUpperCase();
window.$OU = window.$OU.toUpperCase();
window.$COUNTRY = window.$COUNTRY.toUpperCase();
window.$STYLE = oSrc.$STYLE ? oSrc.$STYLE : "";
window.$PATCH = oSrc.$PATCH ? oSrc.$PATCH : getPatches();
window.$TECHNOLOGY = oSrc.$TECHNOLOGY
? oSrc.$TECHNOLOGY
: getTechnology();
window.$JWS = oSrc.$JWS ? oSrc.$JWS : getJavaWebStart();
// JS Engine version
setJSVersion();
window.$BROWSER = oSrc.$BROWSER;
if (window.$BROWSER == null) {
var sAux = getBrowser();
window.$BROWSER = sAux.substring(0, 2);
window.$BROWVER = sAux.substr(2); // .replace(/\./g,",");
}
window.$BROWVER = oSrc.$BROWVER;
if (window.$BROWVER == null) {
var sAux = getBrowser();
window.$BROWVER = sAux.substr(2);
}
window.$BROWRENDER = oSrc.$BROWRENDER;
if (window.$BROWRENDER == null) {
window.$BROWRENDER = renderBrowserVersion();
}
window.$MOBILE = oSrc.$MOBILE
? oSrc.$MOBILE
: getMobileTechnology();
window.$TABLET = oSrc.$TABLET
? oSrc.$TABLET
: getTabletTechnology();
window.$IE = oSrc.$IE;
if (window.$IE == null) {
window.$IE = "";
window.$MVM = "";
if (isIE && WINDOWS_VERSION)
try {
window.$IE = clientCaps.getComponentVersion(
WINDOWS_COMPONENT["IE"],
"componentID"
);
window.$MVM = clientCaps.getComponentVersion(
WINDOWS_COMPONENT["MVM"],
"componentID"
);
} catch (e) {}
}
window.$WINVER = oSrc.$WINVER
? oSrc.$WINVER
: getWindowsVersion(window.$TECHNOLOGY);
if (window.addEventListener)
window.addEventListener("load", getWidgetsEnviroOnLoad, false);
else window.attachEvent("onload", getWidgetsEnviroOnLoad);
};
//_____________________________________________________________________________________
// JavaScript engine version
private.Void.setJSVersion = function () {
if (!isReady)
document.write(
"<script language='JavaScript1.1'>$JS='1,1';</script>" +
"<script language='JavaScript1.2'>$JS='1,2';</script>" +
"<script language='JavaScript1.3'>$JS='1,3';</script>" +
"<script language='JavaScript1.4'>$JS='1,4';</script>" +
"<script language='JavaScript1.5'>$JS='1,5';</script>" +
"<script language='JavaScript1.6'>$JS='1,6';</script>" +
"<script language='JavaScript2.0'>$JS='2,0';</script>"
);
};
//_____________________________________________________________________________________
// Get browser type
private.String.getBrowser = function () {
var sUA = navigator.userAgent + " ";
var iAux = 0;
var sAux = "XX"; // unknown
var oAux = BROWSER_ID;
for (var Member in oAux) {
iAux = sUA.indexOf(Member);
if (iAux != -1) {
iAux = iAux + Member.length + 1;
sAux =
oAux[Member] + sUA.substring(iAux, sUA.indexOf(" ", iAux));
sAux = sAux.replace(/;/g, "");
break;
}
}
return sAux;
};
//_____________________________________________________________________________________
// Get rederer browser version
private.String.renderBrowserVersion = function () {
var iEngine = 0;
var iAux = $BROWVER; // version actual IE
if (document.documentMode) iAux = document.documentMode;
iEngine = parseInt(iAux);
if (isNaN(iEngine)) iEngine = iAux;
var sEngine = iEngine.toString();
if (sEngine.length > 3) sEngine = sEngine.substr(0, 3);
return sEngine;
};
//_____________________________________________________________________________________
// Get system Type
private.String.getTechnology = function () {
var sUA = navigator.userAgent + " ";
var sAux = "XXX"; // unknown
var cAux = SYSTEM_ID;
for (var Member in cAux) {
if (sUA.indexOf(Member) != -1) {
sAux = cAux[Member];
break;
}
}
return sAux;
};
//_____________________________________________________________________________________
// Get Widgets Page Type Style
static.Void.getWidgetsEnviroOnLoad = function () {
// Se ejecuta quant se ha carregat la pagina
//
var oSrc = window.environment;
// Si no existeix el envion.$TIMER, sera ella mateixa
//
try {
var oAux = oSrc.$TIMER;
} catch (e) {
oSrc = self;
}
// Modificamos el usuario, si estamos en una ventana emulando otro
// (p.e. login en intra con usuario generico)
var oEmuUser = document.getElementById("cellUserPromptHeaderArea");
if (oEmuUser != null) {
var sEmuUser =
oEmuUser.innerText != null
? oEmuUser.innerText
: oEmuUser.textContent;
if (typeof sEmuUser == "string" && sEmuUser.length > 0) {
window.$USER = trimof(sEmuUser);
}
}
if (typeof $STYLELINE == "undefined" || $STYLELINE.length == 0) {
$STYLELINE = getStyleLineByCssFile();
}
if (
typeof $PAGETYPESTYLE == "undefined" ||
$PAGETYPESTYLE.length == 0
) {
$PAGETYPESTYLE = getPageTypeStyle();
}
};
//_____________________________________________________________________________________
// Get Style Type by CSS File Name
static.String.getStyleLineByCssFile = function () {
var sRetCssStyle = "styleLine06";
var aStyleSheet = document.styleSheets;
for (var iAux = 0, iLen = aStyleSheet.length; iAux < iLen; iAux++) {
var sHRef = aStyleSheet[iAux].href;
if (sHRef) {
// pot ser que no existeixi si no es un fitxer : amb el tag style
var sNameCssFile = sHRef.toUpperCase();
if (sNameCssFile.indexOf("STYLE2010.CSS") > -1)
sRetCssStyle = "styleLine10";
}
}
return sRetCssStyle;
};
//_____________________________________________________________________________________
// Get Widgets Page Type Style
static.String.getPageTypeStyle = function () {
var sRetTypeStyle = "";
var aStyleSheet = document.styleSheets;
for (var iAux = 0, iLen = aStyleSheet.length; iAux < iLen; iAux++) {
var sHRef = aStyleSheet[iAux].href;
if (sHRef) {
// pot ser que no existeixi si no es un fitxer : amb el tag style
var iPosi = sHRef.indexOf("/gbl");
if (iPosi >= 0) {
var sHRefAux = sHRef.substr(iPosi + 4);
var iPosi = sHRefAux.indexOf(".");
if (iPosi > 0) sRetTypeStyle = sHRefAux.substr(0, iPosi);
else sRetTypeStyle = sHRefAux;
}
}
}
return sRetTypeStyle;
};
//_____________________________________________________________________________________
// Get Mobile Type
private.String.getMobileTechnology = function () {
var sUA = navigator.userAgent + " ";
var sAux = "NONE";
if (sUA.match(/mobile/gi) != null) {
sAux = "OTHER";
if (sUA.match(/(iphone|ipod|ipad)/gi) != null) sAux = "IPHONE";
if (sUA.match(/blackberry/gi) != null) sAux = "BLACKBERRY";
if (sUA.match(/android/gi) != null) sAux = "ANDROID";
}
return sAux;
};
//_____________________________________________________________________________________
// Get Tablet Type
private.String.getTabletTechnology = function () {
var sUA = navigator.userAgent + " ";
var sAux = "NONE";
if (sUA.match(/(xoom|tablet|kindle)/gi) != null) sAux = "OTHER";
if (sUA.match(/ipad/gi) != null) sAux = "IPAD";
if (sUA.match(/android/gi) != null) sAux = "ANDROID";
return sAux;
};
//_____________________________________________________________________________________
// Get windows system number version
private.Number.getWindowsVersion = function (String) {
var sTech = arguments[0];
var iUnknown = 0.0;
var cAux = WINDOWS_VERSION;
return cAux[sTech] ? cAux[sTech] : iUnknown;
};
//_____________________________________________________________________________________
// Browser patch
private.String.getPatches = function () {
var sAux = window.clientInformation
? window.clientInformation.appMinorVersion
: "";
if (!sAux) sAux = "";
if (sAux != "") {
var iAux = sAux.indexOf(";");
sAux = sAux.substr(iAux + 1).replace(/;/gim, " ");
}
return sAux;
};
//_____________________________________________________________________________________
// Sun Java Web Start (Java Virtual Machine)
private.String.getJavaWebStart = function () {
var sAux = "";
var cAux = JAVA_WEB_START;
if (isIE) {
for (var Member in cAux) {
if (activexof(Member)) {
sAux = cAux[Member];
break;
}
}
} else {
var Member = "Java Plug-in";
var aPlugins = navigator.plugins;
for (var Idx = 0, Len = aPlugins.length; Idx < Len; Idx++) {
sAux = aPlugins[Idx].description;
if (sAux.indexOf(Member) != -1) {
Len = Member.length + 1;
sAux = sAux.substring(Len, sAux.indexOf(" ", Len));
break;
}
}
}
return sAux;
};
//____________________________________________________________________________________
// Si estamos dentro del frame con una aplicaci$on de Sea-Widgets, cada vez que
// redimensionemos la ventana general de la apliaci$on, hemos de redimensionar
// el contenedor appArea
static.Boolean.isIERenderCompatible = function () {
var bRet = $BROWSER == "IE" && parseInt($BROWRENDER, 10) <= 7;
return bRet;
};
//_____________________________________________________________________________________
// Constructor.
// Sin argumentos.
private.constructor = new (function () {
Super();
clientCaps = document.html;
clientCaps.style.behavior = "url(#default#clientCaps)";
setEnvironment();
isInternal =
isTrial ||
$IP.indexOf("100.") == 0 ||
$IP.indexOf("192.168.") == 0;
isTrusted =
$AREA ==
"\x41\x52\x45\x41\x20\x4F\x52\x47\x41\x4E\x49" +
"\x5A\x2E\x20\x53\x49\x53\x54\x45\x4D\x41\x53" +
"\x20\x59\x20\x53\x45\x52\x56\x49\x43\x49\x4F\x53";
document.addEventListenerAllianz("keydown", showVariables, false);
})();
}
}; // end class
//________________________________________________________________________________________
//
Environ.BROWSER_ID = {
Chrome: "CR", // Chrome (se ha de posar primer que safari)
Konqueror: "KO", // Konqueror
MSPIE: "PE", // Pocket Explorer
Pocket: "PE", // Pocket Explorer
MSIE: "IE", // Internet Explorer
Microsoft: "IE", // Internet Explorer
Opera: "OP", // Opera
Netscape: "NS", // Netscape
Netscape6: "NS", // Netscape
Firefox: "FF", // Mozilla Firefox
Firebird: "MZ", // Mozilla Firebird
Phoenix: "MZ", // Mozilla Phoenix
Safari: "SF", // Safari
"K-Meleon": "KM", // K-Meleon
Gecko: "GG", // Generic Gecko
Mozilla: "GM", // Generic Moz
};
//________________________________________________________________________________________
//
Environ.SYSTEM_ID = {
"Windows 8": "W08", // Windows 8
"Windows NT 6.2": "W08", // Windows 8
"Windows 7": "W07", // Windows 7
"Windows NT 6.1": "W07", // Windows 7
"Windows Vista": "WVI", // Windows Vista
"Windows NT 6.0": "WVI", // Windows Vista
"Windows Server 2003": "WS3", // Windows Server 2003
"Windows NT 5.2": "WS3", // Windows Server 2003
"Windows XP": "WXP", // Windows XP
"Windows NT 5.1": "WXP", // Windows NT 5.1
"Windows 2000": "W2K", // Windows 2000
"Windows NT 5.0": "W2K", // Windows 2000
"Windows NT 4.0": "W40", // Windows NT
"Windows NT": "WNT", // Windows NT
WinNT: "WNT",
"Windows ME": "WME",
"Win 9x": "WME",
"Windows 98": "W98",
Win98: "W98",
"Windows 95": "W95",
Win95: "W95",
"Windows CE": "WCE",
SunOS: "SUN",
Ubuntu: "UBU",
Android: "AND",
Linux: "LNX",
Macintosh: "MAC",
"Mac OS": "MAC",
Mac_68K: "MAC",
Mac_PPC: "MAC",
Mac_PowerPC: "MAC",
"OS/2": "OS2",
PalmOS: "POS",
};
//________________________________________________________________________________________
//
Environ.WINDOWS_VERSION = {
WCE: 1.0, // Windows CE/Windows Mobile
W95: 2.0, // Windows 95
W98: 2.2, // Windows 98/Windows 98 SE
WME: 2.5, // Windows Mellenium
WNT: 3.0, // Windows NT >= 3.0
W40: 4.0, // Windows NT >= 4.0
W2K: 5.0, // Windows 2000
WXP: 5.1, // Windows XP
WS3: 5.2, // Windows Server 2003
WVI: 6.0, // Windows Vista
W07: 6.1, // Windows 7
W08: 6.2, // Windows 8
};
//________________________________________________________________________________________
//
Environ.WINDOWS_COMPONENT = {
IE: "{89820200-ECBD-11CF-8B85-00AA005B4383}", // Internet Explorer
MVM: "{08B0E5C0-4FCB-11CF-AAA5-00401C608500}", // Virtrual Machine
};
//________________________________________________________________________________________
//
Environ.JAVA_WEB_START = {
"JavaWebStart.isInstalled.1.6.0.0": "1,6",
"JavaWebStart.isInstalled.1.5.0.0": "1,5",
"JavaWebStart.isInstalled.1.5.0.0": "1,5",
"JavaWebStart.isInstalled.1.4.2.0": "1,4,2,0",
"JavaWebStart.isInstalled.1": "1,4,1,0",
"JavaWebStart.isInstalled.3": "1,3",
"JavaWebStart.isInstalled.2": "1,2",
"JavaWebStart.isInstalled": "1,0",
};
//_____________________________________________________________________________________
// Mostramos en el satuts de la ventana el contexto de la aplicaci$on
Environ.showContextStatus = function () {
var sContext = $NS;
if (sContext.length > 1) {
if (sContext.charAt(0) == "/") sContext = sContext.substr(1);
}
window.defaultStatus = sContext;
};
void new Environ();
window.addEventListenerAllianz("load", Environ.showContextStatus, false);
/*
page: http://www.allianznet.com.br/
url: https://www.allianznet.com.br/drwd00/js/class.lang.Environ.js
*/