Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.02 KB | None | 0 0
  1. if (typeof asual == "undefined") {
  2. var asual = {}
  3. }
  4. if (typeof asual.util == "undefined") {
  5. asual.util = {}
  6. }
  7. asual.util.Browser = new function() {
  8. var B = navigator.userAgent.toLowerCase(),
  9. A = /webkit/.test(B),
  10. E = /opera/.test(B),
  11. C = /msie/.test(B) && !/opera/.test(B),
  12. D = /mozilla/.test(B) && !/(compatible|webkit)/.test(B),
  13. F = parseFloat(C ? B.substr(B.indexOf("msie") + 4) : (B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0, "0"])[1]);
  14. this.toString = function() {
  15. return "[class Browser]"
  16. };
  17. this.getVersion = function() {
  18. return F
  19. };
  20. this.isMSIE = function() {
  21. return C
  22. };
  23. this.isSafari = function() {
  24. return A
  25. };
  26. this.isOpera = function() {
  27. return E
  28. };
  29. this.isMozilla = function() {
  30. return D
  31. }
  32. };
  33. asual.util.Events = new function() {
  34. var C = "DOMContentLoaded",
  35. J = "onstop",
  36. K = window,
  37. H = document,
  38. B = [],
  39. A = asual.util,
  40. E = A.Browser,
  41. D = E.isMSIE(),
  42. G = E.isSafari();
  43. this.toString = function() {
  44. return "[class Events]"
  45. };
  46. this.addListener = function(N, L, M) {
  47. B.push({
  48. o: N,
  49. t: L,
  50. l: M
  51. });
  52. if (!(L == C && (D || G))) {
  53. if (N.addEventListener) {
  54. N.addEventListener(L, M, false)
  55. } else {
  56. if (N.attachEvent) {
  57. N.attachEvent("on" + L, M)
  58. }
  59. }
  60. }
  61. };
  62. this.removeListener = function(P, M, N) {
  63. for (var L = 0, O; O = B[L]; L++) {
  64. if (O.o == P && O.t == M && O.l == N) {
  65. B.splice(L, 1);
  66. break
  67. }
  68. }
  69. if (!(M == C && (D || G))) {
  70. if (P.removeEventListener) {
  71. P.removeEventListener(M, N, false)
  72. } else {
  73. if (P.detachEvent) {
  74. P.detachEvent("on" + M, N)
  75. }
  76. }
  77. }
  78. };
  79. var I = function() {
  80. for (var M = 0, L; L = B[M]; M++) {
  81. if (L.t != C) {
  82. A.Events.removeListener(L.o, L.t, L.l)
  83. }
  84. }
  85. };
  86. var F = function() {
  87. if (H.readyState == "interactive") {
  88. function L() {
  89. H.detachEvent(J, L);
  90. I()
  91. }
  92. H.attachEvent(J, L);
  93. K.setTimeout(function() {
  94. H.detachEvent(J, L)
  95. }, 0)
  96. }
  97. };
  98. if (D || G) {
  99. (function() {
  100. try {
  101. if ((D && H.body) || !/loaded|complete/.test(H.readyState)) {
  102. H.documentElement.doScroll("left")
  103. }
  104. } catch (M) {
  105. return setTimeout(arguments.callee, 0)
  106. }
  107. for (var L = 0, M; M = B[L]; L++) {
  108. if (M.t == C) {
  109. M.l.call(null)
  110. }
  111. }
  112. })()
  113. }
  114. if (D) {
  115. K.attachEvent("onbeforeunload", F)
  116. }
  117. this.addListener(K, "unload", I)
  118. };
  119. asual.util.Functions = new function() {
  120. this.toString = function() {
  121. return "[class Functions]"
  122. };
  123. this.bind = function(F, B, E) {
  124. for (var C = 2, D, A = []; D = arguments[C]; C++) {
  125. A.push(D)
  126. }
  127. return function() {
  128. return F.apply(B, A)
  129. }
  130. }
  131. };
  132. var SWFAddressEvent = function(D) {
  133. this.toString = function() {
  134. return "[object SWFAddressEvent]"
  135. };
  136. this.type = D;
  137. this.target = [SWFAddress][0];
  138. this.value = SWFAddress.getValue();
  139. this.path = SWFAddress.getPath();
  140. this.pathNames = SWFAddress.getPathNames();
  141. this.parameters = {};
  142. var C = SWFAddress.getParameterNames();
  143. for (var B = 0, A = C.length; B < A; B++) {
  144. this.parameters[C[B]] = SWFAddress.getParameter(C[B])
  145. }
  146. this.parameterNames = C
  147. };
  148. SWFAddressEvent.INIT = "init";
  149. SWFAddressEvent.CHANGE = "change";
  150. SWFAddressEvent.INTERNAL_CHANGE = "internalChange";
  151. SWFAddressEvent.EXTERNAL_CHANGE = "externalChange";
  152. var SWFAddress = new function() {
  153. var _getHash = function() {
  154. var index = _l.href.indexOf("#");
  155. return index != -1 ? _ec(_dc(_l.href.substr(index + 1))) : ""
  156. };
  157. var _getWindow = function() {
  158. try {
  159. top.document;
  160. return top
  161. } catch (e) {
  162. return window
  163. }
  164. };
  165. var _strictCheck = function(value, force) {
  166. if (_opts.strict) {
  167. value = force ? (value.substr(0, 1) != "/" ? "/" + value : value) : (value == "" ? "/" : value)
  168. }
  169. return value
  170. };
  171. var _ieLocal = function(value, direction) {
  172. return (_msie && _l.protocol == "file:") ? (direction ? _value.replace(/\?/, "%3F") : _value.replace(/%253F/, "?")) : value
  173. };
  174. var _searchScript = function(el) {
  175. if (el.childNodes) {
  176. for (var i = 0, l = el.childNodes.length, s; i < l; i++) {
  177. if (el.childNodes[i].src) {
  178. _url = String(el.childNodes[i].src)
  179. }
  180. if (s = _searchScript(el.childNodes[i])) {
  181. return s
  182. }
  183. }
  184. }
  185. };
  186. var _titleCheck = function() {
  187. if (_d.title != _title && _d.title.indexOf("#") != -1) {
  188. _d.title = _title
  189. }
  190. };
  191. var _listen = function() {
  192. if (!_silent) {
  193. var hash = _getHash();
  194. var diff = !(_value == hash);
  195. if (_safari && _version < 523) {
  196. if (_length != _h.length) {
  197. _length = _h.length;
  198. if (typeof _stack[_length - 1] != UNDEFINED) {
  199. _value = _stack[_length - 1]
  200. }
  201. _update.call(this, false)
  202. }
  203. } else {
  204. if (_msie && diff) {
  205. if (_version < 7) {
  206. _l.reload()
  207. } else {
  208. this.setValue(hash)
  209. }
  210. } else {
  211. if (diff) {
  212. _value = hash;
  213. _update.call(this, false)
  214. }
  215. }
  216. }
  217. if (_msie) {
  218. _titleCheck.call(this)
  219. }
  220. }
  221. };
  222. var _bodyClick = function(e) {
  223. if (_popup.length > 0) {
  224. var popup = window.open(_popup[0], _popup[1], eval(_popup[2]));
  225. if (typeof _popup[3] != UNDEFINED) {
  226. eval(_popup[3])
  227. }
  228. }
  229. _popup = []
  230. };
  231. var _swfChange = function() {
  232. for (var i = 0, id, obj, value = SWFAddress.getValue(), setter = "setSWFAddressValue"; id = _ids[i]; i++) {
  233. obj = document.getElementById(id);
  234. if (obj) {
  235. if (obj.parentNode && typeof obj.parentNode.so != UNDEFINED) {
  236. obj.parentNode.so.call(setter, value)
  237. } else {
  238. if (!(obj && typeof obj[setter] != UNDEFINED)) {
  239. var objects = obj.getElementsByTagName("object");
  240. var embeds = obj.getElementsByTagName("embed");
  241. obj = ((objects[0] && typeof objects[0][setter] != UNDEFINED) ? objects[0] : ((embeds[0] && typeof embeds[0][setter] != UNDEFINED) ? embeds[0] : null))
  242. }
  243. if (obj) {
  244. obj[setter](value)
  245. }
  246. }
  247. } else {
  248. if (obj = document[id]) {
  249. if (typeof obj[setter] != UNDEFINED) {
  250. obj[setter](value)
  251. }
  252. }
  253. }
  254. }
  255. };
  256. var _jsDispatch = function(type) {
  257. this.dispatchEvent(new SWFAddressEvent(type));
  258. type = type.substr(0, 1).toUpperCase() + type.substr(1);
  259. if (typeof this["on" + type] == FUNCTION) {
  260. this["on" + type]()
  261. }
  262. };
  263. var _jsInit = function() {
  264. if (_util.Browser.isSafari()) {
  265. _d.body.addEventListener("click", _bodyClick)
  266. }
  267. _jsDispatch.call(this, "init")
  268. };
  269. var _jsChange = function() {
  270. _swfChange();
  271. _jsDispatch.call(this, "change")
  272. };
  273. var _update = function(internal) {
  274. _jsChange.call(this);
  275. if (internal) {
  276. _jsDispatch.call(this, "internalChange")
  277. } else {
  278. _jsDispatch.call(this, "externalChange")
  279. }
  280. _st(_functions.bind(_track, this), 10)
  281. };
  282. var _track = function() {
  283. var value = (_l.pathname + (/\/$/.test(_l.pathname) ? "" : "/") + this.getValue()).replace(/\/\//, "/").replace(/^\/$/, "");
  284. var fn = _t[_opts.tracker];
  285. if (typeof fn == FUNCTION) {
  286. fn(value)
  287. } else {
  288. if (typeof _t.pageTracker != UNDEFINED && typeof _t.pageTracker._trackPageview == FUNCTION) {
  289. _t.pageTracker._trackPageview(value)
  290. } else {
  291. if (typeof _t.urchinTracker == FUNCTION) {
  292. _t.urchinTracker(value)
  293. }
  294. }
  295. }
  296. };
  297. var _htmlWrite = function() {
  298. var doc = _frame.contentWindow.document;
  299. doc.open();
  300. doc.write("<html><head><title>" + _d.title + "</title><script>var " + ID + ' = "' + _getHash() + '";<\/script></head></html>');
  301. doc.close()
  302. };
  303. var _htmlLoad = function() {
  304. var win = _frame.contentWindow;
  305. var src = win.location.href;
  306. _value = (typeof win[ID] != UNDEFINED ? win[ID] : "");
  307. if (_value != _getHash()) {
  308. _update.call(SWFAddress, false);
  309. _l.hash = _ieLocal(_value, TRUE)
  310. }
  311. };
  312. var _load = function() {
  313. if (!_loaded) {
  314. _loaded = TRUE;
  315. if (_msie && _version < 8) {
  316. var frameset = _d.getElementsByTagName("frameset")[0];
  317. _frame = _d.createElement((frameset ? "" : "i") + "frame");
  318. if (frameset) {
  319. frameset.insertAdjacentElement("beforeEnd", _frame);
  320. frameset[frameset.cols ? "cols" : "rows"] += ",0";
  321. _frame.src = "javascript:false";
  322. _frame.noResize = true;
  323. _frame.frameBorder = _frame.frameSpacing = 0
  324. } else {
  325. _frame.src = "javascript:false";
  326. _frame.style.display = "none";
  327. _d.body.insertAdjacentElement("afterBegin", _frame)
  328. }
  329. _st(function() {
  330. _events.addListener(_frame, "load", _htmlLoad);
  331. if (typeof _frame.contentWindow[ID] == UNDEFINED) {
  332. _htmlWrite()
  333. }
  334. }, 50)
  335. } else {
  336. if (_safari) {
  337. if (_version < 418) {
  338. _d.body.innerHTML += '<form id="' + ID + '" style="position:absolute;top:-9999px;" method="get"></form>';
  339. _form = _d.getElementById(ID)
  340. }
  341. if (typeof _l[ID] == UNDEFINED) {
  342. _l[ID] = {}
  343. }
  344. if (typeof _l[ID][_l.pathname] != UNDEFINED) {
  345. _stack = _l[ID][_l.pathname].split(",")
  346. }
  347. }
  348. }
  349. _st(_functions.bind(function() {
  350. _jsInit.call(this);
  351. _jsChange.call(this);
  352. _track.call(this)
  353. }, this), 1);
  354. if (_msie && _version >= 8) {
  355. _d.body.onhashchange = _functions.bind(_listen, this);
  356. _si(_functions.bind(_titleCheck, this), 50)
  357. } else {
  358. _si(_functions.bind(_listen, this), 50)
  359. }
  360. }
  361. };
  362. var ID = "swfaddress",
  363. FUNCTION = "function",
  364. UNDEFINED = "undefined",
  365. TRUE = true,
  366. FALSE = false,
  367. _util = asual.util,
  368. _browser = _util.Browser,
  369. _events = _util.Events,
  370. _functions = _util.Functions,
  371. _version = _browser.getVersion(),
  372. _msie = _browser.isMSIE(),
  373. _mozilla = _browser.isMozilla(),
  374. _opera = _browser.isOpera(),
  375. _safari = _browser.isSafari(),
  376. _supported = FALSE,
  377. _t = _getWindow(),
  378. _d = _t.document,
  379. _h = _t.history,
  380. _l = _t.location,
  381. _si = setInterval,
  382. _st = setTimeout,
  383. _dc = decodeURI,
  384. _ec = encodeURI,
  385. _frame, _form, _url, _title = _d.title,
  386. _length = _h.length,
  387. _silent = FALSE,
  388. _loaded = FALSE,
  389. _justset = TRUE,
  390. _juststart = TRUE,
  391. _ref = this,
  392. _stack = [],
  393. _ids = [],
  394. _popup = [],
  395. _listeners = {},
  396. _value = _getHash(),
  397. _opts = {
  398. history: TRUE,
  399. strict: TRUE
  400. };
  401. if (_msie && _d.documentMode && _d.documentMode != _version) {
  402. _version = _d.documentMode != 8 ? 7 : 8
  403. }
  404. _supported = (_mozilla && _version >= 1) || (_msie && _version >= 6) || (_opera && _version >= 9.5) || (_safari && _version >= 312);
  405. if (_supported) {
  406. if (_opera) {
  407. history.navigationMode = "compatible"
  408. }
  409. for (var i = 1; i < _length; i++) {
  410. _stack.push("")
  411. }
  412. _stack.push(_getHash());
  413. if (_msie && _l.hash != _getHash()) {
  414. _l.hash = "#" + _ieLocal(_getHash(), TRUE)
  415. }
  416. _searchScript(document);
  417. var _qi = _url ? _url.indexOf("?") : -1;
  418. if (_qi != -1) {
  419. var param, params = _url.substr(_qi + 1).split("&");
  420. for (var i = 0, p; p = params[i]; i++) {
  421. param = p.split("=");
  422. if (/^(history|strict)$/.test(param[0])) {
  423. _opts[param[0]] = (isNaN(param[1]) ? /^(true|yes)$/i.test(param[1]) : (parseInt(param[1]) != 0))
  424. }
  425. if (/^tracker$/.test(param[0])) {
  426. _opts[param[0]] = param[1]
  427. }
  428. }
  429. }
  430. if (_msie) {
  431. _titleCheck.call(this)
  432. }
  433. if (window == _t) {
  434. _events.addListener(document, "DOMContentLoaded", _functions.bind(_load, this))
  435. }
  436. _events.addListener(_t, "load", _functions.bind(_load, this))
  437. } else {
  438. if ((!_supported && _l.href.indexOf("#") != -1) || (_safari && _version < 418 && _l.href.indexOf("#") != -1 && _l.search != "")) {
  439. _d.open();
  440. _d.write('<html><head><meta http-equiv="refresh" content="0;url=' + _l.href.substr(0, _l.href.indexOf("#")) + '" /></head></html>');
  441. _d.close()
  442. } else {
  443. _track()
  444. }
  445. }
  446. this.toString = function() {
  447. return "[class SWFAddress]"
  448. };
  449. this.back = function() {
  450. _h.back()
  451. };
  452. this.forward = function() {
  453. _h.forward()
  454. };
  455. this.up = function() {
  456. var path = this.getPath();
  457. this.setValue(path.substr(0, path.lastIndexOf("/", path.length - 2) + (path.substr(path.length - 1) == "/" ? 1 : 0)))
  458. };
  459. this.go = function(delta) {
  460. _h.go(delta)
  461. };
  462. this.href = function(url, target) {
  463. target = typeof target != UNDEFINED ? target : "_self";
  464. if (target == "_self") {
  465. self.location.href = url
  466. } else {
  467. if (target == "_top") {
  468. _l.href = url
  469. } else {
  470. if (target == "_blank") {
  471. window.open(url)
  472. } else {
  473. _t.frames[target].location.href = url
  474. }
  475. }
  476. }
  477. };
  478. this.popup = function(url, name, options, handler) {
  479. try {
  480. var popup = window.open(url, name, eval(options));
  481. if (typeof handler != UNDEFINED) {
  482. eval(handler)
  483. }
  484. } catch (ex) {}
  485. _popup = arguments
  486. };
  487. this.getIds = function() {
  488. return _ids
  489. };
  490. this.getId = function(index) {
  491. return _ids[0]
  492. };
  493. this.setId = function(id) {
  494. _ids[0] = id
  495. };
  496. this.addId = function(id) {
  497. this.removeId(id);
  498. _ids.push(id)
  499. };
  500. this.removeId = function(id) {
  501. for (var i = 0; i < _ids.length; i++) {
  502. if (id == _ids[i]) {
  503. _ids.splice(i, 1);
  504. break
  505. }
  506. }
  507. };
  508. this.addEventListener = function(type, listener) {
  509. if (typeof _listeners[type] == UNDEFINED) {
  510. _listeners[type] = []
  511. }
  512. _listeners[type].push(listener)
  513. };
  514. this.removeEventListener = function(type, listener) {
  515. if (typeof _listeners[type] != UNDEFINED) {
  516. for (var i = 0, l; l = _listeners[type][i]; i++) {
  517. if (l == listener) {
  518. break
  519. }
  520. }
  521. _listeners[type].splice(i, 1)
  522. }
  523. };
  524. this.dispatchEvent = function(event) {
  525. if (this.hasEventListener(event.type)) {
  526. event.target = this;
  527. for (var i = 0, l; l = _listeners[event.type][i]; i++) {
  528. l(event)
  529. }
  530. return TRUE
  531. }
  532. return FALSE
  533. };
  534. this.hasEventListener = function(type) {
  535. return (typeof _listeners[type] != UNDEFINED && _listeners[type].length > 0)
  536. };
  537. this.getBaseURL = function() {
  538. var url = _l.href;
  539. if (url.indexOf("#") != -1) {
  540. url = url.substr(0, url.indexOf("#"))
  541. }
  542. if (url.substr(url.length - 1) == "/") {
  543. url = url.substr(0, url.length - 1)
  544. }
  545. return url
  546. };
  547. this.getStrict = function() {
  548. return _opts.strict
  549. };
  550. this.setStrict = function(strict) {
  551. _opts.strict = strict
  552. };
  553. this.getHistory = function() {
  554. return _opts.history
  555. };
  556. this.setHistory = function(history) {
  557. _opts.history = history
  558. };
  559. this.getTracker = function() {
  560. return _opts.tracker
  561. };
  562. this.setTracker = function(tracker) {
  563. _opts.tracker = tracker
  564. };
  565. this.getTitle = function() {
  566. return _d.title
  567. };
  568. this.setTitle = function(title) {
  569. if (!_supported) {
  570. return null
  571. }
  572. if (typeof title == UNDEFINED) {
  573. return
  574. }
  575. if (title == "null") {
  576. title = ""
  577. }
  578. title = _dc(title);
  579. _st(function() {
  580. _title = _d.title = title;
  581. if (_juststart && _frame && _frame.contentWindow && _frame.contentWindow.document) {
  582. _frame.contentWindow.document.title = title;
  583. _juststart = FALSE
  584. }
  585. if (!_justset && _mozilla) {
  586. _l.replace(_l.href.indexOf("#") != -1 ? _l.href : _l.href + "#")
  587. }
  588. _justset = FALSE
  589. }, 10)
  590. };
  591. this.getStatus = function() {
  592. return _t.status
  593. };
  594. this.setStatus = function(status) {
  595. if (!_supported) {
  596. return null
  597. }
  598. if (typeof status == UNDEFINED) {
  599. return
  600. }
  601. if (status == "null") {
  602. status = ""
  603. }
  604. status = _dc(status);
  605. if (!_safari) {
  606. status = _strictCheck((status != "null") ? status : "", TRUE);
  607. if (status == "/") {
  608. status = ""
  609. }
  610. if (!(/http(s)?:\/\//.test(status))) {
  611. var index = _l.href.indexOf("#");
  612. status = (index == -1 ? _l.href : _l.href.substr(0, index)) + "#" + status
  613. }
  614. _t.status = status
  615. }
  616. };
  617. this.resetStatus = function() {
  618. _t.status = ""
  619. };
  620. this.getValue = function() {
  621. if (!_supported) {
  622. return null
  623. }
  624. return _dc(_strictCheck(_ieLocal(_value, FALSE), FALSE))
  625. };
  626. this.setValue = function(value) {
  627. if (!_supported) {
  628. return null
  629. }
  630. if (typeof value == UNDEFINED) {
  631. return
  632. }
  633. if (value == "null") {
  634. value = ""
  635. }
  636. value = _ec(_dc(_strictCheck(value, TRUE)));
  637. if (value == "/") {
  638. value = ""
  639. }
  640. if (_value == value) {
  641. return
  642. }
  643. _justset = TRUE;
  644. _value = value;
  645. _silent = TRUE;
  646. _update.call(SWFAddress, true);
  647. _stack[_h.length] = _value;
  648. if (_safari) {
  649. if (_opts.history) {
  650. _l[ID][_l.pathname] = _stack.toString();
  651. _length = _h.length + 1;
  652. if (_version < 418) {
  653. if (_l.search == "") {
  654. _form.action = "#" + _value;
  655. _form.submit()
  656. }
  657. } else {
  658. if (_version < 523 || _value == "") {
  659. var evt = _d.createEvent("MouseEvents");
  660. evt.initEvent("click", TRUE, TRUE);
  661. var anchor = _d.createElement("a");
  662. anchor.href = "#" + _value;
  663. anchor.dispatchEvent(evt)
  664. } else {
  665. _l.hash = "#" + _value
  666. }
  667. }
  668. } else {
  669. _l.replace("#" + _value)
  670. }
  671. } else {
  672. if (_value != _getHash()) {
  673. if (_opts.history) {
  674. _l.hash = "#" + _dc(_ieLocal(_value, TRUE))
  675. } else {
  676. _l.replace("#" + _dc(_value))
  677. }
  678. }
  679. }
  680. if ((_msie && _version < 8) && _opts.history) {
  681. _st(_htmlWrite, 50)
  682. }
  683. if (_safari) {
  684. _st(function() {
  685. _silent = FALSE
  686. }, 1)
  687. } else {
  688. _silent = FALSE
  689. }
  690. };
  691. this.getPath = function() {
  692. var value = this.getValue();
  693. if (value.indexOf("?") != -1) {
  694. return value.split("?")[0]
  695. } else {
  696. if (value.indexOf("#") != -1) {
  697. return value.split("#")[0]
  698. } else {
  699. return value
  700. }
  701. }
  702. };
  703. this.getPathNames = function() {
  704. var path = this.getPath(),
  705. names = path.split("/");
  706. if (path.substr(0, 1) == "/" || path.length == 0) {
  707. names.splice(0, 1)
  708. }
  709. if (path.substr(path.length - 1, 1) == "/") {
  710. names.splice(names.length - 1, 1)
  711. }
  712. return names
  713. };
  714. this.getQueryString = function() {
  715. var value = this.getValue(),
  716. index = value.indexOf("?");
  717. if (index != -1 && index < value.length) {
  718. return value.substr(index + 1)
  719. }
  720. };
  721. this.getParameter = function(param) {
  722. var value = this.getValue();
  723. var index = value.indexOf("?");
  724. if (index != -1) {
  725. value = value.substr(index + 1);
  726. var p, params = value.split("&"),
  727. i = params.length,
  728. r = [];
  729. while (i--) {
  730. p = params[i].split("=");
  731. if (p[0] == param) {
  732. r.push(p[1])
  733. }
  734. }
  735. if (r.length != 0) {
  736. return r.length != 1 ? r : r[0]
  737. }
  738. }
  739. };
  740. this.getParameterNames = function() {
  741. var value = this.getValue();
  742. var index = value.indexOf("?");
  743. var names = [];
  744. if (index != -1) {
  745. value = value.substr(index + 1);
  746. if (value != "" && value.indexOf("=") != -1) {
  747. var params = value.split("&"),
  748. i = 0;
  749. while (i < params.length) {
  750. names.push(params[i].split("=")[0]);
  751. i++
  752. }
  753. }
  754. }
  755. return names
  756. };
  757. this.onInit = null;
  758. this.onChange = null;
  759. this.onInternalChange = null;
  760. this.onExternalChange = null;
  761. (function() {
  762. var _args;
  763. if (typeof FlashObject != UNDEFINED) {
  764. SWFObject = FlashObject
  765. }
  766. if (typeof SWFObject != UNDEFINED && SWFObject.prototype && SWFObject.prototype.write) {
  767. var _s1 = SWFObject.prototype.write;
  768. SWFObject.prototype.write = function() {
  769. _args = arguments;
  770. if (this.getAttribute("version").major < 8) {
  771. this.addVariable("$swfaddress", SWFAddress.getValue());
  772. ((typeof _args[0] == "string") ? document.getElementById(_args[0]) : _args[0]).so = this
  773. }
  774. var success;
  775. if (success = _s1.apply(this, _args)) {
  776. _ref.addId(this.getAttribute("id"))
  777. }
  778. return success
  779. }
  780. }
  781. if (typeof swfobject != UNDEFINED) {
  782. var _s2r = swfobject.registerObject;
  783. swfobject.registerObject = function() {
  784. _args = arguments;
  785. _s2r.apply(this, _args);
  786. _ref.addId(_args[0])
  787. };
  788. var _s2c = swfobject.createSWF;
  789. swfobject.createSWF = function() {
  790. _args = arguments;
  791. var swf = _s2c.apply(this, _args);
  792. if (swf) {
  793. _ref.addId(_args[0].id)
  794. }
  795. return swf
  796. };
  797. var _s2e = swfobject.embedSWF;
  798. swfobject.embedSWF = function() {
  799. _args = arguments;
  800. if (typeof _args[8] == UNDEFINED) {
  801. _args[8] = {}
  802. }
  803. if (typeof _args[8].id == UNDEFINED) {
  804. _args[8].id = _args[1]
  805. }
  806. _s2e.apply(this, _args);
  807. _ref.addId(_args[8].id)
  808. }
  809. }
  810. if (typeof UFO != UNDEFINED) {
  811. var _u = UFO.create;
  812. UFO.create = function() {
  813. _args = arguments;
  814. _u.apply(this, _args);
  815. _ref.addId(_args[0].id)
  816. }
  817. }
  818. if (typeof AC_FL_RunContent != UNDEFINED) {
  819. var _a = AC_FL_RunContent;
  820. AC_FL_RunContent = function() {
  821. _args = arguments;
  822. _a.apply(this, _args);
  823. for (var i = 0, l = _args.length; i < l; i++) {
  824. if (_args[i] == "id") {
  825. _ref.addId(_args[i + 1])
  826. }
  827. }
  828. }
  829. }
  830. })()
  831. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement