BrowserVersion_JS
1| /*
2| Project: browserVersion_js.js
3| Version: 1.3.0.1
4| Name: Keith Gallistel
5|
6| Requires: vista_deathclock_js, eventsManager.js, JSUtility.js
7|
8| Change log 1.3.0.1:
9| Date:2021-10-31
10| -Fixed a long standing 'Uncaught TypeError' that I found out about when I was fixing another problem with my website.
11|
12| Change log 1.3:
13| Date: 2011-09-29
14| -Changed the way message is triggered on webpage.
15| -Created CallTest function.
16| -Created Control Panel area with basic set of variables.
17| -BrowserTest function and OSTest function now centralize results in global variables. This ensures that BrowserLoad function and OSLoad function don't have to recall and extract results from BrowserTest function and OSTest function multiple times.
18| -Created a general recognition for Microsoft offering experimental browser versions like IE10.
19| -Updated Vista OS section to show a Vista Death Countdown Clock before April 10, 2012, 11:59:59 PM and an obsolete message after April 10, 2012, 11:59:59 PM.
20| -Created vista_deathclock_js.js JavaScript script to run Vista Death Countdown Clock.
21| -Created JSUtility.js JavaScript script with the following functions: getElementsByClass(), getExternalStyle(), and setStyleHack(). getElementsByClass() has existed before, but I always bundled it with other functions.
22| -Created Mozilla Aurora image for new experimental message.
23|
24| Change log 1.2:
25| Date: 2011-04-01
26| -Removed Windows Server warnings. Those are pointless as messages most likely going
27| to be viewed by people with Windows OSs not Windows Servers.
28| -Updated IE9 message and IE9 Compatibility Mode message.
29| -Some small clean up like adding a target="_blank" to the links in the IE9 message and IE9 Compatibility Mode message.
30|
31| Change log 1.11:
32| Date: 2010-10-29
33| -A simple script performance improvement: replaced multiple "document.write()"
34| with a "var" and one "document.write()".
35|
36| Change log 1.1:
37| Date: 2010-10-13
38| -Added this comment at the top.
39| -Added support for IE8 Compatibility Mode and IE9 Compatibility Mode.
40|
41| Change log 1.0:
42| Date: 2010-07-04
43| -First release.
44| */
45|
46| /* *************************************
47| CONTROL PANEL BEGINS
48| ************************************* */
49| /*
50| This array includes all the versions of IE that a message should appear for. If '6' is listed then script will test against IE6.
51|
52| example: var IEArray = new Array(6,7,8,9,10);
53| */
54| var IEArray = new Array(6,7,8,9,10);
55|
56| /*
57| This array includes all the versions of Windows that a message should appear for. If '5.0' is listed then script will test against Windows 2000.
58|
59| Versions:
60| 5.0 = Windows 2000
61| 5.1 = Windows XP
62| 5.2 = Windows XP x64
63| 6.0 = Windows Vista
64| 6.1 = Windows 7
65| 6.2 = Windows 8
66|
67| example: var OSArray = new Array (5.0,5.1,5.2,6.0,6.1,6.2);
68| */
69| var OSArray = new Array (5.0,5.1,5.2,6.0,6.1,6.2);
70|
71| /*
72| Show the browser message.
73| */
74| var IEBool = true;
75|
76| /*
77| Show the OS message.
78| */
79| var OSBool = true;
80|
81| /* *************************************
82| CONTROL PANEL ENDS
83| ************************************* */
84|
85| var strSpaces = "";
86|
87| var IENum = 0;
88| var IETRNum = 0;
89| var OSNum = 0;
90|
91| /*
92| This function test which browser and OS a user has and then based on switches set and versions in arrays, it
93| displays the appropriate message.
94| jsFileLocation: This is the location of the scripts folder and images folder. "" means that webpage is on the same level as scripts folder and images folder, "../" means webpage is one level down from scripts folder and images folder, "../../" means webpage is two levels down from scripts folder and images folder, etc. Also, if scripts file is buried one level down (ex. "resources/"), this string will also handle that as well.
95| brb: 'true' (no quotes) to display browser message. 'false' (no quotes) to hide browser message.
96| osb: 'true' (no quotes) to display OS message. 'false' (no quotes) to hide OS message.
97| */
98| function CallTest(jsFileLocation, brb, osb)
99| {
100| strSpaces = jsFileLocation;
101| IEBool = brb;
102| OSBool = osb;
103|
104| BrowserTest();
105| OSTest();
106|
107| if(IEBool)
108| {
109| BrowserLoad();
110| }
111|
112| if(OSBool)
113| {
114| OSLoad();
115| }
116| }
117|
118| //This function tests to see if the browser is Internet Explorer and then what version if it is Internet Explorer.
119| function BrowserTest()
120| {
121| var userAgent = navigator.userAgent;
122|
123| var MSIEOffset = userAgent.indexOf("MSIE ");
124|
125| var TridentOffset = userAgent.indexOf("Trident/");
126|
127| var pIEfloater = "";
128| var pTrfloater = "";
129| var BrString = "";
130|
131| if(MSIEOffset != -1)
132| {
133| var startIE = MSIEOffset + 5;
134| var endIE = userAgent.indexOf(";", MSIEOffset);
135|
136| var subNumIE = userAgent.substring(startIE, endIE);
137|
138| pIEfloater = parseFloat(subNumIE);
139|
140| if(TridentOffset != -1)
141| {
142| var startTr = TridentOffset + 8;
143| var endTr = userAgent.indexOf(")", TridentOffset);
144|
145| var subNumTr = userAgent.substring(startTr, endTr);
146|
147| pTrfloater = parseFloat(subNumTr);
148|
149| IENum = pIEfloater;
150| IETRNum = pTrfloater;
151| }
152| else
153| {
154| IENum = pIEfloater;
155| IETRNum = 0;
156| }
157| }
158| else
159| {
160| IENum = 0;
161| IETRNum = 0;
162| }
163| }
164|
165| //This function tests to see if the browser is Windows and then what version if it is Windows.
166| function OSTest()
167| {
168| var userAgent = navigator.userAgent;
169|
170| var MSOSOffset = userAgent.indexOf("Windows NT ");
171|
172| var pfloater = "";
173|
174| if(MSOSOffset != -1)
175| {
176| var start = MSOSOffset + 11;
177| var end = userAgent.indexOf(";", MSOSOffset);
178|
179| var subNum = userAgent.substring(start, end);
180|
181| pfloater = parseFloat(subNum);
182|
183| OSNum = pfloater;
184| }
185| else
186| {
187| OSNum = 0;
188| }
189| }
190|
191| //This function creates the browser message.
192| function BrowserLoad()
193| {
194| var BTIE = IENum;
195|
196| var BTTr = IETRNum;
197|
198| var OSVal = OSNum;
199|
200| var BrowserNum = 0;
201|
202| var CountIE = IEArray.length;
203|
204| var i = 0;
205|
206| for(i = 0; i < CountIE; i++)
207| {
208| if(IEArray[i] == BTIE)
209| {
210| BrowserNum = IEArray[i];
211| }
212| }
213|
214| if(6 > BTIE && 0 != BTIE)
215| {
216| if(5.0 <= OSVal)
217| {
218| var fiveMsgVal = "<div class=\"alert\">\n";
219| fiveMsgVal += "<h1>ALERT! Your Browser is OBSOLETE!!!</h1>\n";
220| fiveMsgVal += "<p>I see you're using a version of Internet Explorer older than Internet Explorer 6.</p>\n";
221| fiveMsgVal += "<p>Your version of Internet Explorer is clearly from the last century. Fortunately, the underlying operating system looks like it is new enough to accept an upgrade.</p>\n";
222| fiveMsgVal += "<p>I recommend an upgrade to Mozilla Firefox.</p>\n";
223| fiveMsgVal += "<div class=\"spacer\"></div>\n";
224| fiveMsgVal += "<div class=\"storageb\">\n";
225| fiveMsgVal += "<div class=\"flLeft\">\n";
226| fiveMsgVal += "<p>Firefox has:</p>\n <ul>\n<li>Tab support</li>\n<li>Strong security protection</li>\n<li>Strong privacy protection</li>\n<li>Solid JavaScript speed</li>\n<li>HTML 5 support</li>\n</ul>";
227| fiveMsgVal += "</div>\n";
228| fiveMsgVal += "<div class=\"flRight\">\n";
229| fiveMsgVal += "<p>Click on the button to upgrade now:</p>\n";
230| fiveMsgVal += "<div class=\"bLogo\">\n";
231| fiveMsgVal += "<a href=\"http://www.getfirefox.com\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-firefox-alert.jpg\" width=\"144\" height=\"50\" alt=\"Click here to get Firefox browser.\" style=\"border:0;\"></a>\n";
232| fiveMsgVal += "<p class=\"smallfont\">(Link opens in a new window.)</p>\n";
233| fiveMsgVal += "</div>\n";
234| fiveMsgVal += "</div>\n";
235| fiveMsgVal += "</div>\n";
236| fiveMsgVal += "<div class=\"spacer\"> </div>\n";
237| fiveMsgVal += "</div>";
238| document.write(fiveMsgVal);
239| }
240| else
241| {
242| var OldMsgVal = "<table border=\"3\" bgcolor=\"black\">\n";
243| OldMsgVal += "<tr>\n<td bgcolor=\"red\">\n";
244| OldMsgVal += "<h1>ALERT! Your Browser is OBSOLETE!!!</h1>\n";
245| OldMsgVal += "<p>I see you're using an Internet Explorer version older than Internet Explorer 6. Sadly, your computer's operating system is too old to accept a modern browser upgrade.</p>\n";
246| OldMsgVal += "<p>It is time to buy a new computer.</p>\n";
247| OldMsgVal += "</td>\n</tr>\n</table>\n";
248| document.write(OldMsgVal);
249| }
250|
251| }
252|
253| if(6 == BrowserNum)
254| {
255| var SixMsgVal = "<div class=\"alert\">\n";
256| SixMsgVal += "<h1>ALERT! Your Browser is OBSOLETE!!!</h1>\n";
257| SixMsgVal += "<p>I see you're using Internet Explorer 6.</p>\n";
258| SixMsgVal += "<p>Internet Explorer 6 is not supported by this website or many others. Even Microsoft won't support Internet Explorer 6 with its latest web applications. Security protection is nonexistent and exploits are very well known. Furthermore, Internet Explorer 6 has only partial standards support that is horribly bug-ridden. Finally, Internet Explorer 6 has lackluster PNG image support that doesn't support transparency leaving PNG images with odd color patches and misshapen.</p>\n";
259| SixMsgVal += "<p>I recommend an upgrade to Mozilla Firefox.</p>\n";
260| SixMsgVal += "<div class=\"spacer\"></div>\n";
261| SixMsgVal += "<div class=\"storageb\">\n";
262| SixMsgVal += "<div class=\"flLeft\">\n";
263| SixMsgVal += "<p>Firefox has:</p>\n <ul>\n<li>Tab support</li>\n<li>Strong security protection</li>\n<li>Strong privacy protection</li>\n<li>Solid JavaScript speed</li>\n<li>HTML 5 support</li>\n</ul>";
264| SixMsgVal += "</div>\n";
265| SixMsgVal += "<div class=\"flRight\">\n";
266| SixMsgVal += "<p>Click on the button to upgrade now:</p>\n";
267| SixMsgVal += "<div class=\"bLogo\">\n";
268| SixMsgVal += "<a href=\"http://www.getfirefox.com\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-firefox-alert.jpg\" width=\"144\" height=\"50\" alt=\"Click here to get Firefox browser.\" style=\"border:0;\"></a>\n";
269| SixMsgVal += "<p class=\"smallfont\">(Link opens in a new window.)</p>\n";
270| SixMsgVal += "</div>\n";
271| SixMsgVal += "</div>\n";
272| SixMsgVal += "</div>\n";
273| SixMsgVal += "<div class=\"spacer\"> </div>\n";
274| SixMsgVal += "</div>";
275| document.write(SixMsgVal);
276| }
277|
278| if(7 == BrowserNum)
279| {
280| if(4 == BTTr)
281| {
282| var FourTRMsgVal = "<div class=\"warning\">\n";
283| FourTRMsgVal += "<h1>WARNING! You Are Using a Legacy Browser!!!</h1>\n";
284| FourTRMsgVal += "<p>I see you're using Internet Explorer 8 in Compatibility Mode.</p>\n";
285| FourTRMsgVal += "<p>Just to let you know that my website works without Compatibility Mode on. I don't recommend you use that old non-standard Internet Explorer mode at all.</p>\n";
286| FourTRMsgVal += "<p>Your browser is one generation out-of-date along with being very slow and not completely standard compliant. Microsoft has left Internet Explorer 8 with nearly the same Web 1.0 JavaScript engine as the past two versions. This was good around 1999-2001 with repeating animations, but bad for using any modern web application like Gmail. Furthermore, Internet Explorer 8 doesn't recognize all modern standards meaning that webpages don't always look or function as intended.</p>\n";
287| FourTRMsgVal += "<p>I recommend an upgrade to Mozilla Firefox.</p>\n";
288| FourTRMsgVal += "<div class=\"spacer\"></div>\n";
289| FourTRMsgVal += "<div class=\"storageb\">\n";
290| FourTRMsgVal += "<div class=\"flLeft\">\n";
291| FourTRMsgVal += "<p>Firefox has:</p>\n <ul>\n<li>Solid JavaScript speed</li>\n<li>HTML 5 support</li>\n<li>Strong privacy protection</li>\n</ul>\n";
292| FourTRMsgVal += "</div>\n";
293| FourTRMsgVal += "<div class=\"flRight\">\n";
294| FourTRMsgVal += "<p>Click on the button to upgrade now:</p>\n";
295| FourTRMsgVal += "<div class=\"bLogo\">\n";
296| FourTRMsgVal += "<a href=\"http://www.getfirefox.com\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-firefox-warning.jpg\" width=\"144\" height=\"50\" alt=\"Click here to get Firefox browser.\" style=\"border:0;\"></a>\n";
297| FourTRMsgVal += "<p class=\"smallfont\">(Link opens in a new window.)</p>\n";
298| FourTRMsgVal += "</div>\n";
299| FourTRMsgVal += "</div>\n";
300| FourTRMsgVal += "</div>\n";
301| FourTRMsgVal += "<div class=\"spacer\"> </div>\n";
302| FourTRMsgVal += "</div>";
303| document.write(FourTRMsgVal);
304| }
305| else if(5 == BTTr)
306| {
307| var FiveTRMsgVal = "<div class=\"notice\">\n";
308| FiveTRMsgVal += "<h1>Notice! Your browser is Not Modern!</h1>\n";
309| FiveTRMsgVal += "<p>I see you're using Internet Explorer 9 in Compatibility Mode.</p>\n";
310| FiveTRMsgVal += "<p>Just to let you know that my website works without Compatibility Mode on. I don't recommend you use that old non-standard Internet Explorer mode at all.</p>\n";
311| FiveTRMsgVal += "<p>Internet Explorer 9 is fastest, safest, most standards compliant browser Microsoft has made. This would be an accomplishment if the comparison wasn't to <abbr title=\"Internet Explorer 6\">IE6</abbr>. According to <a href=\"http://caniuse.com/\" target=\"_blank\">When Can I Use...</a> Web Standards Compatibility Table, Firefox 4 scores 86% while Internet Explorer 9 scores 59%, which measures up quite favorably to the <strong>Two Year Old</strong> Firefox 3.5's score of 57%. According to <a href=\"http://beta.html5test.com/\" target=\"_blank\">The HTML5 Test (beta)</a> Score Chart, Firefox 4 scores 255 points plus 9 bonus points while Internet Explorer 9 scores 130 points plus 5 bonus points, which measures slightly worse than the <strong>Two Year Old</strong> Firefox 3.5's score of 142 points plus 4 bonus points.</p>\n";
312| FiveTRMsgVal += "<p>I recommend an upgrade to Mozilla Firefox.</p>\n";
313| FiveTRMsgVal += "<div class=\"spacer\"></div>\n";
314| FiveTRMsgVal += "<div class=\"storageb\">\n";
315| FiveTRMsgVal += "<div class=\"flLeft\">\n";
316| FiveTRMsgVal += "<p>Firefox has:</p>\n <ul>\n<li>HTML 5 Forms (validation/CSS 3 selectors)</li>\n<li>SMIL (SVG) Animations</li>\n<li>WebGL (3D Standard)</li>\n</ul>\n";
317| FiveTRMsgVal += "</div>\n";
318| FiveTRMsgVal += "<div class=\"flRight\">\n";
319| FiveTRMsgVal += "<p>Click on the button to upgrade now:</p>\n";
320| FiveTRMsgVal += "<div class=\"bLogo\">\n";
321| FiveTRMsgVal += "<a href=\"http://www.getfirefox.com\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-firefox-notice.jpg\" width=\"144\" height=\"50\" alt=\"Click here to get Firefox browser.\" style=\"border:0;\"></a>\n";
322| FiveTRMsgVal += "<p class=\"smallfont\">(Link opens in a new window.)</p>\n";
323| FiveTRMsgVal += "</div>\n";
324| FiveTRMsgVal += "</div>\n";
325| FiveTRMsgVal += "</div>\n";
326| FiveTRMsgVal += "<div class=\"spacer\"> </div>\n";
327| FiveTRMsgVal += "</div>";
328| document.write(FiveTRMsgVal);
329| }
330| else if(5 < BTTr)
331| {
332| var cBrowserNum = BTTr + 4;
333| var SixTRMsgVal = "<div class=\"bluenote\">\n";
334| SixTRMsgVal += "<h1>Your Browser is Experimental!!!</h1>\n";
335| SixTRMsgVal += "<p>I see you're using Internet Explorer " + cBrowserNum + " in Compatibility Mode.</p>\n";
336| SixTRMsgVal += "<p>Just to let you know that my website works without Compatibility Mode on. I don't recommend you use that old non-standard Internet Explorer mode at all.</p>\n";
337| SixTRMsgVal += "<p>Internet Explorer " + cBrowserNum + " is Microsoft's next attempt catch up with modern browsers.</p>\n";
338| SixTRMsgVal += "<p>I recommend an upgrade to Mozilla Aurora.</p>\n";
339| SixTRMsgVal += "<div class=\"spacer\"></div>\n";
340| SixTRMsgVal += "<div class=\"storageb\">\n";
341| SixTRMsgVal += "<div class=\"flLeft\">\n";
342| SixTRMsgVal += "<p>Aurora has:</p>\n <ul>\n<li>Bleeding edge HTML 5 support</li>\n<li>Weekly updates</li>\n<li>Latest platform features</li>\n</ul>\n";
343| SixTRMsgVal += "</div>\n";
344| SixTRMsgVal += "<div class=\"flRight\">\n";
345| SixTRMsgVal += "<p>Click on the button to upgrade now:</p>\n";
346| SixTRMsgVal += "<div class=\"bLogo\">\n";
347| SixTRMsgVal += "<a href=\"https://www.mozilla.com/en-US/firefox/channel/\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-aurora-blue.jpg\" width=\"144\" height=\"50\" alt=\"Click here to get Firefox browser.\" style=\"border:0;\"></a>\n";
348| SixTRMsgVal += "<p class=\"smallfont\">(Link opens in a new window.)</p>\n";
349| SixTRMsgVal += "</div>\n";
350| SixTRMsgVal += "</div>\n";
351| SixTRMsgVal += "</div>\n";
352| SixTRMsgVal += "<div class=\"spacer\"> </div>\n";
353| SixTRMsgVal += "</div>";
354| document.write(SixTRMsgVal);
355| }
356| else
357| {
358| var NoTRMsgVal = "<div class=\"alert\">\n";
359| NoTRMsgVal += "<h1>ALERT! Your Browser is OBSOLETE!!!</h1>\n";
360| NoTRMsgVal += "<p>I see you're using Internet Explorer 7.</p>\n";
361| NoTRMsgVal += "<p>Your browser is out-of-date. Microsoft has left Internet Explorer 7 with nearly the same Web 1.0 JavaScript engine as the past version. This was good around 1999-2001 with repeating animations, but bad for using any modern web applications like Gmail. Furthermore, Internet Explorer 7 has poor standards support along with only necessary bug fixes over Internet Explorer 6.</p>\n";
362| NoTRMsgVal += "<p>I recommend an upgrade to Mozilla Firefox.</p>\n";
363| NoTRMsgVal += "<div class=\"spacer\"></div>\n";
364| NoTRMsgVal += "<div class=\"storageb\">\n";
365| NoTRMsgVal += "<div class=\"flLeft\">\n";
366| NoTRMsgVal += "<p>Firefox has:</p>\n <ul>\n<li>Solid JavaScript speed</li>\n<li>HTML 5 support</li>\n<li>Strong privacy protection</li>\n</ul>\n";
367| NoTRMsgVal += "</div>\n";
368| NoTRMsgVal += "<div class=\"flRight\">\n";
369| NoTRMsgVal += "<p>Click on the button to upgrade now:</p>\n";
370| NoTRMsgVal += "<div class=\"bLogo\">\n";
371| NoTRMsgVal += "<a href=\"http://www.getfirefox.com\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-firefox-alert.jpg\" width=\"144\" height=\"50\" alt=\"Click here to get Firefox browser.\" style=\"border:0;\"></a>\n";
372| NoTRMsgVal += "<p class=\"smallfont\">(Link opens in a new window.)</p>\n";
373| NoTRMsgVal += "</div>\n";
374| NoTRMsgVal += "</div>\n";
375| NoTRMsgVal += "</div>\n";
376| NoTRMsgVal += "<div class=\"spacer\"> </div>\n";
377| NoTRMsgVal += "</div>";
378| document.write(NoTRMsgVal);
379| }
380| }
381|
382| if(8 == BrowserNum)
383| {
384| var EightMsgVal = "<div class=\"warning\">\n";
385| EightMsgVal += "<h1>WARNING! You Are Using a Legacy Browser!!!</h1>\n";
386| EightMsgVal += "<p>I see you're using Internet Explorer 8.</p>\n";
387| EightMsgVal += "<p>Your browser is one generation out-of-date along with being very slow and not completely standard compliant. Microsoft has left Internet Explorer 8 with nearly the same Web 1.0 JavaScript engine as the past two versions. This was good around 1999-2001 with repeating animations, but bad for using any modern web application like Gmail. Furthermore, Internet Explorer 8 doesn't recognize all modern standards meaning that webpages don't always look or function as intended.</p>\n";
388|
389| if(5.1 == OSVal)
390| {
391| EightMsgVal += "<p>Worse, being as you're on Windows XP, this is the last update Microsoft will send to your computer. You will always be stuck with a truly out of date web browser. This will get more problematic as with each passing year the Internet requires faster JavaScript processing and HTML 5 features neither of which Internet Explorer 8 has.</p>\n";
392| }
393|
394| EightMsgVal += "<p>I recommend an upgrade to Mozilla Firefox.</p>\n";
395| EightMsgVal += "<div class=\"spacer\"></div>\n";
396| EightMsgVal += "<div class=\"storageb\">\n";
397| EightMsgVal += "<div class=\"flLeft\">\n";
398| EightMsgVal += "<p>Firefox has:</p>\n <ul>\n<li>Solid JavaScript speed</li>\n<li>HTML 5 support</li>\n<li>Strong privacy protection</li>\n</ul>\n";
399| EightMsgVal += "</div>\n";
400| EightMsgVal += "<div class=\"flRight\">\n";
401| EightMsgVal += "<p>Click on the button to upgrade now:</p>\n";
402| EightMsgVal += "<div class=\"bLogo\">\n";
403| EightMsgVal += "<a href=\"http://www.getfirefox.com\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-firefox-warning.jpg\" width=\"144\" height=\"50\" alt=\"Click here to get Firefox browser.\" style=\"border:0;\"></a>\n";
404| EightMsgVal += "<p class=\"smallfont\">(Link opens in a new window.)</p>\n";
405| EightMsgVal += "</div>\n";
406| EightMsgVal += "</div>\n";
407| EightMsgVal += "</div>\n";
408| EightMsgVal += "<div class=\"spacer\"> </div>\n";
409| EightMsgVal += "</div>";
410| document.write(EightMsgVal);
411| }
412|
413| if(9 == BrowserNum)
414| {
415| var NineMsgVal = "<div class=\"notice\">\n";
416| NineMsgVal += "<h1>Notice! Your browser is Not Modern!</h1>\n";
417| NineMsgVal += "<p>I see you're using Internet Explorer 9.</p>\n";
418| NineMsgVal += "<p>Internet Explorer 9 is fastest, safest, most standards compliant browser Microsoft has made. This would be an accomplishment if the comparison wasn't to <abbr title=\"Internet Explorer 6\">IE6</abbr>. According to <a href=\"http://caniuse.com/\" target=\"_blank\">When Can I Use...</a> Web Standards Compatibility Table, Firefox 4 scores 86% while Internet Explorer 9 scores 59%, which measures up quite favorably to the <strong>Two Year Old</strong> Firefox 3.5's score of 57%. According to <a href=\"http://beta.html5test.com/\" target=\"_blank\">The HTML5 Test (beta)</a> Score Chart, Firefox 4 scores 255 points plus 9 bonus points while Internet Explorer 9 scores 130 points plus 5 bonus points, which measures slightly worse than the <strong>Two Year Old</strong> Firefox 3.5's score of 142 points plus 4 bonus points.</p>\n";
419| NineMsgVal += "<p>I recommend an upgrade to Mozilla Firefox.</p>\n";
420| NineMsgVal += "<div class=\"spacer\"></div>\n";
421| NineMsgVal += "<div class=\"storageb\">\n";
422| NineMsgVal += "<div class=\"flLeft\">\n";
423| NineMsgVal += "<p>Firefox has:</p>\n <ul>\n<li>HTML 5 Forms (validation/CSS 3 selectors)</li>\n<li>SMIL (SVG) Animations</li>\n<li>WebGL (3D Standard)</li>\n</ul>\n";
424| NineMsgVal += "</div>\n";
425| NineMsgVal += "<div class=\"flRight\">\n";
426| NineMsgVal += "<p>Click on the button to upgrade now:</p>\n";
427| NineMsgVal += "<div class=\"bLogo\">\n";
428| NineMsgVal += "<a href=\"http://www.getfirefox.com\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-firefox-notice.jpg\" width=\"144\" height=\"50\" alt=\"Click here to get Firefox browser.\" style=\"border:0;\"></a>\n";
429| NineMsgVal += "<p class=\"smallfont\">(Link opens in a new window.)</p>\n";
430| NineMsgVal += "</div>\n";
431| NineMsgVal += "</div>\n";
432| NineMsgVal += "</div>\n";
433| NineMsgVal += "<div class=\"spacer\"> </div>\n";
434| NineMsgVal += "</div>";
435| document.write(NineMsgVal);
436| }
437|
438| if(9 < BrowserNum)
439| {
440| var TenMsgVal = "<div class=\"bluenote\">\n";
441| TenMsgVal += "<h1>Your Browser is Experimental!!!</h1>\n";
442| TenMsgVal += "<p>I see you're using Internet Explorer " + BrowserNum + ".</p>\n";
443| TenMsgVal += "<p>Internet Explorer " + BrowserNum + " is Microsoft's next attempt catch up with modern browsers.</p>\n";
444| TenMsgVal += "<p>I recommend an upgrade to Mozilla Aurora.</p>\n";
445| TenMsgVal += "<div class=\"spacer\"></div>\n";
446| TenMsgVal += "<div class=\"storageb\">\n";
447| TenMsgVal += "<div class=\"flLeft\">\n";
448| TenMsgVal += "<p>Aurora has:</p>\n <ul>\n<li>Bleeding edge HTML 5 support</li>\n<li>Weekly updates</li>\n<li>Latest platform features</li>\n</ul>\n";
449| TenMsgVal += "</div>\n";
450| TenMsgVal += "<div class=\"flRight\">\n";
451| TenMsgVal += "<p>Click on the button to upgrade now:</p>\n";
452| TenMsgVal += "<div class=\"bLogo\">\n";
453| TenMsgVal += "<a href=\"https://www.mozilla.com/en-US/firefox/channel/\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-aurora-blue.jpg\" width=\"144\" height=\"50\" alt=\"Click here to get Firefox browser.\" style=\"border:0;\"></a>\n";
454| TenMsgVal += "<p class=\"smallfont\">(Link opens in a new window.)</p>\n";
455| TenMsgVal += "</div>\n";
456| TenMsgVal += "</div>\n";
457| TenMsgVal += "</div>\n";
458| TenMsgVal += "<div class=\"spacer\"> </div>\n";
459| TenMsgVal += "</div>";
460| document.write(TenMsgVal);
461| }
462| }
463|
464| //This function creates the OS message.
465| function OSLoad()
466| {
467| var CountOS = OSArray.length;
468|
469| var j = 0;
470|
471| for(j = 0; j < CountOS; j++)
472| {
473| if(OSArray[j] == OSNum)
474| {
475| OSNum = OSArray[j];
476| }
477| }
478|
479| var VistaDDate = new Date(2012, 3, 10, 23, 59, 59);
480| var VistaDTime = VistaDDate.getTime();
481| var NowTime = new Date().getTime();
482|
483| if(5.0 == OSNum)
484| {
485| var FiveOSMsgVal = "<div class=\"alert\">\n";
486| FiveOSMsgVal += "<h1>ALERT! Operating System is OBSOLETE!!!</h1>\n";
487| FiveOSMsgVal += "<p>I see you're using Windows 2000.</p>\n";
488| FiveOSMsgVal += "<p>Windows 2000 has always lacked driver support. It has never had Windows XP's recovery systems. Furthermore, When Windows XP got Vista security features in Service Pack 2 along with Internet Explorer 6 SP2, Windows 2000 got nothing. This lack of a rebuilt security backend meant that Windows 2000 could never run Internet Explorer above version 6 SP1 leaving Windows 2000 vulnerable to driveby installs and other malware.</p>\n";
489| FiveOSMsgVal += "<div class=\"spacer\"></div>\n";
490| FiveOSMsgVal += "<div class=\"storageo\">\n";
491| FiveOSMsgVal += "<div class=\"flLeft\">\n";
492| FiveOSMsgVal += "<p>Windows 7 has:</p>\n <ul>\n<li>Better Performance</li>\n<li>Better, Stronger Security</li>\n<li>Great User Experience</li>\n</ul>\n";
493| FiveOSMsgVal += "</div>\n";
494| FiveOSMsgVal += "<div class=\"flRight\">\n";
495| FiveOSMsgVal += "<p>Click on the button to upgrade now:</p>\n";
496| FiveOSMsgVal += "<div class=\"wsLogo\">\n";
497| FiveOSMsgVal += "<a href=\"http://www.microsoft.com/windows/windows-7/\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-windows7-alert.jpg\" width=\"78\" height=\"88\" alt=\"Click here to get Windows 7.\" style=\"border:0; margin:0px;\"></a>\n";
498| FiveOSMsgVal += "<p class=\"smallfont\" style=\"margin-top:0px;\">(Link opens in a new window.)</p>\n";
499| FiveOSMsgVal += "</div>\n";
500| FiveOSMsgVal += "</div>\n";
501| FiveOSMsgVal += "</div>\n";
502| FiveOSMsgVal += "<div class=\"spacer\"> </div>\n";
503| FiveOSMsgVal += "</div>\n";
504| document.write(FiveOSMsgVal);
505| }
506|
507| if(5.1 == OSNum)
508| {
509| var FiveOneOSMsgVal = "<div class=\"alert\">\n";
510| FiveOneOSMsgVal += "<h1>ALERT! Operating System is OBSOLETE!!!</h1>\n";
511| FiveOneOSMsgVal += "<p>I see you're using Windows XP.</p>\n";
512| FiveOneOSMsgVal += "<p>I know what your saying, Microsoft says it will support Windows XP until April 2014. True, but that doesn't mean that Windows XP is current. This old operating system doesn't work with modern hardware. Windows XP lacks hardware acceleration interfaces like Direct2D and DirectWrite. Need I even mention the complete and total lack of underlying security. Also, Windows XP is a 32 bit operating system in 64 bit world that can't take advantage of 64 bit hardware protection schemes and has a memory cap of 3GB. Windows XP was good circa the years 2001 to 2003, but its already well past 2010. Windows XP just isn't the future anymore.</p>\n";
513| FiveOneOSMsgVal += "<div class=\"spacer\"></div>\n";
514| FiveOneOSMsgVal += "<div class=\"storageo\">\n";
515| FiveOneOSMsgVal += "<div class=\"flLeft\">\n";
516| FiveOneOSMsgVal += "<p>Windows 7 has:</p>\n <ul>\n<li>Better Performance</li>\n<li>Better, Stronger Security</li>\n<li>Great User Experience</li>\n</ul>\n";
517| FiveOneOSMsgVal += "</div>\n";
518| FiveOneOSMsgVal += "<div class=\"flRight\">\n";
519| FiveOneOSMsgVal += "<p>Click on the button to upgrade now:</p>\n";
520| FiveOneOSMsgVal += "<div class=\"wsLogo\">\n";
521| FiveOneOSMsgVal += "<a href=\"http://www.microsoft.com/windows/windows-7/\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-windows7-alert.jpg\" width=\"78\" height=\"88\" alt=\"Click here to get Windows 7.\" style=\"border:0; margin:0px;\"></a>\n";
522| FiveOneOSMsgVal += "<p class=\"smallfont\" style=\"margin-top:0px;\">(Link opens in a new window.)</p>\n";
523| FiveOneOSMsgVal += "</div>\n";
524| FiveOneOSMsgVal += "</div>\n";
525| FiveOneOSMsgVal += "</div>\n";
526| FiveOneOSMsgVal += "<div class=\"spacer\"> </div>\n";
527| FiveOneOSMsgVal += "</div>\n";
528| document.write(FiveOneOSMsgVal);
529| }
530|
531| if(5.2 == OSNum)
532| {
533| var FiveTwoOSMsgVal = "<div class=\"warning\">\n";
534| FiveTwoOSMsgVal += "<h1>WARNING! Operating System is Legacy.</h1>\n";
535| FiveTwoOSMsgVal += "<p>I see you're using Windows XP x64.</p>\n";
536| FiveTwoOSMsgVal += "<p>Windows XP x64 was and is a freak operating system. It is neither here nor there as it is a 64 bit version of Windows Server 2003 built to function like a 32 bit Windows XP. If you want real 64 bit support, you should just use Windows 7 x64, which is standard and supported properly.</p>\n";
537| FiveTwoOSMsgVal += "<div class=\"spacer\"></div>\n";
538| FiveTwoOSMsgVal += "<div class=\"storageo\">\n";
539| FiveTwoOSMsgVal += "<div class=\"flLeft\">\n";
540| FiveTwoOSMsgVal += "<p>Windows 7 has:</p>\n <ul>\n<li>Better Performance</li>\n<li>Better, Stronger Security</li>\n<li>Great User Experience</li>\n</ul>\n";
541| FiveTwoOSMsgVal += "</div>\n";
542| FiveTwoOSMsgVal += "<div class=\"flRight\">\n";
543| FiveTwoOSMsgVal += "<p>Click on the button to upgrade now:</p>\n";
544| FiveTwoOSMsgVal += "<div class=\"wsLogo\">\n";
545| FiveTwoOSMsgVal += "<a href=\"http://www.microsoft.com/windows/windows-7/\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-windows7-warning.jpg\" width=\"78\" height=\"88\" alt=\"Click here to get Windows 7.\" style=\"border:0; margin:0px;\"></a>\n";
546| FiveTwoOSMsgVal += "<p class=\"smallfont\" style=\"margin-top:0px;\">(Link opens in a new window.)</p>\n";
547| FiveTwoOSMsgVal += "</div>\n";
548| FiveTwoOSMsgVal += "</div>\n";
549| FiveTwoOSMsgVal += "</div>\n";
550| FiveTwoOSMsgVal += "<div class=\"spacer\"> </div>\n";
551| FiveTwoOSMsgVal += "</div>\n";
552| document.write(FiveTwoOSMsgVal);
553| }
554|
555| if(6.0 == OSNum)
556| {
557| if(VistaDTime > NowTime)
558| {
559| var SixOSPreMsgVal = "<div id=\"vistaparent\">\n";
560| SixOSPreMsgVal += "<div id=\"vistawarningbox\" class=\"warning\" style=\"position:relative;\">\n";
561| SixOSPreMsgVal += "<h1>WARNING! Operating System is Not Current Version.</h1>\n";
562| SixOSPreMsgVal += "<p>I see you're using Windows Vista.</p>\n";
563| SixOSPreMsgVal += "<p>While it is great that you are using a modern system, you should really upgrade to Windows 7.</p>\n";
564| SixOSPreMsgVal += "<div class=\"spacer\"></div>\n";
565| SixOSPreMsgVal += "<div class=\"vistacounter_counter_body\">\n";
566| SixOSPreMsgVal += "<div class=\"vistacounter_counter_border\">\n";
567| SixOSPreMsgVal += "<h1>Vista Death Countdown</h1>\n";
568| SixOSPreMsgVal += "<p>On April 10, 2012, Vista will be left behind on Extended Support with only security patches. To continue feature support, you must upgrade in:</p>\n";
569| SixOSPreMsgVal += "<div class=\"vistacounter_container\">\n";
570| SixOSPreMsgVal += "<div class=\"vistacounter_negative\">-</div><div class=\"vistacounter_daycontainer\"><div class=\"vistacounter_day2\">0</div><div class=\"vistacounter_day1\">0</div><div class=\"vistacounter_day0\">0</div></div><div class=\"vistacounter_daytitle\">DAYS AND</div>";
571| SixOSPreMsgVal += "<div class=\"vistacounter_hour0\">0</div><div class=\"vistacounter_hour1\">0</div><div class=\"vistacounter_colon\">:</div><div class=\"vistacounter_min0\">0</div><div class=\"vistacounter_min1\">0</div><div class=\"vistacounter_colon\">:</div><div class=\"vistacounter_sec0\">0</div><div class=\"vistacounter_sec1\">0</div>\n";
572| SixOSPreMsgVal += "</div>\n";
573| SixOSPreMsgVal += "<div class=\"vistacounter_clearleft\"> </div>\n";
574| SixOSPreMsgVal += "</div>\n";
575| SixOSPreMsgVal += "</div>\n";
576| SixOSPreMsgVal += "<div class=\"spacer\" style=\"height:310px;\"></div>\n";
577| SixOSPreMsgVal += "<div class=\"storageo\">\n";
578| SixOSPreMsgVal += "<div class=\"flLeft\">\n";
579| SixOSPreMsgVal += "<p>Windows 7 has:</p>\n <ul>\n<li>Better Performance</li>\n<li>Better, Stronger Security</li>\n<li>Great User Experience</li>\n</ul>\n";
580| SixOSPreMsgVal += "</div>\n";
581| SixOSPreMsgVal += "<div class=\"flRight\">\n";
582| SixOSPreMsgVal += "<p>Click on the button to upgrade now:</p>\n";
583| SixOSPreMsgVal += "<div class=\"wsLogo\">\n";
584| SixOSPreMsgVal += "<a href=\"http://www.microsoft.com/windows/windows-7/\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-windows7-warning.jpg\" width=\"78\" height=\"88\" alt=\"Click here to get Windows 7.\" style=\"border:0; margin:0px;\"></a>\n";
585| SixOSPreMsgVal += "<p class=\"smallfont\" style=\"margin-top:0px;\">(Link opens in a new window.)</p>\n";
586| SixOSPreMsgVal += "</div>\n";
587| SixOSPreMsgVal += "</div>\n";
588| SixOSPreMsgVal += "</div>\n";
589| SixOSPreMsgVal += "<div class=\"spacer\"> </div>\n";
590| SixOSPreMsgVal += "</div>\n";
591| SixOSPreMsgVal += "</div>\n";
592| document.write(SixOSPreMsgVal);
593| vistaTimerBoxCenter();
594|
595| var vcFunc = function vista_deathclock_start() {setInterval('changeNode()', 500)};
596| addOnLoadEvent(vcFunc);
597| }
598| else
599| {
600| var SixOSPostMsgVal = "<div class=\"alert\">\n";
601| SixOSPostMsgVal += "<h1>ALERT! Operating System is OBSOLETE!!!</h1>\n";
602| SixOSPostMsgVal += "<p>I see you're using Windows Vista.</p>\n";
603| SixOSPostMsgVal += "<p>Vista is a dead operating system. I know what you'te thinking, \"I just got this computer 5 years ago, how can Vista be dead when Windows XP is still supported?\" Let me start with the second part of that statement first, Windows XP is also obsolete and has been obsolete since it went on 'Extended Support' for security patches only without any new feature upgrades. Can you guess which other operating system just got switched over to 'Extended Support'? Yup, that's right, Vista. Vista is already feeling the effects of being put on 'Extended Support' as Internet Explorer 10 won't install on it. Soon, Vista will diverge so much from Windows 7 and Windows 8 feature wise and compatibility wise as to be left completely in the dust.</p>\n";
604| SixOSPostMsgVal += "<div class=\"spacer\"></div>\n";
605| SixOSPostMsgVal += "<div class=\"storageo\">\n";
606| SixOSPostMsgVal += "<div class=\"flLeft\">\n";
607| SixOSPostMsgVal += "<p>Windows 7 has:</p>\n <ul>\n<li>Better Performance</li>\n<li>Better, Stronger Security</li>\n<li>Great User Experience</li>\n</ul>\n";
608| SixOSPostMsgVal += "</div>\n";
609| SixOSPostMsgVal += "<div class=\"flRight\">\n";
610| SixOSPostMsgVal += "<p>Click on the button to upgrade now:</p>\n";
611| SixOSPostMsgVal += "<div class=\"wsLogo\">\n";
612| SixOSPostMsgVal += "<a href=\"http://www.microsoft.com/windows/windows-7/\" target=\"_blank\"><img src=\"" + strSpaces + "images/logo-windows7-alert.jpg\" width=\"78\" height=\"88\" alt=\"Click here to get Windows 7.\" style=\"border:0; margin:0px;\"></a>\n";
613| SixOSPostMsgVal += "<p class=\"smallfont\" style=\"margin-top:0px;\">(Link opens in a new window.)</p>\n";
614| SixOSPostMsgVal += "</div>\n";
615| SixOSPostMsgVal += "</div>\n";
616| SixOSPostMsgVal += "</div>\n";
617| SixOSPostMsgVal += "<div class=\"spacer\"> </div>\n";
618| SixOSPostMsgVal += "</div>\n";
619| document.write(SixOSPostMsgVal);
620| }
621| }
622|
623| if(6.1 == OSNum)
624| {
625| var SixOneOSMsgVal = "<div class=\"safe\">\n";
626| SixOneOSMsgVal += "<h1>Operating System is Current.</h1>\n";
627| SixOneOSMsgVal += "<p>I see you're using either Windows 7.</p>\n";
628| SixOneOSMsgVal += "<p>Thank you for keeping your system up.</p>\n";
629| SixOneOSMsgVal += "</div>";
630| document.write(SixOneOSMsgVal);
631| }
632|
633| if(6.2 == OSNum)
634| {
635| var NineMsgVal = "<div class=\"bluenote\">\n";
636| NineMsgVal += "<h1>Operating System is Experimental!!!</h1>\n";
637| NineMsgVal += "<p>I see you're using Windows 8.</p>\n";
638| NineMsgVal += "<p>I hope you are enjoying the new touch interface.:)</p>\n";
639| NineMsgVal += "</div>";
640| document.write(NineMsgVal);
641| }
642| }