/** * SWFAddress 2.2: Deep linking for Flash and Ajax <http://www.asual.com/swfaddress/> * * SWFAddress is (c) 2006-2008 Rostislav Hristov and contributors * This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> * */if(typeof com=="undefined"){var com={}}if(typeof com.asual=="undefined"){com.asual={}}if(typeof com.asual.util=="undefined"){com.asual.util={}}com.asual.util.Browser=new function(){var J=-1,I=navigator.userAgent,H=false,F=false,E=false,D=false,C=false,B=false,A=false;var G=function(L,K){return parseFloat(I.substr(I.indexOf(L)+K))};if(H=/MSIE/.test(I)){J=G("MSIE",4)}if(E=/AppleWebKit/.test(I)){J=G("Safari",7)}if(D=/Opera/.test(I)){J=parseFloat(navigator.appVersion)}if(F=/Camino/.test(I)){J=G("Camino",7)}if(C=/Firefox/.test(I)){J=G("Firefox",8)}if(B=/Netscape/.test(I)){J=G("Netscape",9)}if(A=/Mozilla/.test(I)&&/rv:/.test(I)){J=G("rv:",3)}this.getVersion=function(){return J};this.isIE=function(){return H};this.isSafari=function(){return E};this.isOpera=function(){return D};this.isCamino=function(){return F};this.isFirefox=function(){return C};this.isNetscape=function(){return B};this.isMozilla=function(){return A}};com.asual.util.Events=new function(){var C="DOMContentLoaded",A="onstop",C=document,G=[],F=com.asual.util,E=F.Browser;if(E.isIE()||E.isSafari()){(function(){try{if((E.isIE()&&C.body.appendChild)||!/loaded|complete/.test(C.readyState)){C.documentElement.doScroll("left")}}catch(I){return setTimeout(arguments.callee,0)}for(var H=0,I;I=G[H];H++){if(I.t==C){I.l.call(null)}}})()}this.addListener=function(J,I,H){G.push({o:J,t:I,l:H});if(!(I==C&&(E.isIE()||E.isSafari()))){if(J.addEventListener){J.addEventListener(I,H,false)}else{if(J.attachEvent){J.attachEvent("on"+I,H)}}}};this.removeListener=function(L,H,J){for(var I=0,K;K=G[I];I++){if(K.o==L&&K.t==H&&K.l==J){G.splice(I,1);break}}if(!(H==C&&(E.isIE()||E.isSafari()))){if(L.removeEventListener){L.removeEventListener(H,J,false)}else{if(L.detachEvent){L.detachEvent("on"+H,J)}}}};var D=function(){if(C.readyState=="interactive"){function H(){C.detachEvent(A,H);_unload()}C.attachEvent(A,H);window.setTimeout(function(){C.detachEvent(A,H)},0)}};if(E.isIE()){window.attachEvent("onbeforeunload",D)}var B=function(){for(var I=0,H;H=G[I];I++){if(H.t!=C){F.Events.removeListener(H.o,H.t,H.l)}}};this.addListener(window,"unload",B)};com.asual.util.Functions=new function(){this.extend=function(A,C){function B(){}B.prototype=A.prototype;C.prototype=new B();C.prototype.constructor=C;C.superConstructor=A;C.superClass=A.prototype;return C};this.bind=function(F,E,C){for(var B=2,D,A=[];D=arguments[B];B++){A.push(D)}return function(){return F.apply(E,A)}}};com.asual.util.WEBAddressEvent=function(B){var E=com.asual.util.WEBAddress;this.toString=function(){return"[object WEBAddressEvent]"};this.type=B;this.target=[E][0];this.value=E.getValue();this.path=E.getPath();this.pathNames=E.getPathNames();this.parameters={};var D=E.getParameterNames();for(var C=0,A=D.length;C<A;C++){this.parameters[D[C]]=E.getParameter(D[C])}this.parametersNames=D};com.asual.util.WEBAddressEvent.INIT="init";com.asual.util.WEBAddressEvent.CHANGE="change";com.asual.util.WEBAddress=new function(){var ID="",_2f="function",_30="undefined",_31=com.asual.util,_32=_31.Browser,_33=_31.Events,_34=_31.Functions,_35=_32.getVersion(),_36=false,_t=top,_d=_t.document,_h=_t.history,_l=_t.location,_st=setTimeout,_dc=decodeURIComponent,_ec=encodeURIComponent,_3e,_3f,_40,_41=_d.title,_42=_h.length,_43=false,_44=false,_45=[],_46={},_47={history:true,html:false,strict:true,tracker:"_trackDefault"};if(_32.isIE()){_36=_35>=6}if(_32.isSafari()){_36=_35>=312}if(_32.isOpera()){_36=_35>=9.02}if(_32.isCamino()){_36=_35>=1}if(_32.isFirefox()){_36=_35>=1}if(_32.isNetscape()){_36=_35>=8}if(_32.isMozilla()){_36=_35>=1.8}if((!_36&&_l.href.indexOf("#")!=-1)||(_32.isSafari()&&_35<412&&_l.href.indexOf("#")!=-1&&_l.search!="")){_d.open();_d.write('<html><head><meta http-equiv="refresh" content="0;url='+_l.href.substr(0,_l.href.indexOf("#"))+'" /></head></html>');_d.close()}var _48=function(){var _49=_l.href.indexOf("#");return(_49!=-1)?_l.href.substr(_49+1):""};var _4a=_48();var _4b=function(_4c,_4d){if(_47.strict){_4c=_4d?(_4c.substr(0,1)!="/"?"/"+_4c:_4c):(_4c==""?"/":_4c)}return _4c};var _4e=function(_4f){return(_32.isIE()&&_l.protocol=="file:")?_4a.replace(/\?/,"%3F"):_4f};var _50=function(el){for(var i=0,l=el.childNodes.length,s;i<l;i++){if(el.childNodes[i].src){_40=String(el.childNodes[i].src)}if(s=_50(el.childNodes[i])){return s}}};var _55=function(){if(_32.isIE()&&_d.title!=_41){this.setTitle(_41)}};var _56=function(){if(!_43){var _57=_48();if(_32.isIE()){if(_4a!=_57){if(_35<7){_l.reload()}else{this.setValue(_57)}}}else{if(_32.isSafari()&&_35<523){if(_42!=_h.length){_42=_h.length;if(typeof _45[_42-1]!=_30){_4a=_45[_42-1]}_58.call(this)}}else{if(_4a!=_57){_4a=_57;_58.call(this)}}}_55.call(this)}};var _59=function(_5a){if(this.hasEventListener(_5a)){this.dispatchEvent(new _31.WEBAddressEvent(_5a))}_5a=_5a.substr(0,1).toUpperCase()+_5a.substr(1);if(typeof this["on"+_5a]==_2f){this["on"+_5a]()}};var _5b=function(){_59.call(this,"init")};var _5c=function(){_59.call(this,"change")};var _58=function(){_5c.call(this);_st(_34.bind(_5d,this),10)};var _5e=function(_5f){if(typeof urchinTracker==_2f){urchinTracker(_5f)}if(typeof pageTracker!=_30&&typeof pageTracker._trackPageview==_2f){pageTracker._trackPageview(_5f)}};eval("var _trackDefault = "+_5e+";");var _5d=function(){if(typeof _47.tracker!=_30&&eval("typeof "+_47.tracker+' != "'+_30+'"')){var fn=eval(_47.tracker);if(typeof fn==_2f){fn((_l.pathname+(/\/$/.test(_l.pathname)?"":"/")+this.getValue()).replace(/\/\//,"/").replace(/^\/$/,""))}}};var _61=function(){var doc=_3e.contentWindow.document;doc.open();doc.write("<script>var "+ID+' = "'+_ec(_48())+'";<\/script>');doc.close()};var _63=function(){var win=_3e.contentWindow;var src=win.location.href;win.document.title=_d.title;_4a=(_47.html)?((src.indexOf("?")>-1)?_dc(src.substr(src.indexOf("?")+1)):""):((typeof win[ID]!=_30)?_dc(win[ID]):"");if(_4a!=_48()){_58.call(_31.WEBAddress);_l.hash=_4e(_4a)}};var _66=function(){if(!_44){_44=true;var _67='id="'+ID+'" style="position:absolute;top:-9999px;"';if(_32.isIE()&&_35<8){document.body.appendChild(document.createElement("div")).innerHTML="<iframe "+_67+' src="'+(_47.html?_40.replace(/\.js(\?.*)?$/,".html")+"?"+_ec(_48()):"javascript:false;")+'" width="0" height="0"></iframe>';_3e=document.getElementById(ID);_st(function(){_33.addListener(_3e,"load",_63);if(!_47.html&&typeof _3e.contentWindow[ID]==_30){_61()}},10)}else{if(_32.isSafari()){if(_35<412){document.body.innerHTML+="<form "+_67+' method="get"></form>';_3f=document.getElementById(ID)}if(typeof _l[ID]==_30){_l[ID]={}}if(typeof _l[ID][_l.pathname]!=_30){_45=_l[ID][_l.pathname].split(",")}}}_st(_34.bind(_5b,this),1);_st(_34.bind(_5c,this),2);_st(_34.bind(_5d,this),10);if(_32.isIE()&&_35>=8){document.body.onhashchange=_34.bind(_56,this);setInterval(_34.bind(_55,this),50)}else{setInterval(_34.bind(_56,this),50)}}};this.onInit=null;this.onChange=null;this.toString=function(){return"[class WEBAddress]"};this.back=function(){_h.back()};this.forward=function(){_h.forward()};this.up=function(){var _68=SWFAddress.getPath();SWFAddress.setValue(_68.substr(0,_68.lastIndexOf("/",_68.length-2)+(_68.substr(_68.length-1)=="/"?1:0)))};this.go=function(_69){_h.go(_69)};this.addEventListener=function(_6a,_6b){if(typeof _46[_6a]==_30){_46[_6a]=[]}_46[_6a].push(_6b)};this.removeEventListener=function(_6c,_6d){if(typeof _46[_6c]!=_30){for(var i=0,l;l=_46[_6c][i];i++){if(l==_6d){break}}_46[_6c].splice(i,1)}};this.dispatchEvent=function(_70){if(typeof _46[_70.type]!=_30&&_46[_70.type].length){_70.target=this;for(var i=0,l;l=_46[_70.type][i];i++){l(_70)}return true}return false};this.hasEventListener=function(_73){return(typeof _46[_73]!=_30&&_46[_73].length>0)};this.getBaseURL=function(){var url=_l.href;if(url.indexOf("#")!=-1){url=url.substr(0,url.indexOf("#"))}if(url.substr(url.length-1)=="/"){url=url.substr(0,url.length-1)}return url};this.getStrict=function(){return _47.strict};this.setStrict=function(_75){_47.strict=_75};this.getHistory=function(){return _47.history};this.setHistory=function(_76){_47.history=_76};this.getTracker=function(){return _47.tracker};this.setTracker=function(_77){_47.tracker=_77};this.getTitle=function(){return _d.title};this.setTitle=function(_78){if(!_36){return null}if(typeof _78==_30){return }if(_78=="null"){_78=""}_41=_d.title=_78;_st(function(){if(_3e&&_3e.contentWindow&&_3e.contentWindow.document&&_3e.contentWindow.title){_3e.contentWindow.document.title=_41}},1000)};this.getStatus=function(){return _t.status};this.setStatus=function(_79){if(typeof _79==_30){return }if(!_32.isSafari()){_79=_4b((_79!="null")?_79:"",true);if(_79=="/"){_79=""}if(!(/http(s)?:\/\//.test(_79))){var _7a=_l.href.indexOf("#");_79=(_7a==-1?_l.href:_l.href.substr(0,_7a))+"#"+_79}_t.status=_79}};this.resetStatus=function(){_t.status=""};this.getValue=function(){if(!_36){return null}return _4b(_4a,false)};this.setValue=function(_7b){if(!_36){return null}if(typeof _7b==_30){return }if(_7b=="null"){_7b=""}_7b=_4b(_7b,true);if(_7b=="/"){_7b=""}if(_4a==_7b){return }_4a=_7b;_43=true;_58.call(_31.WEBAddress);_45[_h.length]=_4a;if(_32.isSafari()){if(_47.history){_l[ID][_l.pathname]=_45.toString();_42=_h.length+1;if(_35<412){if(_l.search==""){_3f.action="#"+_4a;_3f.submit()}}else{if(_35<523||_4a==""){var evt=document.createEvent("MouseEvents");evt.initEvent("click",true,true);var _7d=document.createElement("a");_7d.href="#"+_4a;_7d.dispatchEvent(evt)}else{_l.hash="#"+_4a}}}else{_l.replace("#"+_4a)}}else{if(_4a!=_48()){if(_47.history){_l.hash="#"+_4e(_4a)}else{_l.replace("#"+_4a)}}}if((_32.isIE()&&_35<8)&&_47.history){if(_47.html){var loc=_3e.contentWindow.location;loc.assign(loc.pathname+"?"+_48())}else{_61()}}if(_32.isSafari()){_st(function(){_43=false},1)}else{_43=false}};this.getPath=function(){var _7f=this.getValue();return(_7f.indexOf("?")!=-1)?_7f.split("?")[0]:_7f};this.getPathNames=function(){var _80=this.getPath();var _81=_80.split("/");if(_80.substr(0,1)=="/"){_81.splice(0,1)}if(_80.substr(_80.length-1,1)=="/"){_81.splice(_81.length-1,1)}return _81};this.getQueryString=function(){var _82=this.getValue();var _83=_82.indexOf("?");return(_83!=-1&&_83<_82.length)?_82.substr(_83+1):""};this.getParameter=function(_84){var _85=this.getValue();var _86=_85.indexOf("?");if(_86!=-1){_85=_85.substr(_86+1);var _87=_85.split("&");var p,i=_87.length;while(i--){p=_87[i].split("=");if(p[0]==_84){return p[1]}}}return""};this.getParameterNames=function(){var _8a=this.getValue();var _8b=_8a.indexOf("?");var _8c=[];if(_8b!=-1){_8a=_8a.substr(_8b+1);if(_8a!=""&&_8a.indexOf("=")!=-1){var _8d=_8a.split("&");var i=0;while(i<_8d.length){_8c.push(_8d[i].split("=")[0]);i++}}}return _8c};if(_36){for(var i=1;i<_42;i++){_45.push("")}_45.push(_48());if(_32.isIE()&&_l.hash!=_48()){_l.hash="#"+_4e(_48())}_50(document);var _qi=_40.indexOf("?");if(_40&&_qi>-1){var _91,_92=_40.substr(_qi+1).split("&");for(var i=0,p;p=_92[i];i++){_91=p.split("=");if(/^(history|html|strict)$/.test(_91[0])){_47[_91[0]]=(isNaN(_91[1])?eval(_91[1]):(parseFloat(_91[1])>0))}if(/^tracker$/.test(_91[0])){_47[_91[0]]=_91[1]}}}if(/file:\/\//.test(_l.href)){_47.html=false}var _ei=_40.indexOf(".js"),l;if(_40&&_ei>-1){while(_ei--){l=_40.substr(_ei,1);if(/(\/|\\)/.test(l)){break}ID=l+ID}}_55.call(this);_33.addListener(document,"DOMContentLoaded",_34.bind(_66,this));_33.addListener(window,"load",_34.bind(_66,this))}else{_5d()}};SWFAddressEvent=function(A){SWFAddressEvent.superConstructor.apply(this,arguments);this.target=[SWFAddress][0];this.toString=function(){return"[object SWFAddressEvent]"}};com.asual.util.Functions.extend(com.asual.util.WEBAddressEvent,SWFAddressEvent);SWFAddressEvent.INIT="init";SWFAddressEvent.CHANGE="change";SWFAddress=new function(){var _97="undefined",_t=top,_l=_t.location,_9a=this,_9b=[],_9c={},_9d=com.asual.util,_9e=_9d.Functions,_9f=_9d.WEBAddress;for(var p in _9f){this[p]=_9f[p]}var _a1=function(){this.dispatchEvent(new SWFAddressEvent("init"))};var _a2=function(){_a3();this.dispatchEvent(new SWFAddressEvent("change"))};var _a3=function(){for(var i=0,id,_a6=SWFAddress.getValue(),_a7="setSWFAddressValue";id=_9b[i];i++){var obj=document.getElementById(id);if(obj){if(obj.parentNode&&typeof obj.parentNode.so!=_97){obj.parentNode.so.call(_a7,_a6)}else{if(!(obj&&typeof obj[_a7]!=_97)){var _a9=obj.getElementsByTagName("object");var _aa=obj.getElementsByTagName("embed");obj=((_a9[0]&&typeof _a9[0][_a7]!=_97)?_a9[0]:((_aa[0]&&typeof _aa[0][_a7]!=_97)?_aa[0]:null))}if(obj){obj[_a7](_a6)}}}else{if(obj=document[id]){if(typeof obj[_a7]!=_97){obj[_a7](_a6)}}}}};this.toString=function(){return"[class SWFAddress]"};this.addEventListener=function(_ab,_ac){if(typeof _9c[_ab]==_97){_9c[_ab]=[]}_9c[_ab].push(_ac)};this.removeEventListener=function(_ad,_ae){if(typeof _9c[_ad]!=_97){for(var i=0,l;l=_9c[_ad][i];i++){if(l==_ae){break}}_9c[_ad].splice(i,1)}};this.dispatchEvent=function(_b1){if(typeof _9c[_b1.type]!=_97&&_9c[_b1.type].length){_b1.target=this;for(var i=0,l;l=_9c[_b1.type][i];i++){l(_b1)}return true}return false};this.hasEventListener=function(_b4){return(typeof _9c[_b4]!=_97&&_9c[_b4].length>0)};this.href=function(url,_b6){_b6=(typeof _b6!=_97)?_b6:"_self";if(_b6=="_self"){self.location.href=url}if(_b6=="_top"){_l.href=url}if(_b6=="_blank"){window.open(url)}else{_t.frames[_b6].location.href=url}};this.popup=function(url,_b8,_b9,_ba){var _bb=window.open(url,_b8,eval(_b9));eval(_ba)};this.getIds=function(){return _9b};this.addId=function(id){this.removeId(id);_9b.push(id)};this.removeId=function(id){for(var i=0;i<_9b.length;i++){if(id==_9b[i]){_9b.splice(i,1);break}}};_9f.addEventListener("init",_9e.bind(_a1,this));_9f.addEventListener("change",_9e.bind(_a2,this));new function(){var _bf,_c0;if(typeof swfobject!=_97){SWFObject=swfobject}if(typeof FlashObject!=_97){SWFObject=FlashObject}if(typeof SWFObject!=_97){if(SWFObject.prototype&&SWFObject.prototype.write){_bf=SWFObject.prototype.write;SWFObject.prototype.write=function(){_c0=arguments;if(this.getAttribute("version").major<8){this.addVariable("$swfaddress",SWFAddress.getValue());((typeof _c0[0]=="string")?document.getElementById(_c0[0]):_c0[0]).so=this}var _c1;if(_c1=_bf.apply(this,_c0)){_9a.addId(this.getAttribute("id"))}return _c1}}else{_bf=SWFObject.registerObject;SWFObject.registerObject=function(){_c0=arguments;_bf.apply(this,_c0);_9a.addId(_c0[0])};_bf=SWFObject.createSWF;SWFObject.createSWF=function(){_c0=arguments;_bf.apply(this,_c0);_9a.addId(_c0[0].id)};_bf=SWFObject.embedSWF;SWFObject.embedSWF=function(){_c0=arguments;_bf.apply(this,_c0);_9a.addId(_c0[8].id)}}}if(typeof UFO!=_97){_bf=UFO.create;UFO.create=function(){_c0=arguments;_bf.apply(this,_c0);_9a.addId(_c0[0].id)}}if(typeof AC_FL_RunContent!=_97){_bf=AC_FL_RunContent;AC_FL_RunContent=function(){_c0=arguments;_bf.apply(this,_c0);for(var i=0,l=_c0.length;i<l;i++){if(_c0[i]=="id"){_9a.addId(_c0[i+1])}}}}}};