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