(Function (){
Var resolution = "resolution:" + window. screen. width + "*" + window. screen. height;
Alert (resolution );
})();
(Function (){
Var ua = window. navigator. userAgent;
Var osVersion = ua. split (";") [2];
Var osV = osVersion. substr (osVersion. length-3, 3 );
Var opName = "";
Switch (osV ){
Case "5.0 ":
OpName = "Win2000 ";
Break;
Case "5.1 ":
OpName = "WinXP ";
Break;
Case "5.2 ":
OpName = "Win2003 ";
Break;
Case "6.1 ":
OpName = "Win 7 ";
Break;
Default:
OpName = "Other ";
Break;
}
Alert ("Operating System:" + opName );
})();
(Function (){
Var Sys = {};
Var ua = navigator. userAgent. toLowerCase ();
Var s;
(S = ua. match (/msie ([\ d.] + )/))? Sys. ie = s [1]:
(S = ua. match (/firefox \/([\ d.] + )/))? Sys. firefox = s [1]:
(S = ua. match (/chrome \/([\ d.] + )/))? Sys. chrome = s [1]:
(S = ua. match (/opera. ([\ d.] + )/))? Sys. opera = s [1]:
(S = ua. match (/version \/([\ d.] +). * safari /))? Sys. safari = s [1]: 0;
If (SYS. ie)
Result = {type: "ie", Ver: SYS. ie };
Else if (SYS. Firefox)
Result = {type: "Firefox", Ver: SYS. Firefox };
Else if (SYS. Chrome)
Result = {type: "Chrome", Ver: SYS. Chrome };
Else if (SYS. Opera)
Result = {type: "Opera", Ver: SYS. Opera };
Else if (SYS. Safari)
Result = {type: "safari", Ver: SYS. Safari };
Else
Result = {type: "unknown", Ver: "unknown "};
// Var result = {"type": navigator. appname, "Ver": navigator. appversion };
Alert ("browser:" + result. Type + ", version:" + result. Ver );
})();
(Function (){
VaR C;
VaR CV = 16;
If (CV! = "Netscape ")
C = screen. colordepth;
Else
C = screen. pixeldepth;
VaR cs = C;
If (C = 4)
Cs = "4-digit 16-color ";
If (C = 8)
Cs = "8-digit 256 colors ";
If (C = 16)
Cs = "16-bit enhanced color ";
If (C> 16)
Cs = Cs + "real color ";
Alert (CS );
})();