Advertisement
enedil

Untitled

Jan 28th, 2014
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.96 KB | None | 0 0
  1. <html lang="en">
  2. <head>
  3. <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  4. <link href="history/history.css" type="text/css" rel="stylesheet">
  5. <title></title>
  6. <script language="javascript" src="AC_OETags.js">
  7. // Flash Player Version Detection - Rev 1.6
  8. // Detect Client Browser type
  9. // Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
  10. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
  11. var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
  12. var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
  13. function ControlVersion()
  14. {
  15. var version;
  16. var axo;
  17. var e;
  18. // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
  19. try {
  20. // version will be set for 7.X or greater players
  21. axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
  22. version = axo.GetVariable("$version");
  23. } catch (e) {
  24. }
  25. if (!version)
  26. {
  27. try {
  28. // version will be set for 6.X players only
  29. axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
  30. // installed player is some revision of 6.0
  31. // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
  32. // so we have to be careful.
  33. // default to the first public version
  34. version = "WIN 6,0,21,0";
  35. // throws if AllowScripAccess does not exist (introduced in 6.0r47)
  36. axo.AllowScriptAccess = "always";
  37. // safe to call for 6.0r47 or greater
  38. version = axo.GetVariable("$version");
  39. } catch (e) {
  40. }
  41. }
  42. if (!version)
  43. {
  44. try {
  45. // version will be set for 4.X or 5.X player
  46. axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
  47. version = axo.GetVariable("$version");
  48. } catch (e) {
  49. }
  50. }
  51. if (!version)
  52. {
  53. try {
  54. // version will be set for 3.X player
  55. axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
  56. version = "WIN 3,0,18,0";
  57. } catch (e) {
  58. }
  59. }
  60. if (!version)
  61. {
  62. try {
  63. // version will be set for 2.X player
  64. axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
  65. version = "WIN 2,0,0,11";
  66. } catch (e) {
  67. version = -1;
  68. }
  69. }
  70. return version;
  71. }
  72. // JavaScript helper required to detect Flash Player PlugIn version information
  73. function GetSwfVer(){
  74. // NS/Opera version >= 3 check for Flash plugin in plugin array
  75. var flashVer = -1;
  76. if (navigator.plugins != null && navigator.plugins.length > 0) {
  77. if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
  78. var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
  79. var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
  80. var descArray = flashDescription.split(" ");
  81. var tempArrayMajor = descArray[2].split(".");
  82. var versionMajor = tempArrayMajor[0];
  83. var versionMinor = tempArrayMajor[1];
  84. var versionRevision = descArray[3];
  85. if (versionRevision == "") {
  86. versionRevision = descArray[4];
  87. }
  88. if (versionRevision[0] == "d") {
  89. versionRevision = versionRevision.substring(1);
  90. } else if (versionRevision[0] == "r") {
  91. versionRevision = versionRevision.substring(1);
  92. if (versionRevision.indexOf("d") > 0) {
  93. versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
  94. }
  95. } else if (versionRevision[0] == "b") {
  96. versionRevision = versionRevision.substring(1);
  97. }
  98. var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
  99. }
  100. }
  101. // MSN/WebTV 2.6 supports Flash 4
  102. else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
  103. // WebTV 2.5 supports Flash 3
  104. else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
  105. // older WebTV supports Flash 2
  106. else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
  107. else if ( isIE && isWin && !isOpera ) {
  108. flashVer = ControlVersion();
  109. }
  110. return flashVer;
  111. }
  112. // When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
  113. function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
  114. {
  115. versionStr = GetSwfVer();
  116. if (versionStr == -1 ) {
  117. return false;
  118. } else if (versionStr != 0) {
  119. if(isIE && isWin && !isOpera) {
  120. // Given "WIN 2,0,0,11"
  121. tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
  122. tempString = tempArray[1]; // "2,0,0,11"
  123. versionArray = tempString.split(","); // ['2', '0', '0', '11']
  124. } else {
  125. versionArray = versionStr.split(".");
  126. }
  127. var versionMajor = versionArray[0];
  128. var versionMinor = versionArray[1];
  129. var versionRevision = versionArray[2];
  130. // is the major.revision >= requested major.revision AND the minor version >= requested minor
  131. if (versionMajor > parseFloat(reqMajorVer)) {
  132. return true;
  133. } else if (versionMajor == parseFloat(reqMajorVer)) {
  134. if (versionMinor > parseFloat(reqMinorVer))
  135. return true;
  136. else if (versionMinor == parseFloat(reqMinorVer)) {
  137. if (versionRevision >= parseFloat(reqRevision))
  138. return true;
  139. }
  140. }
  141. return false;
  142. }
  143. }
  144. function AC_AddExtension(src, ext)
  145. {
  146. var qIndex = src.indexOf('?');
  147. if ( qIndex != -1)
  148. {
  149. // Add the extention (if needed) before the query params
  150. var path = src.substring(0, qIndex);
  151. if (path.length >= ext.length && path.lastIndexOf(ext) == (path.length - ext.length))
  152. return src;
  153. else
  154. return src.replace(/\?/, ext+'?');
  155. }
  156. else
  157. {
  158. // Add the extension (if needed) to the end of the URL
  159. if (src.length >= ext.length && src.lastIndexOf(ext) == (src.length - ext.length))
  160. return src; // Already have extension
  161. else
  162. return src + ext;
  163. }
  164. }
  165. function AC_Generateobj(objAttrs, params, embedAttrs)
  166. {
  167. var str = '';
  168. if (isIE && isWin && !isOpera)
  169. {
  170. str += '<object ';
  171. for (var i in objAttrs)
  172. str += i + '="' + objAttrs[i] + '" ';
  173. str += '>';
  174. for (var i in params)
  175. str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  176. str += '</object>';
  177. } else {
  178. str += '<embed ';
  179. for (var i in embedAttrs)
  180. str += i + '="' + embedAttrs[i] + '" ';
  181. str += '> </embed>';
  182. }
  183. document.write(str);
  184. }
  185. function AC_FL_RunContent(){
  186. var ret =
  187. AC_GetArgs
  188. ( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
  189. , "application/x-shockwave-flash"
  190. );
  191. AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
  192. }
  193. function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  194. var ret = new Object();
  195. ret.embedAttrs = new Object();
  196. ret.params = new Object();
  197. ret.objAttrs = new Object();
  198. for (var i=0; i < args.length; i=i+2){
  199. var currArg = args[i].toLowerCase();
  200. switch (currArg){
  201. case "classid":
  202. break;
  203. case "pluginspage":
  204. ret.embedAttrs[args[i]] = args[i+1];
  205. break;
  206. case "src":
  207. case "movie":
  208. args[i+1] = AC_AddExtension(args[i+1], ext);
  209. ret.embedAttrs["src"] = args[i+1];
  210. ret.params[srcParamName] = args[i+1];
  211. break;
  212. case "onafterupdate":
  213. case "onbeforeupdate":
  214. case "onblur":
  215. case "oncellchange":
  216. case "onclick":
  217. case "ondblClick":
  218. case "ondrag":
  219. case "ondragend":
  220. case "ondragenter":
  221. case "ondragleave":
  222. case "ondragover":
  223. case "ondrop":
  224. case "onfinish":
  225. case "onfocus":
  226. case "onhelp":
  227. case "onmousedown":
  228. case "onmouseup":
  229. case "onmouseover":
  230. case "onmousemove":
  231. case "onmouseout":
  232. case "onkeypress":
  233. case "onkeydown":
  234. case "onkeyup":
  235. case "onload":
  236. case "onlosecapture":
  237. case "onpropertychange":
  238. case "onreadystatechange":
  239. case "onrowsdelete":
  240. case "onrowenter":
  241. case "onrowexit":
  242. case "onrowsinserted":
  243. case "onstart":
  244. case "onscroll":
  245. case "onbeforeeditfocus":
  246. case "onactivate":
  247. case "onbeforedeactivate":
  248. case "ondeactivate":
  249. case "type":
  250. case "codebase":
  251. ret.objAttrs[args[i]] = args[i+1];
  252. break;
  253. case "id":
  254. case "width":
  255. case "height":
  256. case "align":
  257. case "vspace":
  258. case "hspace":
  259. case "class":
  260. case "title":
  261. case "accesskey":
  262. case "name":
  263. case "tabindex":
  264. ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
  265. break;
  266. default:
  267. ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
  268. }
  269. }
  270. ret.objAttrs["classid"] = classid;
  271. if (mimeType) ret.embedAttrs["type"] = mimeType;
  272. return ret;
  273. }
  274. </script>
  275. <script language="javascript" src="history/history.js">
  276. BrowserHistoryUtils = {
  277. addEvent: function(elm, evType, fn, useCapture) {
  278. useCapture = useCapture || false;
  279. if (elm.addEventListener) {
  280. elm.addEventListener(evType, fn, useCapture);
  281. return true;
  282. }
  283. else if (elm.attachEvent) {
  284. var r = elm.attachEvent('on' + evType, fn);
  285. return r;
  286. }
  287. else {
  288. elm['on' + evType] = fn;
  289. }
  290. }
  291. }
  292. BrowserHistory = (function() {
  293. // type of browser
  294. var browser = {
  295. ie: false,
  296. firefox: false,
  297. safari: false,
  298. opera: false,
  299. version: -1
  300. };
  301. // if setDefaultURL has been called, our first clue
  302. // that the SWF is ready and listening
  303. //var swfReady = false;
  304. // the URL we'll send to the SWF once it is ready
  305. //var pendingURL = '';
  306. // Default app state URL to use when no fragment ID present
  307. var defaultHash = '';
  308. // Last-known app state URL
  309. var currentHref = document.location.href;
  310. // Initial URL (used only by IE)
  311. var initialHref = document.location.href;
  312. // Initial URL (used only by IE)
  313. var initialHash = document.location.hash;
  314. // History frame source URL prefix (used only by IE)
  315. var historyFrameSourcePrefix = 'history/historyFrame.html?';
  316. // History maintenance (used only by Safari)
  317. var currentHistoryLength = -1;
  318. var historyHash = [];
  319. var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
  320. var backStack = [];
  321. var forwardStack = [];
  322. var currentObjectId = null;
  323. //UserAgent detection
  324. var useragent = navigator.userAgent.toLowerCase();
  325. if (useragent.indexOf("opera") != -1) {
  326. browser.opera = true;
  327. } else if (useragent.indexOf("msie") != -1) {
  328. browser.ie = true;
  329. browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
  330. } else if (useragent.indexOf("safari") != -1) {
  331. browser.safari = true;
  332. browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
  333. } else if (useragent.indexOf("gecko") != -1) {
  334. browser.firefox = true;
  335. }
  336. if (browser.ie == true && browser.version == 7) {
  337. window["_ie_firstload"] = false;
  338. }
  339. // Accessor functions for obtaining specific elements of the page.
  340. function getHistoryFrame()
  341. {
  342. return document.getElementById('ie_historyFrame');
  343. }
  344. function getAnchorElement()
  345. {
  346. return document.getElementById('firefox_anchorDiv');
  347. }
  348. function getFormElement()
  349. {
  350. return document.getElementById('safari_formDiv');
  351. }
  352. function getRememberElement()
  353. {
  354. return document.getElementById("safari_remember_field");
  355. }
  356. // Get the Flash player object for performing ExternalInterface callbacks.
  357. // Updated for changes to SWFObject2.
  358. function getPlayer(id) {
  359. if (id && document.getElementById(id)) {
  360. var r = document.getElementById(id);
  361. if (typeof r.SetVariable != "undefined") {
  362. return r;
  363. }
  364. else {
  365. var o = r.getElementsByTagName("object");
  366. var e = r.getElementsByTagName("embed");
  367. if (o.length > 0 && typeof o[0].SetVariable != "undefined") {
  368. return o[0];
  369. }
  370. else if (e.length > 0 && typeof e[0].SetVariable != "undefined") {
  371. return e[0];
  372. }
  373. }
  374. }
  375. else {
  376. var o = document.getElementsByTagName("object");
  377. var e = document.getElementsByTagName("embed");
  378. if (e.length > 0 && typeof e[0].SetVariable != "undefined") {
  379. return e[0];
  380. }
  381. else if (o.length > 0 && typeof o[0].SetVariable != "undefined") {
  382. return o[0];
  383. }
  384. else if (o.length > 1 && typeof o[1].SetVariable != "undefined") {
  385. return o[1];
  386. }
  387. }
  388. return undefined;
  389. }
  390. function getPlayers() {
  391. var players = [];
  392. if (players.length == 0) {
  393. var tmp = document.getElementsByTagName('object');
  394. players = tmp;
  395. }
  396. if (players.length == 0 || players[0].object == null) {
  397. var tmp = document.getElementsByTagName('embed');
  398. players = tmp;
  399. }
  400. return players;
  401. }
  402. function getIframeHash() {
  403. var doc = getHistoryFrame().contentWindow.document;
  404. var hash = String(doc.location.search);
  405. if (hash.length == 1 && hash.charAt(0) == "?") {
  406. hash = "";
  407. }
  408. else if (hash.length >= 2 && hash.charAt(0) == "?") {
  409. hash = hash.substring(1);
  410. }
  411. return hash;
  412. }
  413. /* Get the current location hash excluding the '#' symbol. */
  414. function getHash() {
  415. // It would be nice if we could use document.location.hash here,
  416. // but it's faulty sometimes.
  417. var idx = document.location.href.indexOf('#');
  418. return (idx >= 0) ? document.location.href.substr(idx+1) : '';
  419. }
  420. /* Get the current location hash excluding the '#' symbol. */
  421. function setHash(hash) {
  422. // It would be nice if we could use document.location.hash here,
  423. // but it's faulty sometimes.
  424. if (hash == '') hash = '#'
  425. document.location.hash = hash;
  426. }
  427. function createState(baseUrl, newUrl, flexAppUrl) {
  428. return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
  429. }
  430. /* Add a history entry to the browser.
  431. * baseUrl: the portion of the location prior to the '#'
  432. * newUrl: the entire new URL, including '#' and following fragment
  433. * flexAppUrl: the portion of the location following the '#' only
  434. */
  435. function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
  436. //delete all the history entries
  437. forwardStack = [];
  438. if (browser.ie) {
  439. //Check to see if we are being asked to do a navigate for the first
  440. //history entry, and if so ignore, because it's coming from the creation
  441. //of the history iframe
  442. if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
  443. currentHref = initialHref;
  444. return;
  445. }
  446. if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
  447. newUrl = baseUrl + '#' + defaultHash;
  448. flexAppUrl = defaultHash;
  449. } else {
  450. // for IE, tell the history frame to go somewhere without a '#'
  451. // in order to get this entry into the browser history.
  452. getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
  453. }
  454. setHash(flexAppUrl);
  455. } else {
  456. //ADR
  457. if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
  458. initialState = createState(baseUrl, newUrl, flexAppUrl);
  459. } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
  460. backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
  461. }
  462. if (browser.safari) {
  463. // for Safari, submit a form whose action points to the desired URL
  464. if (browser.version <= 419.3) {
  465. var file = window.location.pathname.toString();
  466. file = file.substring(file.lastIndexOf("/")+1);
  467. getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
  468. //get the current elements and add them to the form
  469. var qs = window.location.search.substring(1);
  470. var qs_arr = qs.split("&");
  471. for (var i = 0; i < qs_arr.length; i++) {
  472. var tmp = qs_arr[i].split("=");
  473. var elem = document.createElement("input");
  474. elem.type = "hidden";
  475. elem.name = tmp[0];
  476. elem.value = tmp[1];
  477. document.forms.historyForm.appendChild(elem);
  478. }
  479. document.forms.historyForm.submit();
  480. } else {
  481. top.location.hash = flexAppUrl;
  482. }
  483. // We also have to maintain the history by hand for Safari
  484. historyHash[history.length] = flexAppUrl;
  485. _storeStates();
  486. } else {
  487. // Otherwise, write an anchor into the page and tell the browser to go there
  488. addAnchor(flexAppUrl);
  489. setHash(flexAppUrl);
  490. }
  491. }
  492. backStack.push(createState(baseUrl, newUrl, flexAppUrl));
  493. }
  494. function _storeStates() {
  495. if (browser.safari) {
  496. getRememberElement().value = historyHash.join(",");
  497. }
  498. }
  499. function handleBackButton() {
  500. //The "current" page is always at the top of the history stack.
  501. var current = backStack.pop();
  502. if (!current) { return; }
  503. var last = backStack[backStack.length - 1];
  504. if (!last && backStack.length == 0){
  505. last = initialState;
  506. }
  507. forwardStack.push(current);
  508. }
  509. function handleForwardButton() {
  510. //summary: private method. Do not call this directly.
  511. var last = forwardStack.pop();
  512. if (!last) { return; }
  513. backStack.push(last);
  514. }
  515. function handleArbitraryUrl() {
  516. //delete all the history entries
  517. forwardStack = [];
  518. }
  519. /* Called periodically to poll to see if we need to detect navigation that has occurred */
  520. function checkForUrlChange() {
  521. if (browser.ie) {
  522. if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
  523. //This occurs when the user has navigated to a specific URL
  524. //within the app, and didn't use browser back/forward
  525. //IE seems to have a bug where it stops updating the URL it
  526. //shows the end-user at this point, but programatically it
  527. //appears to be correct. Do a full app reload to get around
  528. //this issue.
  529. if (browser.version < 7) {
  530. currentHref = document.location.href;
  531. document.location.reload();
  532. } else {
  533. if (getHash() != getIframeHash()) {
  534. // this.iframe.src = this.blankURL + hash;
  535. var sourceToSet = historyFrameSourcePrefix + getHash();
  536. getHistoryFrame().src = sourceToSet;
  537. }
  538. }
  539. }
  540. }
  541. if (browser.safari) {
  542. // For Safari, we have to check to see if history.length changed.
  543. if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
  544. //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
  545. // If it did change, then we have to look the old state up
  546. // in our hand-maintained array since document.location.hash
  547. // won't have changed, then call back into BrowserManager.
  548. currentHistoryLength = history.length;
  549. var flexAppUrl = historyHash[currentHistoryLength];
  550. if (flexAppUrl == '') {
  551. //flexAppUrl = defaultHash;
  552. }
  553. //ADR: to fix multiple
  554. if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
  555. var pl = getPlayers();
  556. for (var i = 0; i < pl.length; i++) {
  557. pl[i].browserURLChange(flexAppUrl);
  558. }
  559. } else {
  560. getPlayer().browserURLChange(flexAppUrl);
  561. }
  562. _storeStates();
  563. }
  564. }
  565. if (browser.firefox) {
  566. if (currentHref != document.location.href) {
  567. var bsl = backStack.length;
  568. var urlActions = {
  569. back: false,
  570. forward: false,
  571. set: false
  572. }
  573. if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
  574. urlActions.back = true;
  575. // FIXME: could this ever be a forward button?
  576. // we can't clear it because we still need to check for forwards. Ugg.
  577. // clearInterval(this.locationTimer);
  578. handleBackButton();
  579. }
  580. // first check to see if we could have gone forward. We always halt on
  581. // a no-hash item.
  582. if (forwardStack.length > 0) {
  583. if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
  584. urlActions.forward = true;
  585. handleForwardButton();
  586. }
  587. }
  588. // ok, that didn't work, try someplace back in the history stack
  589. if ((bsl >= 2) && (backStack[bsl - 2])) {
  590. if (backStack[bsl - 2].flexAppUrl == getHash()) {
  591. urlActions.back = true;
  592. handleBackButton();
  593. }
  594. }
  595. if (!urlActions.back && !urlActions.forward) {
  596. var foundInStacks = {
  597. back: -1,
  598. forward: -1
  599. }
  600. for (var i = 0; i < backStack.length; i++) {
  601. if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
  602. arbitraryUrl = true;
  603. foundInStacks.back = i;
  604. }
  605. }
  606. for (var i = 0; i < forwardStack.length; i++) {
  607. if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
  608. arbitraryUrl = true;
  609. foundInStacks.forward = i;
  610. }
  611. }
  612. handleArbitraryUrl();
  613. }
  614. // Firefox changed; do a callback into BrowserManager to tell it.
  615. currentHref = document.location.href;
  616. var flexAppUrl = getHash();
  617. if (flexAppUrl == '') {
  618. //flexAppUrl = defaultHash;
  619. }
  620. //ADR: to fix multiple
  621. if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
  622. var pl = getPlayers();
  623. for (var i = 0; i < pl.length; i++) {
  624. pl[i].browserURLChange(flexAppUrl);
  625. }
  626. } else {
  627. getPlayer().browserURLChange(flexAppUrl);
  628. }
  629. }
  630. }
  631. //setTimeout(checkForUrlChange, 50);
  632. }
  633. /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
  634. function addAnchor(flexAppUrl)
  635. {
  636. if (document.getElementsByName(flexAppUrl).length == 0) {
  637. getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
  638. }
  639. }
  640. var _initialize = function () {
  641. if (browser.ie)
  642. {
  643. var scripts = document.getElementsByTagName('script');
  644. for (var i = 0, s; s = scripts[i]; i++) {
  645. if (s.src.indexOf("history.js") > -1) {
  646. var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
  647. }
  648. }
  649. historyFrameSourcePrefix = iframe_location + "?";
  650. var src = historyFrameSourcePrefix;
  651. var iframe = document.createElement("iframe");
  652. iframe.id = 'ie_historyFrame';
  653. iframe.name = 'ie_historyFrame';
  654. //iframe.src = historyFrameSourcePrefix;
  655. try {
  656. document.body.appendChild(iframe);
  657. } catch(e) {
  658. setTimeout(function() {
  659. document.body.appendChild(iframe);
  660. }, 0);
  661. }
  662. }
  663. if (browser.safari)
  664. {
  665. var rememberDiv = document.createElement("div");
  666. rememberDiv.id = 'safari_rememberDiv';
  667. document.body.appendChild(rememberDiv);
  668. rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
  669. var formDiv = document.createElement("div");
  670. formDiv.id = 'safari_formDiv';
  671. document.body.appendChild(formDiv);
  672. var reloader_content = document.createElement('div');
  673. reloader_content.id = 'safarireloader';
  674. var scripts = document.getElementsByTagName('script');
  675. for (var i = 0, s; s = scripts[i]; i++) {
  676. if (s.src.indexOf("history.js") > -1) {
  677. html = (new String(s.src)).replace(".js", ".html");
  678. }
  679. }
  680. reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
  681. document.body.appendChild(reloader_content);
  682. reloader_content.style.position = 'absolute';
  683. reloader_content.style.left = reloader_content.style.top = '-9999px';
  684. iframe = reloader_content.getElementsByTagName('iframe')[0];
  685. if (document.getElementById("safari_remember_field").value != "" ) {
  686. historyHash = document.getElementById("safari_remember_field").value.split(",");
  687. }
  688. }
  689. if (browser.firefox)
  690. {
  691. var anchorDiv = document.createElement("div");
  692. anchorDiv.id = 'firefox_anchorDiv';
  693. document.body.appendChild(anchorDiv);
  694. }
  695. //setTimeout(checkForUrlChange, 50);
  696. }
  697. return {
  698. historyHash: historyHash,
  699. backStack: function() { return backStack; },
  700. forwardStack: function() { return forwardStack },
  701. getPlayer: getPlayer,
  702. initialize: function(src) {
  703. _initialize(src);
  704. },
  705. setURL: function(url) {
  706. document.location.href = url;
  707. },
  708. getURL: function() {
  709. return document.location.href;
  710. },
  711. getTitle: function() {
  712. return document.title;
  713. },
  714. setTitle: function(title) {
  715. try {
  716. backStack[backStack.length - 1].title = title;
  717. } catch(e) { }
  718. //if on safari, set the title to be the empty string.
  719. if (browser.safari) {
  720. if (title == "") {
  721. try {
  722. var tmp = window.location.href.toString();
  723. title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
  724. } catch(e) {
  725. title = "";
  726. }
  727. }
  728. }
  729. document.title = title;
  730. },
  731. setDefaultURL: function(def)
  732. {
  733. defaultHash = def;
  734. def = getHash();
  735. //trailing ? is important else an extra frame gets added to the history
  736. //when navigating back to the first page. Alternatively could check
  737. //in history frame navigation to compare # and ?.
  738. if (browser.ie)
  739. {
  740. window['_ie_firstload'] = true;
  741. var sourceToSet = historyFrameSourcePrefix + def;
  742. var func = function() {
  743. getHistoryFrame().src = sourceToSet;
  744. window.location.replace("#" + def);
  745. setInterval(checkForUrlChange, 50);
  746. }
  747. try {
  748. func();
  749. } catch(e) {
  750. window.setTimeout(function() { func(); }, 0);
  751. }
  752. }
  753. if (browser.safari)
  754. {
  755. currentHistoryLength = history.length;
  756. if (historyHash.length == 0) {
  757. historyHash[currentHistoryLength] = def;
  758. var newloc = "#" + def;
  759. window.location.replace(newloc);
  760. } else {
  761. //alert(historyHash[historyHash.length-1]);
  762. }
  763. //setHash(def);
  764. setInterval(checkForUrlChange, 50);
  765. }
  766. if (browser.firefox || browser.opera)
  767. {
  768. var reg = new RegExp("#" + def + "$");
  769. if (window.location.toString().match(reg)) {
  770. } else {
  771. var newloc ="#" + def;
  772. window.location.replace(newloc);
  773. }
  774. setInterval(checkForUrlChange, 50);
  775. //setHash(def);
  776. }
  777. },
  778. /* Set the current browser URL; called from inside BrowserManager to propagate
  779. * the application state out to the container.
  780. */
  781. setBrowserURL: function(flexAppUrl, objectId) {
  782. if (browser.ie && typeof objectId != "undefined") {
  783. currentObjectId = objectId;
  784. }
  785. //fromIframe = fromIframe || false;
  786. //fromFlex = fromFlex || false;
  787. //alert("setBrowserURL: " + flexAppUrl);
  788. //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
  789. var pos = document.location.href.indexOf('#');
  790. var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
  791. var newUrl = baseUrl + '#' + flexAppUrl;
  792. if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
  793. currentHref = newUrl;
  794. addHistoryEntry(baseUrl, newUrl, flexAppUrl);
  795. currentHistoryLength = history.length;
  796. }
  797. return false;
  798. },
  799. browserURLChange: function(flexAppUrl) {
  800. var objectId = null;
  801. if (browser.ie && currentObjectId != null) {
  802. objectId = currentObjectId;
  803. }
  804. pendingURL = '';
  805. if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
  806. var pl = getPlayers();
  807. for (var i = 0; i < pl.length; i++) {
  808. try {
  809. pl[i].browserURLChange(flexAppUrl);
  810. } catch(e) { }
  811. }
  812. } else {
  813. try {
  814. getPlayer(objectId).browserURLChange(flexAppUrl);
  815. } catch(e) { }
  816. }
  817. currentObjectId = null;
  818. }
  819. }
  820. })();
  821. // Initialization
  822. // Automated unit testing and other diagnostics
  823. function setURL(url)
  824. {
  825. document.location.href = url;
  826. }
  827. function backButton()
  828. {
  829. history.back();
  830. }
  831. function forwardButton()
  832. {
  833. history.forward();
  834. }
  835. function goForwardOrBackInHistory(step)
  836. {
  837. history.go(step);
  838. }
  839. //BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
  840. (function(i) {
  841. var u =navigator.userAgent;var e=/*@cc_on!@*/false;
  842. var st = setTimeout;
  843. if(/webkit/i.test(u)){
  844. st(function(){
  845. var dr=document.readyState;
  846. if(dr=="loaded"||dr=="complete"){i()}
  847. else{st(arguments.callee,10);}},10);
  848. } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
  849. document.addEventListener("DOMContentLoaded",i,false);
  850. } else if(e){
  851. (function(){
  852. var t=document.createElement('doc:rdy');
  853. try{t.doScroll('left');
  854. i();t=null;
  855. }catch(e){st(arguments.callee,0);}})();
  856. } else{
  857. window.onload=i;
  858. }
  859. })( function() {BrowserHistory.initialize();} );
  860. </script>
  861. <style>
  862. <script type="text/javascript" language="JavaScript">
  863. <!--
  864. // -----------------------------------------------------------------------------
  865. // Globals
  866. // Major version of Flash required
  867. var requiredMajorVersion = 9;
  868. // Minor version of Flash required
  869. var requiredMinorVersion = 0;
  870. // Minor version of Flash required
  871. var requiredRevision = 124;
  872. // -----------------------------------------------------------------------------
  873. // -->
  874. </script>
  875. </head>
  876. <body scroll="no">
  877. <script type="text/javascript" language="JavaScript">
  878. <!--
  879. // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
  880. var hasProductInstall = DetectFlashVer(6, 0, 65);
  881. // Version check based upon the values defined in globals
  882. var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
  883. if ( hasProductInstall && !hasRequestedVersion ) {
  884. // DO NOT MODIFY THE FOLLOWING FOUR LINES
  885. // Location visited after installation is complete if installation is required
  886. var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
  887. var MMredirectURL = window.location;
  888. document.title = document.title.slice(0, 47) + " - Flash Player Installation";
  889. var MMdoctitle = document.title;
  890. AC_FL_RunContent(
  891. "src", "playerProductInstall",
  892. "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
  893. "width", "100%",
  894. "height", "100%",
  895. "align", "middle",
  896. "id", "swfcombiner",
  897. "quality", "high",
  898. "bgcolor", "#ffffff",
  899. "name", "swfcombiner",
  900. "allowScriptAccess","sameDomain",
  901. "type", "application/x-shockwave-flash",
  902. "pluginspage", "http://www.adobe.com/go/getflashplayer"
  903. );
  904. } else if (hasRequestedVersion) {
  905. // if we've detected an acceptable version
  906. // embed the Flash Content SWF when all tests are passed
  907. AC_FL_RunContent(
  908. "src", "swfcombiner",
  909. "width", "100%",
  910. "height", "100%",
  911. "align", "middle",
  912. "id", "swfcombiner",
  913. "quality", "high",
  914. "bgcolor", "#ffffff",
  915. "name", "swfcombiner",
  916. "allowScriptAccess","sameDomain",
  917. "type", "application/x-shockwave-flash",
  918. "pluginspage", "http://www.adobe.com/go/getflashplayer"
  919. );
  920. } else { // flash is too old or we can't detect the plugin
  921. var alternateContent = '<div align="center"><br><br><a href="http://www.adobe.com/go/getflash/" target="_blank" ><img src="flash_128.png" alt=" " style="border:0px" border="0px"></a><br> '
  922. + '<br>'
  923. + 'This content requires the Adobe Flash Player. You can download the Adobe Flash Player from the following adress:<br>'
  924. + '<a href="http://www.adobe.com/go/getflash/" style="font-size:14pt" target="_blank">http://www.adobe.com/go/getflash/</a><br><br><br>'
  925. + '</div>';
  926. document.write(alternateContent);
  927. }
  928. // -->
  929. </script>
  930. <embed id="swfcombiner" align="middle" height="100%" width="100%" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" allowscriptaccess="sameDomain" name="swfcombiner" bgcolor="#ffffff" quality="high" src="swfcombiner.swf">
  931. <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfcombiner" width="100%" height="100%" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"> <param name="movie" value="swfcombiner.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="allowScriptAccess" value="sameDomain" /> <embed src="swfcombiner.swf" quality="high" bgcolor="#ffffff" width="100%" height="100%" name="swfcombiner" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"> </embed> </object> </noscript>
  932. <div id="firefox_anchorDiv"></div>
  933. </body>
  934. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement