PageRenderTime 124ms CodeModel.GetById 60ms app.highlight 26ms RepoModel.GetById 35ms app.codeStats 0ms

/ie6/warning.js

http://ie6-upgrade-warning.googlecode.com/
JavaScript | 189 lines | 187 code | 2 blank | 0 comment | 0 complexity | 0f353522ce1765465cb12a1174095b96 MD5 | raw file
  1var msg1 = "Did you know that your Internet Explorer is out of date?";
  2var msg2 = "To get the best possible experience using our website we recommend that you upgrade to a newer version or other web browser. A list of the most popular web browsers can be found below.";
  3var msg3 = "Just click on the icons to get to the download page";
  4var br1 = "Internet Explorer 7+";
  5var br2 = "Firefox 3+";
  6var br3 = "Safari 3+";
  7var br4 = "Opera 9.5+";
  8var br5 = "Chrome 2.0+";
  9var url1 = "http://www.microsoft.com/windows/Internet-explorer/default.aspx";
 10var url2 = "http://www.mozilla.com/firefox/";
 11var url3 = "http://www.apple.com/safari/download/";
 12var url4 = "http://www.opera.com/download/";
 13var url5 = "http://www.google.com/chrome";
 14var imgPath;
 15
 16
 17function e(str) {imgPath = str;
 18var _body = document.getElementsByTagName('body')[0];
 19var _d = document.createElement('div');
 20var _l = document.createElement('div');
 21var _h = document.createElement('h1');
 22var _p1 = document.createElement('p');
 23var _p2 = document.createElement('p');
 24var _ul = document.createElement('ul');
 25var _li1 = document.createElement('li');
 26var _li2 = document.createElement('li');
 27var _li3 = document.createElement('li');
 28var _li4 = document.createElement('li');
 29var _li5 = document.createElement('li');
 30var _ico1 = document.createElement('div');
 31var _ico2 = document.createElement('div');
 32var _ico3 = document.createElement('div');
 33var _ico4 = document.createElement('div');
 34var _ico5 = document.createElement('div');
 35var _lit1 = document.createElement('div');
 36var _lit2 = document.createElement('div');
 37var _lit3 = document.createElement('div');
 38var _lit4 = document.createElement('div');
 39var _lit5 = document.createElement('div');
 40_body.appendChild(_l);
 41_body.appendChild(_d);
 42_d.appendChild(_h);
 43_d.appendChild(_p1);
 44_d.appendChild(_p2);
 45_d.appendChild(_ul);
 46_ul.appendChild(_li1);
 47_ul.appendChild(_li2);
 48_ul.appendChild(_li3);
 49_ul.appendChild(_li4);
 50_ul.appendChild(_li5);
 51_li1.appendChild(_ico1);
 52_li2.appendChild(_ico2);
 53_li3.appendChild(_ico3);
 54_li4.appendChild(_ico4);
 55_li5.appendChild(_ico5);
 56_li1.appendChild(_lit1);
 57_li2.appendChild(_lit2);
 58_li3.appendChild(_lit3);
 59_li4.appendChild(_lit4);
 60_li5.appendChild(_lit5);
 61_d.setAttribute('id','_d');
 62_l.setAttribute('id','_l');
 63_h.setAttribute('id','_h');
 64_p1.setAttribute('id','_p1');
 65_p2.setAttribute('id','_p2');
 66_ul.setAttribute('id','_ul');
 67_li1.setAttribute('id','_li1');
 68_li2.setAttribute('id','_li2');
 69_li3.setAttribute('id','_li3');
 70_li4.setAttribute('id','_li4');
 71_li5.setAttribute('id','_li5');
 72_ico1.setAttribute('id','_ico1');
 73_ico2.setAttribute('id','_ico2');
 74_ico3.setAttribute('id','_ico3');
 75_ico4.setAttribute('id','_ico4');
 76_ico5.setAttribute('id','_ico5');
 77_lit1.setAttribute('id','_lit1');
 78_lit2.setAttribute('id','_lit2');
 79_lit3.setAttribute('id','_lit3');
 80_lit4.setAttribute('id','_lit4');
 81_lit5.setAttribute('id','_lit5');
 82var _width = document.documentElement.clientWidth;
 83var _height = document.documentElement.clientHeight;
 84var _dl = document.getElementById('_l');
 85_dl.style.width =  _width+"px";
 86_dl.style.height = _height+"px";
 87_dl.style.position = "absolute";
 88_dl.style.top = "0px";
 89_dl.style.left = "0px";
 90_dl.style.filter = "alpha(opacity=50)";
 91_dl.style.background = "#fff";
 92var _dd = document.getElementById('_d');
 93_ddw = 650;
 94_ddh = 260;
 95_dd.style.width = _ddw+"px";
 96_dd.style.height = _ddh+"px";
 97_dd.style.position = "absolute";
 98_dd.style.top = ((_height-_ddh)/2)+"px";
 99_dd.style.left = ((_width-_ddw)/2)+"px";
100_dd.style.padding = "20px";
101_dd.style.background = "#fff";
102_dd.style.border = "1px solid #ccc";
103_dd.style.fontFamily = "'Lucida Grande','Lucida Sans Unicode',Arial,Verdana,sans-serif";
104_dd.style.listStyleType = "none";
105_dd.style.color = "#4F4F4F";
106_dd.style.fontSize = "12px";
107_h.appendChild(document.createTextNode(msg1));
108var _hd = document.getElementById('_h');
109_hd.style.display = "block";
110_hd.style.fontSize = "1.3em";
111_hd.style.marginBottom = "0.5em";
112_hd.style.color = "#333";
113_hd.style.fontFamily = "Helvetica,Arial,sans-serif";
114_hd.style.fontWeight = "bold";
115_p1.appendChild(document.createTextNode(msg2));
116var _p1d = document.getElementById('_p1');
117_p1d.style.marginBottom = "1em";
118_p2.appendChild(document.createTextNode(msg3));
119var _p2d = document.getElementById('_p2');
120_p2d.style.marginBottom = "1em";
121var _uld = document.getElementById('_ul');
122_uld.style.listStyleImage = "none";
123_uld.style.listStylePosition = "outside";
124_uld.style.listStyleType = "none";
125_uld.style.margin = "0 px auto";
126_uld.style.padding = "0px";
127_uld.style.paddingLeft = "10px";
128var _li1d = document.getElementById('_li1');
129var _li2d = document.getElementById('_li2');
130var _li3d = document.getElementById('_li3');
131var _li4d = document.getElementById('_li4');
132var _li5d = document.getElementById('_li5');
133var _li1ds = _li1d.style;
134var _li2ds = _li2d.style;
135var _li3ds = _li3d.style;
136var _li4ds = _li4d.style;
137var _li5ds = _li5d.style;
138_li1ds.background = _li2ds.background = _li3ds.background = _li4ds.background = _li5ds.background = "transparent url('"+imgPath+"background_browser.gif') no-repeat scroll left top";
139_li1ds.cursor = _li2ds.cursor = _li3ds.cursor = _li4ds.cursor = _li5ds.cursor = "pointer";
140_li1d.onclick = function() {window.location = url1 };
141 _li2d.onclick = function() {window.location = url2 };
142 _li3d.onclick = function() {window.location = url3 };
143 _li4d.onclick = function() {window.location = url4 };
144 _li5d.onclick = function() {window.location = url5 };
145 _li1ds.styleFloat = _li2ds.styleFloat = _li3ds.styleFloat = _li4ds.styleFloat = _li5ds.styleFloat = "left";
146_li1ds.width = _li2ds.width = _li3ds.width = _li4ds.width = _li5ds.width = "120px";
147_li1ds.height = _li2ds.height = _li3ds.height = _li4ds.height = _li5ds.height = "122px";
148_li1ds.margin = _li2ds.margin = _li3ds.margin = _li4ds.margin = _li5ds.margin = "0 10px 10px 0";
149var _ico1d = document.getElementById('_ico1');
150var _ico2d = document.getElementById('_ico2');
151var _ico3d = document.getElementById('_ico3');
152var _ico4d = document.getElementById('_ico4');
153var _ico5d = document.getElementById('_ico5');
154var _ico1ds = _ico1d.style;
155var _ico2ds = _ico2d.style;
156var _ico3ds = _ico3d.style;
157var _ico4ds = _ico4d.style;
158var _ico5ds = _ico5d.style;
159_ico1ds.width = _ico2ds.width = _ico3ds.width = _ico4ds.width = _ico5ds.width = "100px";
160_ico1ds.height = _ico2ds.height = _ico3ds.height = _ico4ds.height = _ico5ds.height = "100px";
161_ico1ds.margin = _ico2ds.margin = _ico3ds.margin = _ico4ds.margin = _ico5ds.margin = "1px auto";
162_ico1ds.background = "transparent url('"+imgPath+"browser_ie.gif') no-repeat scroll left top";
163_ico2ds.background = "transparent url('"+imgPath+"browser_firefox.gif') no-repeat scroll left top";
164_ico3ds.background = "transparent url('"+imgPath+"browser_safari.gif') no-repeat scroll left top";
165_ico4ds.background = "transparent url('"+imgPath+"browser_opera.gif') no-repeat scroll left top";
166_ico5ds.background = "transparent url('"+imgPath+"browser_chrome.gif') no-repeat scroll left top";
167_lit1.appendChild(document.createTextNode(br1));
168_lit2.appendChild(document.createTextNode(br2));
169_lit3.appendChild(document.createTextNode(br3));
170_lit4.appendChild(document.createTextNode(br4));
171_lit5.appendChild(document.createTextNode(br5));
172var _lit1d = document.getElementById('_lit1');
173var _lit2d = document.getElementById('_lit2');
174var _lit3d = document.getElementById('_lit3');
175var _lit4d = document.getElementById('_lit4');
176var _lit5d = document.getElementById('_lit5');
177var _lit1ds = _lit1d.style;
178var _lit2ds = _lit2d.style;
179var _lit3ds = _lit3d.style;
180var _lit4ds = _lit4d.style;
181var _lit5ds = _lit5d.style;
182_lit1ds.color = _lit2ds.color = _lit3ds.color = _lit4ds.color = _lit5ds.color = "#808080";
183_lit1ds.fontSize = _lit2ds.fontSize = _lit3ds.fontSize = _lit4ds.fontSize = _lit5ds.fontSize = "0.8em";
184_lit1ds.height = _lit2ds.height = _lit3ds.height = _lit4ds.height = _lit5ds.height = "18px";
185_lit1ds.lineHeight = _lit2ds.lineHeight = _lit3ds.lineHeight = _lit4ds.lineHeight = _lit5ds.lineHeight = "17px";
186_lit1ds.margin = _lit2ds.margin = _lit3ds.margin = _lit4ds.margin = _lit5ds.margin = "1px auto";
187_lit1ds.width = _lit2ds.width = _lit3ds.width = _lit4ds.width = _lit5ds.width = "118px";
188_lit1ds.textAlign = _lit2ds.textAlign = _lit3ds.textAlign = _lit4ds.textAlign = _lit5ds.textAlign = "center";
189}