foist
[fingerprinter.git] / javascript / plugin-detect-0.6.3.js
1 /* PluginDetect v0.6.3 [ onWindowLoaded getVersion Java(OTF&getInfo) QT DevalVR Shockwave Flash WMP Silverlight VLC ] by Eric Gerds www.pinlady.net/PluginDetect */ if(!PluginDetect){var PluginDetect={getNum:function(b,c){if(!this.num(b)){return null
2 }var a;
3 if(typeof c=="undefined"){a=/[\d][\d\.\_,-]*/.exec(b)
4 }else{a=(new RegExp(c)).exec(b)
5 }return a?a[0].replace(/[\.\_-]/g,","):null
6 },hasMimeType:function(c){if(PluginDetect.isIE){return null
7 }var b,a,d,e=c.constructor==String?[c]:c;
8 for(d=0;
9 d<e.length;
10 d++){b=navigator.mimeTypes[e[d]];
11 if(b&&b.enabledPlugin){a=b.enabledPlugin;
12 if(a.name||a.description){return b
13 }}}return null
14 },findNavPlugin:function(g,d){var a=g.constructor==String?g:g.join(".*"),e=d===false?"":"\\d",b,c=new RegExp(a+".*"+e+"|"+e+".*"+a,"i"),f=navigator.plugins;
15 for(b=0;
16 b<f.length;
17 b++){if(c.test(f[b].description)||c.test(f[b].name)){return f[b]
18 }}return null
19 },AXO:window.ActiveXObject,getAXO:function(b,a){var f=null,d,c=false;
20 try{f=new this.AXO(b);
21 c=true
22 }catch(d){}if(typeof a!="undefined"){delete f;
23 return c
24 }return f
25 },num:function(a){return(typeof a!="string"?false:(/\d/).test(a))
26 },compareNums:function(g,e){var d=this,c,b,a,f=window.parseInt;
27 if(!d.num(g)||!d.num(e)){return 0
28 }if(d.plugin&&d.plugin.compareNums){return d.plugin.compareNums(g,e)
29 }c=g.split(",");
30 b=e.split(",");
31 for(a=0;
32 a<Math.min(c.length,b.length);
33 a++){if(f(c[a],10)>f(b[a],10)){return 1
34 }if(f(c[a],10)<f(b[a],10)){return -1
35 }}return 0
36 },formatNum:function(b){if(!this.num(b)){return null
37 }var a,c=b.replace(/\s/g,"").replace(/[\.\_]/g,",").split(",").concat(["0","0","0","0"]);
38 for(a=0;
39 a<4;
40 a++){if(/^(0+)(.+)$/.test(c[a])){c[a]=RegExp.$2
41 }}if(!(/\d/).test(c[0])){c[0]="0"
42 }return c[0]+","+c[1]+","+c[2]+","+c[3]
43 },initScript:function(){var $=this,userAgent=navigator.userAgent;
44 $.isIE=
45 /*@cc_on!@*/
46 false;
47 $.IEver=$.isIE&&((/MSIE\s*(\d\.?\d*)/i).exec(userAgent))?parseFloat(RegExp.$1,10):-1;
48 $.ActiveXEnabled=false;
49 if($.isIE){var x,progid=["Msxml2.XMLHTTP","Msxml2.DOMDocument","Microsoft.XMLDOM","ShockwaveFlash.ShockwaveFlash","TDCCtl.TDCCtl","Shell.UIHelper","Scripting.Dictionary","wmplayer.ocx"];
50 for(x=0;
51 x<progid.length;
52 x++){if($.getAXO(progid[x],1)){$.ActiveXEnabled=true;
53 break
54 }}$.head=typeof document.getElementsByTagName!="undefined"?document.getElementsByTagName("head")[0]:null
55 }$.isGecko=!$.isIE&&typeof navigator.product=="string"&&(/Gecko/i).test(navigator.product)&&(/Gecko\s*\/\s*\d/i).test(userAgent)?true:false;
56 $.GeckoRV=$.isGecko?$.formatNum((/rv\s*\:\s*([\.\,\d]+)/i).test(userAgent)?RegExp.$1:"0.9"):null;
57 $.isSafari=!$.isIE&&(/Safari\s*\/\s*\d/i).test(userAgent)?true:false;
58 $.isChrome=(/Chrome\s*\/\s*\d/i).test(userAgent)?true:false;
59 $.onWindowLoaded(0)
60 },init:function(c,a){if(typeof c!="string"){return -3
61 }c=c.toLowerCase().replace(/\s/g,"");
62 var b=this,d;
63 if(typeof b[c]=="undefined"){return -3
64 }d=b[c];
65 b.plugin=d;
66 if(typeof d.installed=="undefined"||a==true){d.installed=null;
67 d.version=null;
68 d.version0=null;
69 d.getVersionDone=null;
70 d.$=b
71 }b.garbage=false;
72 if(b.isIE&&!b.ActiveXEnabled){if(b.plugin!=b.java){return -2
73 }}return 1
74 },isMinVersion:function(g,e,c,b){
75 return -3
76 },getVersion:function(e,b,a){
77 var d=PluginDetect,c=d.init(e),f;
78 if(c<0){return null
79 }f=d.plugin;
80 if(f.getVersionDone!=1){f.getVersion(b,a);
81 if(f.getVersionDone===null){f.getVersionDone=1
82 }}d.cleanup();
83 return(f.version||f.version0);
84 ;
85 return null
86 },getInfo:function(f,c,b){var a={};
87 ;
88 var e=PluginDetect,d=e.init(f),g;
89 if(d<0){return a
90 }g=e.plugin;
91 if(typeof g.getInfo!="undefined"){if(g.getVersionDone===null){e.getVersion(f,c,b)
92 }a=g.getInfo()
93 };
94 return a
95 },cleanup:function(){
96 var a=this;
97 if(a.garbage&&typeof window.CollectGarbage!="undefined"){window.CollectGarbage()
98 }
99 },isActiveXObject:function(b){
100 var d=this,a,g,f="/",c='<object width="1" height="1" style="display:none" '+d.plugin.getCodeBaseVersion(b)+">"+d.plugin.HTML+"<"+f+"object>";
101 if(d.head.firstChild){d.head.insertBefore(document.createElement("object"),d.head.firstChild)
102 }else{d.head.appendChild(document.createElement("object"))
103 }d.head.firstChild.outerHTML=c;
104 try{d.head.firstChild.classid=d.plugin.classID
105 }catch(g){}a=false;
106 try{if(d.head.firstChild.object){a=true
107 }}catch(g){}try{if(a&&d.head.firstChild.readyState<4){d.garbage=true
108 }}catch(g){}d.head.removeChild(d.head.firstChild);
109 return a;
110
111 },codebaseSearch:function(c){var e=this;
112 if(!e.ActiveXEnabled){return null
113 }if(typeof c!="undefined"){return e.isActiveXObject(c)
114 };
115 var j=[0,0,0,0],g,f,b=e.plugin.digits,i=function(k,m){var l=(k==0?m:j[0])+","+(k==1?m:j[1])+","+(k==2?m:j[2])+","+(k==3?m:j[3]);
116 return e.isActiveXObject(l)
117 };
118 var h,d,a=false;
119 for(g=0;
120 g<b.length;
121 g++){h=b[g]*2;
122 j[g]=0;
123 for(f=0;
124 f<20;
125 f++){if(h==1&&g>0&&a){break
126 }if(h-j[g]>1){d=Math.round((h+j[g])/2);
127 if(i(g,d)){j[g]=d;
128 a=true
129 }else{h=d
130 }}else{if(h-j[g]==1){h--;
131 if(!a&&i(g,h)){a=true
132 }break
133 }else{if(!a&&i(g,h)){a=true
134 }break
135 }}}if(!a){return null
136 }}return j.join(",");
137
138 },dummy1:0}
139 }PluginDetect.onDetectionDone=function(g,e,d,a){
140 return -1
141 };
142 PluginDetect.onWindowLoaded=function(c){
143 var b=PluginDetect,a=window;
144 if(b.EventWinLoad===true){}else{b.winLoaded=false;
145 b.EventWinLoad=true;
146 if(typeof a.addEventListener!="undefined"){a.addEventListener("load",b.runFuncs,false)
147 }else{if(typeof a.attachEvent!="undefined"){a.attachEvent("onload",b.runFuncs)
148 }else{if(typeof a.onload=="function"){b.funcs[b.funcs.length]=a.onload
149 }a.onload=b.runFuncs
150 }}}if(typeof c=="function"){b.funcs[b.funcs.length]=c
151 }
152 };
153 ;
154 PluginDetect.funcs=[0];
155 PluginDetect.runFuncs=function(){var b=PluginDetect,a;
156 b.winLoaded=true;
157 for(a=0;
158 a<b.funcs.length;
159 a++){if(typeof b.funcs[a]=="function"){b.funcs[a](b);
160 b.funcs[a]=null
161 }}};
162 ;
163 PluginDetect.quicktime={mimeType:["video/quicktime","application/x-quicktimeplayer","image/x-macpaint","image/x-quicktime"],progID:"QuickTimeCheckObject.QuickTimeCheck.1",progID0:"QuickTime.QuickTime",classID:"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",minIEver:7,HTML:'<param name="src" value="A14999.mov" /><param name="controller" value="false" />',getCodeBaseVersion:function(a){return'codebase="#version='+a+'"'
164 },digits:[8,64,16,0],clipTo3digits:function(f){if(f===null||typeof f=="undefined"){return null
165 }var e,d,h,g=this.$;
166 e=f.split(",");
167 if(g.compareNums(f,"7,60,0,0")<0&&g.compareNums(f,"7,50,0,0")>=0){d=e[0]+","+e[1].charAt(0)+","+e[1].charAt(1)+","+e[2]
168 }else{d=e[0]+","+e[1]+","+e[2]+","+e[3]
169 }h=d.split(",");
170 return h[0]+","+h[1]+","+h[2]+",0"
171 },getVersion:function(){var a=null,d,b=this.$,e=true;
172 if(!b.isIE){if(navigator.platform&&(/linux/i).test(navigator.platform)){e=false
173 }if(e){d=b.findNavPlugin(["QuickTime","(Plug-in|Plugin)"]);
174 if(d&&d.name&&b.hasMimeType(this.mimeType)){a=b.getNum(d.name)
175 }}this.installed=a?1:-1
176 }else{var c;
177 if(b.IEver>=this.minIEver&&b.getAXO(this.progID0,1)){a=b.codebaseSearch()
178 }else{c=b.getAXO(this.progID);
179 if(c&&c.QuickTimeVersion){a=c.QuickTimeVersion.toString(16);
180 a=a.charAt(0)+"."+a.charAt(1)+"."+a.charAt(2)
181 }}this.installed=a?1:(b.getAXO(this.progID0,1)?0:-1)
182 }this.version=this.clipTo3digits(b.formatNum(a))
183 }};
184 ;
185 PluginDetect.java={mimeType:"application/x-java-applet",classID:"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93",DTKclassID:"clsid:CAFEEFAC-DEC7-0000-0000-ABCDEFFEDCBA",DTKmimeType:"application/npruntime-scriptable-plugin;DeploymentToolkit",JavaVersions:[[1,9,2,25],[1,8,2,25],[1,7,2,25],[1,6,2,25],[1,5,2,25],[1,4,2,25],[1,3,1,25]],searchJavaPluginAXO:function(){var h=null,a=this,c=a.$,g=[],j=[1,5,0,14],i=[1,6,0,2],f=[1,3,1,0],e=[1,4,2,0],d=[1,5,0,7],b=false;
186 if(!c.ActiveXEnabled){return null
187 };
188 b=true;
189 ;
190 if(c.IEver>=a.minIEver){g=a.searchJavaAXO(i,i,b);
191 if(g.length>0&&b){g=a.searchJavaAXO(j,j,b)
192 }}else{
193 if(b){g=a.searchJavaAXO(d,d,true)
194 };
195 if(g.length==0){g=a.searchJavaAXO(f,e,false)
196 }}if(g.length>0){h=g[0]
197 }a.JavaPlugin_versions=[].concat(g);
198 return h
199 },searchJavaAXO:function(l,i,m){var n,f,h=this.$,p,k,a,e,g,j,b,q=[];
200 if(h.compareNums(l.join(","),i.join(","))>0){i=l
201 }i=h.formatNum(i.join(","));
202 var o,d="1,4,2,0",c="JavaPlugin."+l[0]+""+l[1]+""+l[2]+""+(l[3]>0?("_"+(l[3]<10?"0":"")+l[3]):"");
203 for(n=0;
204 n<this.JavaVersions.length;
205 n++){f=this.JavaVersions[n];
206 p="JavaPlugin."+f[0]+""+f[1];
207 g=f[0]+"."+f[1]+".";
208 for(a=f[2];
209 a>=0;
210 a--){b="JavaWebStart.isInstalled."+g+a+".0";
211 if(h.compareNums(f[0]+","+f[1]+","+a+",0",i)>=0&&!h.getAXO(b,1)){continue
212 }o=h.compareNums(f[0]+","+f[1]+","+a+",0",d)<0?true:false;
213 for(e=f[3];
214 e>=0;
215 e--){k=a+"_"+(e<10?"0"+e:e);
216 j=p+k;
217 if(h.getAXO(j,1)&&(o||h.getAXO(b,1))){q[q.length]=g+k;
218 if(!m){return q
219 }}if(j==c){return q
220 }}if(h.getAXO(p+a,1)&&(o||h.getAXO(b,1))){q[q.length]=g+a;
221 if(!m){return q
222 }}if(p+a==c){return q
223 }}}return q
224 },minIEver:7,getFromMimeType:function(a){var h,f,c=this.$,j=new RegExp(a),d,k,i={},e=0,b,g=[""];
225 for(h=0;
226 h<navigator.mimeTypes.length;
227 h++){k=navigator.mimeTypes[h];
228 if(j.test(k.type)&&k.enabledPlugin){k=k.type.substring(k.type.indexOf("=")+1,k.type.length);
229 d="a"+c.formatNum(k);
230 if(typeof i[d]=="undefined"){i[d]=k;
231 e++
232 }}}for(f=0;
233 f<e;
234 f++){b="0,0,0,0";
235 for(h in i){if(i[h]){d=h.substring(1,h.length);
236 if(c.compareNums(d,b)>0){b=d
237 }}}g[f]=i["a"+b];
238 i["a"+b]=null
239 }if(!(/windows|macintosh/i).test(navigator.userAgent)){g=[g[0]]
240 }return g
241 },queryJavaHandler:function(){var b=PluginDetect.java,a=window.java,c;
242 b.hasRun=true;
243 try{if(typeof a.lang!="undefined"&&typeof a.lang.System!="undefined"){b.value=[a.lang.System.getProperty("java.version")+" ",a.lang.System.getProperty("java.vendor")+" "]
244 }}catch(c){}},queryJava:function(){var c=this,d=c.$,b=navigator.userAgent,f;
245 if(typeof window.java!="undefined"&&navigator.javaEnabled()&&!c.hasRun){if(d.isGecko){if(d.hasMimeType("application/x-java-vm")){try{var g=document.createElement("div"),a=document.createEvent("HTMLEvents");
246 a.initEvent("focus",false,true);
247 g.addEventListener("focus",c.queryJavaHandler,false);
248 g.dispatchEvent(a)
249 }catch(f){}if(!c.hasRun){c.queryJavaHandler()
250 }}}else{if((/opera.9\.(0|1)/i).test(b)&&(/mac/i).test(b)){}else{if(!c.hasRun){c.queryJavaHandler()
251 }}}}return c.value
252 },forceVerifyTag:[],jar:[],VENDORS:["Sun Microsystems Inc.","Apple Computer, Inc."],init:function(){var a=this,b=a.$;
253 if(typeof a.app!="undefined"){a.delJavaApplets(b)
254 }a.hasRun=false;
255 a.value=[null,null];
256 a.useTag=[2,2,2];
257 a.app=[0,0,0,0,0,0];
258 a.appi=3;
259 a.queryDTKresult=null;
260 a.OTF=0;
261 a.BridgeResult=[[null,null],[null,null],[null,null]];
262 a.JavaActive=[0,0,0];
263 a.All_versions=[];
264 a.DeployTK_versions=[];
265 a.MimeType_versions=[];
266 a.JavaPlugin_versions=[];
267 a.funcs=[];
268 var c=a.NOTF;
269 if(c){c.$=b;
270 if(c.javaInterval){clearInterval(c.javaInterval)
271 }c.EventJavaReady=null;
272 c.javaInterval=null;
273 c.count=0;
274 c.intervalLength=250;
275 c.countMax=40
276 }a.lateDetection=b.winLoaded;
277 if(!a.lateDetection){b.onWindowLoaded(a.delJavaApplets)
278 }},getVersion:function(f,l){var h,d=this,g=d.$,j=null,n=null,e=null,c=navigator.javaEnabled();
279 if(d.getVersionDone===null){d.init()
280 }var k;
281 if(typeof l!="undefined"&&l.constructor==Array){for(k=0;
282 k<d.useTag.length;
283 k++){if(typeof l[k]=="number"){d.useTag[k]=l[k]
284 }}}for(k=0;
285 k<d.forceVerifyTag.length;
286 k++){d.useTag[k]=d.forceVerifyTag[k]
287 }if(typeof f!="undefined"){d.jar[d.jar.length]=f
288 }if(d.getVersionDone==0){if(!d.version||d.useAnyTag()){h=d.queryExternalApplet(f);
289 if(h[0]){e=h[0];
290 n=h[1]
291 }}d.EndGetVersion(e,n);
292 return
293 }var i=d.queryDeploymentToolKit();
294 if(typeof i=="string"&&i.length>0){j=i;
295 n=d.VENDORS[0]
296 }if(!g.isIE){var q,m,b,o,a;
297 a=g.hasMimeType(d.mimeType);
298 o=(a&&c)?true:false;
299 if(d.MimeType_versions.length==0&&a){h=d.getFromMimeType("application/x-java-applet.*jpi-version.*=");
300 if(h[0]!=""){if(!j){j=h[0]
301 }d.MimeType_versions=h
302 }}if(!j&&a){h="Java[^\\d]*Plug-in";
303 b=g.findNavPlugin(h);
304 if(b){h=new RegExp(h,"i");
305 q=h.test(b.description)?g.getNum(b.description):null;
306 m=h.test(b.name)?g.getNum(b.name):null;
307 if(q&&m){j=(g.compareNums(g.formatNum(q),g.formatNum(m))>=0)?q:m
308 }else{j=q||m
309 }}}if(!j&&a&&(/macintosh.*safari/i).test(navigator.userAgent)){b=g.findNavPlugin("Java.*\\d.*Plug-in.*Cocoa",false);
310 if(b){q=g.getNum(b.description);
311 if(q){j=q
312 }}}if(j){d.version0=j;
313 if(c){e=j
314 }}if(!e||d.useAnyTag()){b=d.queryExternalApplet(f);
315 if(b[0]){e=b[0];
316 n=b[1]
317 }}if(!e){b=d.queryJava();
318 if(b[0]){d.version0=b[0];
319 e=b[0];
320 n=b[1];
321 if(d.installed==-0.5){d.installed=0.5
322 }}}if(d.installed===null&&!e&&o&&!(/macintosh.*ppc/i).test(navigator.userAgent)){h=d.getFromMimeType("application/x-java-applet.*version.*=");
323 if(h[0]!=""){e=h[0]
324 }}if(!e&&o){if(/macintosh.*safari/i.test(navigator.userAgent)){if(d.installed===null){d.installed=0
325 }else{if(d.installed==-0.5){d.installed=0.5
326 }}}}}else{if(!j&&i!=-1){j=d.searchJavaPluginAXO();
327 if(j){n=d.VENDORS[0]
328 }}if(!j){d.JavaFix()
329 }if(j){d.version0=j;
330 if(c&&g.ActiveXEnabled){e=j
331 }}if(!e||d.useAnyTag()){h=d.queryExternalApplet(f);
332 if(h[0]){e=h[0];
333 n=h[1]
334 }}}if(d.installed===null){d.installed=e?1:(j?-0.2:-1)
335 }d.EndGetVersion(e,n)
336 },EndGetVersion:function(b,d){var a=this,c=a.$;
337 if(a.version0){a.version0=c.formatNum(c.getNum(a.version0))
338 }if(b){a.version=c.formatNum(c.getNum(b));
339 a.vendor=(typeof d=="string"?d:"")
340 }if(a.getVersionDone!=1){a.getVersionDone=0
341 }},queryDeploymentToolKit:function(){var d=this,g=d.$,i,b,h=null,a=null;
342 if((g.isGecko&&g.compareNums(g.GeckoRV,g.formatNum("1.6"))<=0)||g.isSafari||(g.isIE&&!g.ActiveXEnabled)){d.queryDTKresult=0
343 }if(d.queryDTKresult!==null){return d.queryDTKresult
344 }if(g.isIE&&g.IEver>=6){d.app[0]=g.instantiate("object",[],[]);
345 h=g.getObject(d.app[0])
346 }else{if(!g.isIE&&g.hasMimeType(d.DTKmimeType)){d.app[0]=g.instantiate("object",["type",d.DTKmimeType],[]);
347 h=g.getObject(d.app[0])
348 }}if(h){if(g.isIE&&g.IEver>=6){try{h.classid=d.DTKclassID
349 }catch(i){}}try{var c,f=h.jvms;
350 if(f){a=f.getLength();
351 if(typeof a=="number"){for(b=0;
352 b<a;
353 b++){c=f.get(a-1-b);
354 if(c){c=c.version;
355 if(g.getNum(c)){d.DeployTK_versions[b]=c
356 }}}}}}catch(i){}}g.hideObject(h);
357 d.queryDTKresult=d.DeployTK_versions.length>0?d.DeployTK_versions[0]:(a==0?-1:0);
358 return d.queryDTKresult
359 },queryExternalApplet:function(d){var c=this,e=c.$,h=c.BridgeResult,b=c.app,g=c.appi,a="&nbsp;&nbsp;&nbsp;&nbsp;";
360 if(typeof d!="string"||!(/\.jar\s*$/).test(d)){return[null,null]
361 }if(c.OTF<1){c.OTF=1
362 }if(!e.isIE){if((e.isGecko||e.isChrome)&&!e.hasMimeType(c.mimeType)&&!c.queryJava()[0]){return[null,null]
363 }}if(c.OTF<2){c.OTF=2
364 }if(!b[g]&&c.canUseObjectTag()&&c.canUseThisTag(0)){b[1]=e.instantiate("object",[],[],a);
365 b[g]=e.isIE?e.instantiate("object",["archive",d,"code","A.class","type",c.mimeType],["archive",d,"code","A.class","mayscript","true","scriptable","true"],a):e.instantiate("object",["archive",d,"classid","java:A.class","type",c.mimeType],["archive",d,"mayscript","true","scriptable","true"],a);
366 h[0]=[0,0];
367 c.query1Applet(g)
368 }if(!b[g+1]&&c.canUseAppletTag()&&c.canUseThisTag(1)){b[g+1]=e.instantiate("applet",["archive",d,"code","A.class","alt",a,"mayscript","true"],["mayscript","true"],a);
369 h[1]=[0,0];
370 c.query1Applet(g+1)
371 }if(e.isIE&&!b[g+2]&&c.canUseObjectTag()&&c.canUseThisTag(2)){b[g+2]=e.instantiate("object",["classid",c.classID],["archive",d,"code","A.class","mayscript","true","scriptable","true"],a);
372 h[2]=[0,0];
373 c.query1Applet(g+2)
374 };
375 var j,f=0;
376 for(j=0;
377 j<h.length;
378 j++){if(b[g+j]||c.canUseThisTag(j)){f++
379 }else{break
380 }}if(f==h.length){c.getVersionDone=1;
381 if(c.forceVerifyTag.length>0){c.getVersionDone=0
382 }}return c.getBR()
383 },canUseAppletTag:function(){return((!this.$.isIE||navigator.javaEnabled())?true:false)
384 },canUseObjectTag:function(){return((!this.$.isIE||this.$.ActiveXEnabled)?true:false)
385 },useAnyTag:function(){var b=this,a;
386 for(a=0;
387 a<b.useTag.length;
388 a++){if(b.canUseThisTag(a)){return true
389 }}return false
390 },canUseThisTag:function(c){var a=this,b=a.$;
391 if(a.useTag[c]==3){return true
392 }if(!a.version0||!navigator.javaEnabled()||(b.isIE&&!b.ActiveXEnabled)){if(a.useTag[c]==2){return true
393 }if(a.useTag[c]==1&&!a.getBR()[0]){return true
394 }}return false
395 },getBR:function(){var b=this.BridgeResult,a;
396 for(a=0;
397 a<b.length;
398 a++){if(b[a][0]){return[b[a][0],b[a][1]]
399 }}return[b[0][0],b[0][1]]
400 },delJavaApplets:function(b){var c=b.java.app,a;
401 for(a=c.length-1;
402 a>=0;
403 a--){b.uninstantiate(c[a])
404 }},query1Applet:function(g){var f,c=this,d=c.$,a=null,h=null,b=d.getObject(c.app[g],true);
405 try{if(b){a=b.getVersion()+" ";
406 h=b.getVendor()+" ";
407 if(d.num(a)){c.BridgeResult[g-c.appi]=[a,h];
408 d.hideObject(c.app[g])
409 }if(d.isIE&&a&&b.readyState!=4){d.garbage=true;
410 d.uninstantiate(c.app[g])
411 }}}catch(f){}},NOTF:{isJavaActive:function(){
412 }},append:function(e,d){for(var c=0;
413 c<d.length;
414 c++){e[e.length]=d[c]
415 }},getInfo:function(){var m={};
416 ;
417 var a=this,d=a.$,h,l=a.installed;
418 m={All_versions:[],DeployTK_versions:[],MimeType_versions:[],DeploymentToolkitPlugin:(a.queryDTKresult==0?false:true),vendor:(typeof a.vendor=="string"?a.vendor:""),OTF:(a.OTF<3?0:(a.OTF==3?1:2))};
419 var g=[null,null,null];
420 for(h=0;
421 h<a.BridgeResult.length;
422 h++){g[h]=a.BridgeResult[h][0]?1:(a.JavaActive[h]==1?0:(a.useTag[h]>=1&&a.OTF>=1&&a.OTF!=3&&!(h==2&&!d.isIE)&&(a.BridgeResult[h][0]!==null||(h==1&&!a.canUseAppletTag())||(h!=1&&!a.canUseObjectTag())||l==-0.2||l==-1)?-1:null))
423 }m.objectTag=g[0];
424 m.appletTag=g[1];
425 m.objectTagActiveX=g[2];
426 var c=m.All_versions,k=m.DeployTK_versions,f=m.MimeType_versions,b=a.JavaPlugin_versions;
427 a.append(k,a.DeployTK_versions);
428 a.append(f,a.MimeType_versions);
429 a.append(c,(k.length>0?k:(f.length>0?f:(b.length>0?b:(typeof a.version=="string"?[a.version]:[])))));
430 for(h=0;
431 h<c.length;
432 h++){c[h]=d.formatNum(d.getNum(c[h]))
433 }var i,e=null;
434 if(!d.isIE){i=f.length>0?d.hasMimeType(a.mimeType+";jpi-version="+f[0]):d.hasMimeType(a.mimeType);
435 if(i){e=i.enabledPlugin
436 }}m.name=e?e.name:"";
437 m.description=e?e.description:"";
438 var j=null;
439 if((l==0||l==1)&&m.vendor==""){if(/macintosh/i.test(navigator.userAgent)){j=a.VENDORS[1]
440 }else{if(!d.isIE&&(/windows/i).test(navigator.userAgent)){j=a.VENDORS[0]
441 }else{if(/linux/i.test(navigator.userAgent)){j=a.VENDORS[0]
442 }}}if(j){m.vendor=j
443 }};
444 return m
445 },JavaFix:function(){}};
446 ;
447 PluginDetect.devalvr={mimeType:"application/x-devalvrx",progID:"DevalVRXCtrl.DevalVRXCtrl.1",classID:"clsid:5D2CF9D0-113A-476B-986F-288B54571614",getVersion:function(){var a=null,g,c=this.$,f;
448 if(!c.isIE){g=c.findNavPlugin("DevalVR");
449 if(g&&g.name&&c.hasMimeType(this.mimeType)){a=g.description.split(" ")[3]
450 }this.installed=a?1:-1
451 }else{var b,h,d;
452 h=c.getAXO(this.progID,1);
453 if(h){b=c.instantiate("object",["classid",this.classID],["src",""]);
454 d=c.getObject(b);
455 if(d){try{if(d.pluginversion){a="00000000"+d.pluginversion.toString(16);
456 a=a.substr(a.length-8,8);
457 a=parseInt(a.substr(0,2),16)+","+parseInt(a.substr(2,2),16)+","+parseInt(a.substr(4,2),16)+","+parseInt(a.substr(6,2),16)
458 }}catch(f){}}c.uninstantiate(b)
459 }this.installed=a?1:(h?0:-1)
460 }this.version=c.formatNum(a)
461 }};
462 ;
463 PluginDetect.flash={mimeType:["application/x-shockwave-flash","application/futuresplash"],progID:"ShockwaveFlash.ShockwaveFlash",classID:"clsid:D27CDB6E-AE6D-11CF-96B8-444553540000",getVersion:function(){var c=function(i){if(!i){return null
464 }var e=/[\d][\d\,\.\s]*[rRdD]{0,1}[\d\,]*/.exec(i);
465 return e?e[0].replace(/[rRdD\.]/g,",").replace(/\s/g,""):null
466 };
467 var j,g=this.$,h,f,b=null,a=null,d=null;
468 if(!g.isIE){j=g.findNavPlugin("Flash");
469 if(j&&j.description&&g.hasMimeType(this.mimeType)){b=c(j.description)
470 }}else{for(f=15;
471 f>2;
472 f--){a=g.getAXO(this.progID+"."+f);
473 if(a){d=f.toString();
474 break
475 }}if(d=="6"){try{a.AllowScriptAccess="always"
476 }catch(h){return"6,0,21,0"
477 }}try{b=c(a.GetVariable("$version"))
478 }catch(h){}if(!b&&d){b=d
479 }}this.installed=b?1:-1;
480 this.version=g.formatNum(b);
481 return true
482 }};
483 ;
484 PluginDetect.shockwave={mimeType:"application/x-director",progID:"SWCtl.SWCtl",classID:"clsid:166B1BCA-3F9C-11CF-8075-444553540000",getVersion:function(){var a=null,b=null,f,d,c=this.$;
485 if(!c.isIE){d=c.findNavPlugin("Shockwave for Director");
486 if(d&&d.description&&c.hasMimeType(this.mimeType)){a=c.getNum(d.description)
487 }}else{try{b=c.getAXO(this.progID).ShockwaveVersion("")
488 }catch(f){}if(typeof b=="string"&&b.length>0){a=c.getNum(b)
489 }else{if(c.getAXO(this.progID+".8",1)){a="8"
490 }else{if(c.getAXO(this.progID+".7",1)){a="7"
491 }else{if(c.getAXO(this.progID+".1",1)){a="6"
492 }}}}}this.installed=a?1:-1;
493 this.version=c.formatNum(a)
494 }};
495 ;
496 PluginDetect.div=null;
497 PluginDetect.pluginSize=1;
498 PluginDetect.DOMbody=null;
499 PluginDetect.uninstantiate=function(a){var c,b=this;
500 if(!a){return
501 }try{if(a[0]&&a[0].firstChild){a[0].removeChild(a[0].firstChild)
502 }if(a[0]&&b.div){b.div.removeChild(a[0])
503 }if(b.div&&b.div.childNodes.length==0){b.div.parentNode.removeChild(b.div);
504 b.div=null;
505 if(b.DOMbody&&b.DOMbody.parentNode){b.DOMbody.parentNode.removeChild(b.DOMbody)
506 }b.DOMbody=null
507 }a[0]=null
508 }catch(c){}};
509 PluginDetect.getObject=function(b,a){var f,c=this,d=null;
510 try{if(b&&b[0]&&b[0].firstChild){d=b[0].firstChild
511 }}catch(f){}try{if(a&&d&&typeof d.focus!="undefined"&&typeof document.hasFocus!="undefined"&&!document.hasFocus()){d.focus()
512 }}catch(f){}return d
513 };
514 PluginDetect.getContainer=function(a){var c,b=null;
515 if(a&&a[0]){b=a[0]
516 }return b
517 };
518 PluginDetect.hideObject=function(a){var b=this.getObject(a);
519 if(b&&b.style){b.style.height="0"
520 }};
521 PluginDetect.instantiate=function(h,b,c,a){var j=function(d){var e=d.style;
522 if(!e){return
523 }e.border="0px";
524 e.padding="0px";
525 e.margin="0px";
526 e.fontSize=(g.pluginSize+3)+"px";
527 e.height=(g.pluginSize+3)+"px";
528 e.visibility="visible";
529 if(d.tagName&&d.tagName.toLowerCase()=="div"){e.width="100%";
530 e.display="block"
531 }else{if(d.tagName&&d.tagName.toLowerCase()=="span"){e.width=g.pluginSize+"px";
532 e.display="inline"
533 }}};
534 var k,l=document,g=this,p,i=(l.getElementsByTagName("body")[0]||l.body),o=l.createElement("span"),n,f,m="/";
535 if(typeof a=="undefined"){a=""
536 }p="<"+h+' width="'+g.pluginSize+'" height="'+g.pluginSize+'" ';
537 for(n=0;
538 n<b.length;
539 n=n+2){p+=b[n]+'="'+b[n+1]+'" '
540 }p+=">";
541 for(n=0;
542 n<c.length;
543 n=n+2){p+='<param name="'+c[n]+'" value="'+c[n+1]+'" />'
544 }p+=a+"<"+m+h+">";
545 if(!g.div){g.div=l.createElement("div");
546 f=l.getElementById("plugindetect");
547 if(f){j(f);
548 f.appendChild(g.div)
549 }else{if(i){try{if(i.firstChild&&typeof i.insertBefore!="undefined"){i.insertBefore(g.div,i.firstChild)
550 }else{i.appendChild(g.div)
551 }}catch(k){}}else{try{l.write('<div id="pd33993399">o<'+m+"div>");
552 i=(l.getElementsByTagName("body")[0]||l.body);
553 i.appendChild(g.div);
554 i.removeChild(l.getElementById("pd33993399"))
555 }catch(k){try{g.DOMbody=l.createElement("body");
556 l.getElementsByTagName("html")[0].appendChild(g.DOMbody);
557 g.DOMbody.appendChild(g.div)
558 }catch(k){}}}}j(g.div)
559 }if(g.div&&g.div.parentNode&&g.div.parentNode.parentNode){g.div.appendChild(o);
560 try{o.innerHTML=p
561 }catch(k){}j(o);
562 return[o]
563 }return[null]
564 };
565 ;
566 PluginDetect.windowsmediaplayer={mimeType:["application/x-mplayer2","application/asx"],progID:"wmplayer.ocx",classID:"clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6",getVersion:function(){var a=null,e=this.$,b=null;
567 this.installed=-1;
568 if(!e.isIE){if(e.hasMimeType(this.mimeType)){if(e.findNavPlugin(["Windows","Media","(Plug-in|Plugin)"],false)||e.findNavPlugin(["Flip4Mac","Windows","Media"],false)){this.installed=0
569 }var d=e.isGecko&&e.compareNums(e.GeckoRV,e.formatNum("1.8"))<0;
570 if(!d&&e.findNavPlugin(["Windows","Media","Firefox Plugin"],false)){var c=e.instantiate("object",["type",this.mimeType[0]],[]),f=e.getObject(c);
571 if(f){a=f.versionInfo
572 }e.uninstantiate(c)
573 }}}else{b=e.getAXO(this.progID);
574 if(b){a=b.versionInfo
575 }}if(a){this.installed=1
576 }this.version=e.formatNum(a)
577 }};
578 ;
579 PluginDetect.silverlight={mimeType:"application/x-silverlight",progID:"AgControl.AgControl",digits:[9,20,9,12,31],getVersion:function(){var c=this.$,j=document,g=null,b=null,f=false;
580 if(!c.isIE){var a=[null,null],e=c.findNavPlugin("Silverlight Plug-in",false),h=c.isGecko&&c.compareNums(c.GeckoRV,c.formatNum("1.6"))<=0;
581 if(e&&c.hasMimeType(this.mimeType)){g=c.formatNum(e.description);
582 if(g){p=g.split(",");
583 if(parseInt(p[2],10)>=30226&&parseInt(p[0],10)<2){p[0]="2"
584 }g=p.join(",")
585 }if(c.isGecko&&!h){f=true
586 }if(!f&&!h&&g){a=c.instantiate("object",["type",this.mimeType],[]);
587 b=c.getObject(a);
588 if(b){if(typeof b.IsVersionSupported!="undefined"){f=true
589 }if(!f){b.data="data:"+this.mimeType+",";
590 if(typeof b.IsVersionSupported!="undefined"){f=true
591 }}}c.uninstantiate(a)
592 }}}else{b=c.getAXO(this.progID);
593 var p=[1,0,1,1,1],l,k,o,i=function(d){return(d<10?"0":"")+d.toString()
594 },m=function(q,d,s,t,r){return(q+"."+d+"."+s+i(t)+i(r)+".0")
595 },n=function(d,s){var q,r=m((d==0?s:p[0]),(d==1?s:p[1]),(d==2?s:p[2]),(d==3?s:p[3]),(d==4?s:p[4]));
596 try{return b.IsVersionSupported(r)
597 }catch(q){}return false
598 };
599 if(b&&typeof b.IsVersionSupported!="undefined"){for(l=0;
600 l<this.digits.length;
601 l++){o=p[l];
602 for(k=o+(l==0?0:1);
603 k<=this.digits[l];
604 k++){if(n(l,k)){f=true;
605 p[l]=k
606 }else{break
607 }}if(!f){break
608 }}if(f){g=m(p[0],p[1],p[2],p[3],p[4])
609 }}}this.installed=f?1:-1;
610 this.version=c.formatNum(g)
611 }};
612 ;
613 PluginDetect.vlc={mimeType:"application/x-vlc-plugin",progID:"VideoLAN.VLCPlugin",compareNums:function(d,c){var j=d.split(","),h=c.split(","),g,b,a,f,e,i;
614 for(g=0;
615 g<Math.min(j.length,h.length);
616 g++){i=/([\d]+)([a-z]?)/.test(j[g]);
617 b=parseInt(RegExp.$1,10);
618 f=(g==2&&RegExp.$2.length>0)?RegExp.$2.charCodeAt(0):-1;
619 i=/([\d]+)([a-z]?)/.test(h[g]);
620 a=parseInt(RegExp.$1,10);
621 e=(g==2&&RegExp.$2.length>0)?RegExp.$2.charCodeAt(0):-1;
622 if(b!=a){return(b>a?1:-1)
623 }if(g==2&&f!=e){return(f>e?1:-1)
624 }}return 0
625 },getVersion:function(){var b=this.$,d,a=null,c;
626 if(!b.isIE){if(b.hasMimeType(this.mimeType)){d=b.findNavPlugin(["VLC","(Plug-in|Plugin)"],false);
627 if(d&&d.description){a=b.getNum(d.description,"[\\d][\\d\\.]*[a-z]*")
628 }}this.installed=a?1:-1
629 }else{d=b.getAXO(this.progID);
630 if(d){try{a=b.getNum(d.VersionInfo,"[\\d][\\d\\.]*[a-z]*")
631 }catch(c){}}this.installed=d?1:-1
632 }this.version=b.formatNum(a)
633 }};
634 ;
635 PluginDetect.initScript();
636