/** * SWFAddress 2.1: Deep linking for Flash and Ajax - http://www.asual.com/swfaddress/ * * SWFAddress is (c) 2006-2007 Rostislav Hristov and 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;var I=navigator.userAgent;var 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 B=[],A=com.asual.util.Browser;var F="DOMContentLoaded",E="onstop";if(A.isIE()||A.isSafari()){(function(){try{if(A.isIE()||!/loaded|complete/.test(document.readyState)){document.documentElement.doScroll("left")}}catch(H){return setTimeout(arguments.callee,0)}for(var G=0,H;H=B[G];G++){if(H.t==F){H.l.call(null)}}})()}this.addListener=function(I,H,G){B.push({o:I,t:H,l:G});if(!(H==F&&(A.isIE()||A.isSafari()))){if(I.addEventListener){I.addEventListener(H,G,false)}else{if(I.attachEvent){I.attachEvent("on"+H,G)}}}};this.removeListener=function(K,H,G){for(var I=0,J;J=B[I];I++){if(J.o==K&&J.t==H&&J.l==G){B.splice(I,1);break}}if(!(H==F&&(A.isIE()||A.isSafari()))){if(K.removeEventListener){K.removeEventListener(H,G,false)}else{if(K.detachEvent){K.detachEvent("on"+H,G)}}}};var D=function(){if(document.readyState=="interactive"){function G(){document.detachEvent(E,G);_unload()}document.attachEvent(E,G);window.setTimeout(function(){document.detachEvent(E,G)},0)}};if(A.isIE()){window.attachEvent("onbeforeunload",D)}var C=function(){for(var H=0,G;G=B[H];H++){if(G.t!=F){com.asual.util.Events.removeListener(G.o,G.t,G.l)}}};this.addListener(window,"unload",C)};SWFAddressEvent=function(A){this.toString=function(){return"[object SWFAddressEvent]"};this.type=A;this.target=[SWFAddress][0];this.value=SWFAddress.getValue();this.path=SWFAddress.getPath();this.pathNames=SWFAddress.getPathNames();this.parameters={};var C=SWFAddress.getParameterNames();for(var D=0,B=C.length;D<B;D++){this.parameters[C[D]]=SWFAddress.getParameter(C[D])}this.parametersNames=C};SWFAddressEvent.INIT="init";SWFAddressEvent.CHANGE="change";SWFAddress=new function(){var _23=com.asual.util.Browser;var _24=com.asual.util.Events;var _25=_23.getVersion();var _26=false;if(_23.isIE()){_26=_25>=6}if(_23.isSafari()){_26=_25>=312}if(_23.isOpera()){_26=_25>=9.02}if(_23.isCamino()){_26=_25>=1}if(_23.isFirefox()){_26=_25>=1}if(_23.isNetscape()){_26=_25>=8}if(_23.isMozilla()){_26=_25>=1.8}var _t=top,_d=_t.document,_h=_t.history,_l=_t.location,_st=setTimeout;var _2c,_2d,_2e,_2f=_d.title,_30=_h.length,_31=false;var _32=[],_33=[],_34={},_35={history:true,html:false,strict:true,tracker:"_trackDefault"};var _36="function",_37="undefined",_38="swfaddress";if((!_26&&_l.href.indexOf("#")!=-1)||(_23.isSafari()&&_25<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 _39=function(){var _3a=_l.href.indexOf("#");if(_3a!=-1){var _3b=unescape(_l.href.substr(_3a+1));if(/^[a-z0-9 ,=_&\-\.\:\;\?\+\(\)\/]*$/i.test(_3b)){return _3b}else{_l.replace(_l.href.substr(0,_3a))}}return""};var _3c=_39();var _3d=function(_3e,_3f){if(_35.strict){_3e=_3f?(_3e.substr(0,1)!="/"?"/"+_3e:_3e):(_3e==""?"/":_3e)}return _3e};var _40=function(_41){return(_23.isIE()&&_l.protocol=="file:")?_3c.replace(/\?/,"%3F"):_41};var _42=function(el){if(el.src&&/swfaddress\.js(\?.*)?$/.test(el.src)){return el}for(var i=0,l=el.childNodes.length,s;i<l;i++){if(s=_42(el.childNodes[i])){return s}}};var _47=function(){if(_23.isIE()&&_d.title!=_2f){SWFAddress.setTitle(_2f)}};var _48=function(){if(!_31){var _49=_39();if(_23.isIE()){if(_3c!=_49){if(_25<7){_l.reload()}else{SWFAddress.setValue(_49)}}}else{if(_23.isSafari()&&_25<523){if(_30!=_h.length){_30=_h.length;if(typeof _32[_30-1]!=_37){_3c=_32[_30-1]}_4a()}}else{if(_3c!=_49){_3c=_49;_4a()}}}_47()}};var _4b=function(_4c){if(SWFAddress.hasEventListener(_4c)){SWFAddress.dispatchEvent(new SWFAddressEvent(_4c))}_4c=_4c.substr(0,1).toUpperCase()+_4c.substr(1);if(typeof SWFAddress["on"+_4c]==_36){SWFAddress["on"+_4c]()}};var _4d=function(){_4b("init")};var _4e=function(){_4b("change")};var _4f=function(){for(var i=0,id,_52=SWFAddress.getValue(),_53="setSWFAddressValue";id=_33[i];i++){var obj=document.getElementById(id);if(obj){if(obj.parentNode&&typeof obj.parentNode.so!=_37){obj.parentNode.so.call(_53,_52)}else{if(!(obj&&typeof obj[_53]!=_37)){var _55=obj.getElementsByTagName("object");var _56=obj.getElementsByTagName("embed");obj=((_55[0]&&typeof _55[0][_53]!=_37)?_55[0]:((_56[0]&&typeof _56[0][_53]!=_37)?_56[0]:null))}if(obj){obj[_53](_52)}}}else{if(obj=document[id]){if(typeof obj[_53]!=_37){obj[_53](_52)}}}}};var _4a=function(){_4f();_4e();_st(_57,10)};var _58=function(_59){if(typeof urchinTracker==_36){urchinTracker(_59)}if(typeof pageTracker!=_37&&typeof pageTracker._trackPageview==_36){pageTracker._trackPageview(_59)}};eval("var _trackDefault = "+_58+";");var _57=function(){if(typeof _35.tracker!=_37&&eval("typeof "+_35.tracker+' != "'+_37+'"')){var fn=eval(_35.tracker);if(typeof fn==_36){fn((_l.pathname+(/\/$/.test(_l.pathname)?"":"/")+SWFAddress.getValue()).replace(/\/\//,"/").replace(/^\/$/,""))}}};var _5b=function(){var doc=_2c.contentWindow.document;doc.open();doc.write("<script>var "+_38+' = "'+_39()+'";<\/script>');doc.close()};var _5d=function(){var win=_2c.contentWindow;if(_35.html){var src=win.location.href;_3c=(src.indexOf("?")>-1)?src.substr(src.indexOf("?")+1):""}else{_3c=(typeof win[_38]!=_37)?win[_38]:""}win.document.title=_d.title;if(_3c!=_39()){_4a();_l.hash=_40(_3c)}};var _60=function(){var _61='id="'+_38+'" style="position:absolute;top:-9999px;"';if(_23.isIE()){document.body.appendChild(document.createElement("div")).innerHTML="<iframe "+_61+' src="'+(_35.html?_2e.replace(/\.js(\?.*)?$/,".html")+"?"+_39():"javascript:false;")+'" width="0" height="0"></iframe>';_2c=document.getElementById(_38);_st(function(){_24.addListener(_2c,"load",_5d);if(!_35.html&&typeof _2c.contentWindow[_38]==_37){_5b()}},10)}else{if(_23.isSafari()){if(_25<412){document.body.innerHTML+="<form "+_61+' method="get"></form>';_2d=document.getElementById(_38)}if(typeof _l[_38]==_37){_l[_38]={}}if(typeof _l[_38][_l.pathname]!=_37){_32=_l[_38][_l.pathname].split(",")}}else{if(_23.isOpera()&&_33.length==0&&typeof navigator.plugins["Shockwave Flash"]=="object"){document.body.innerHTML+="<embed "+_61+' src="'+_2e.replace(/\.js(\?.*)?$/,".swf")+'" type="application/x-shockwave-flash" />'}}}_st(_4d,1);_st(_4e,2);_st(_57,10);setInterval(_48,50)};this.onInit=null;this.onChange=null;this.toString=function(){return"[class SWFAddress]"};this.back=function(){_h.back()};this.forward=function(){_h.forward()};this.go=function(_62){_h.go(_62)};this.href=function(url,_64){_64=(typeof _64!=_37)?_64:"_self";if(_64=="_self"){self.location.href=url}if(_64=="_top"){_l.href=url}if(_64=="_blank"){window.open(url)}else{_t.frames[_64].location.href=url}};this.popup=function(url,_66,_67,_68){var _69=window.open(url,_66,eval(_67));eval(_68)};this.addEventListener=function(_6a,_6b){if(typeof _34[_6a]==_37){_34[_6a]=[]}_34[_6a].push(_6b)};this.removeEventListener=function(_6c,_6d){if(typeof _34[_6c]!=_37){for(var i=0,l;l=_34[_6c][i];i++){if(l==_6d){break}}_34[_6c].splice(i,1)}};this.dispatchEvent=function(_70){if(typeof _34[_70.type]!=_37&&_34[_70.type].length){_70.target=this;for(var i=0,l;l=_34[_70.type][i];i++){l(_70)}return true}return false};this.hasEventListener=function(_73){return(typeof _34[_73]!=_37&&_34[_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 _35.strict};this.setStrict=function(_75){_35.strict=_75};this.getHistory=function(){return _35.history};this.setHistory=function(_76){_35.history=_76};this.getTracker=function(){return _35.tracker};this.setTracker=function(_77){_35.tracker=_77};this.getIds=function(){return _33};this.getId=function(_78){return _33[0]};this.setId=function(id){_33[0]=id};this.addId=function(id){this.removeId(id);_33.push(id)};this.removeId=function(id){for(var i=0;i<_33.length;i++){if(id==_33[i]){_33.splice(i,1);break}}};this.getTitle=function(){return _d.title};this.setTitle=function(_7d){if(!_26){return null}if(typeof _7d==_37){return }if(_7d=="null"){_7d=""}_2f=_d.title=_7d;_st(function(){if(_2c&&_2c.contentWindow&&_2c.contentWindow.document&&_2c.contentWindow.title){_2c.contentWindow.document.title=_2f}},1000)};this.getStatus=function(){return _t.status};this.setStatus=function(_7e){if(!_26){return null}if(typeof _7e==_37){return }if(!_23.isSafari()){_7e=_3d((_7e!="null")?_7e:"",true);if(_7e=="/"){_7e=""}if(!(/http(s)?:\/\//.test(_7e))){var _7f=_l.href.indexOf("#");_7e=(_7f==-1?_l.href:_l.href.substr(0,_7f))+"#"+_7e}_t.status=_7e}};this.resetStatus=function(){_t.status=""};this.getValue=function(){if(!_26){return null}return _3d(_3c,false)};this.setValue=function(_80){if(!_26){return null}if(typeof _80==_37){return }if(_80=="null"){_80=""}_80=_3d(_80,true);if(_80=="/"){_80=""}if(_3c==_80){return }_3c=_80;_31=true;_4a();_32[_h.length]=_3c;if(_23.isSafari()){if(_35.history){_l[_38][_l.pathname]=_32.toString();_30=_h.length+1;if(_25<412){if(_l.search==""){_2d.action="#"+_3c;_2d.submit()}}else{if(_25<523){var evt=document.createEvent("MouseEvents");evt.initEvent("click",true,true);var _82=document.createElement("a");_82.href="#"+_3c;_82.dispatchEvent(evt)}else{_l.hash="#"+_3c}}}else{_l.replace("#"+_3c)}}else{if(_3c!=_39()){if(_35.history){_l.hash="#"+_40(_3c)}else{_l.replace("#"+_3c)}}}if(_23.isIE()&&_35.history){if(_35.html){var loc=_2c.contentWindow.location;loc.assign(loc.pathname+"?"+_39())}else{_5b()}}if(_23.isSafari()){_st(function(){_31=false},1)}else{_31=false}};this.getPath=function(){var _84=this.getValue();return(_84.indexOf("?")!=-1)?_84.split("?")[0]:_84};this.getPathNames=function(){var _85=SWFAddress.getPath();var _86=_85.split("/");if(_85.substr(0,1)=="/"){_86.splice(0,1)}if(_85.substr(_85.length-1,1)=="/"){_86.splice(_86.length-1,1)}return _86};this.getQueryString=function(){var _87=this.getValue();var _88=_87.indexOf("?");return(_88!=-1&&_88<_87.length)?_87.substr(_88+1):""};this.getParameter=function(_89){var _8a=this.getValue();var _8b=_8a.indexOf("?");if(_8b!=-1){_8a=_8a.substr(_8b+1);var _8c=_8a.split("&");var p,i=_8c.length;while(i--){p=_8c[i].split("=");if(p[0]==_89){return p[1]}}}return""};this.getParameterNames=function(){var _8f=this.getValue();var _90=_8f.indexOf("?");var _91=[];if(_90!=-1){_8f=_8f.substr(_90+1);if(_8f!=""&&_8f.indexOf("=")!=-1){var _92=_8f.split("&");var i=0;while(i<_92.length){_91.push(_92[i].split("=")[0]);i++}}}return _91};if(_26){for(var i=1;i<_30;i++){_32.push("")}_32.push(_39());if(_23.isIE()&&_l.hash!=_39()){_l.hash="#"+_40(_39())}try{_2e=String(_42(document).src);var qi=_2e.indexOf("?");if(_2e&&qi>-1){var _96,_97=_2e.substr(qi+1).split("&");for(var i=0,p;p=_97[i];i++){_96=p.split("=");if(/^(history|html|strict)$/.test(_96[0])){_35[_96[0]]=(isNaN(_96[1])?eval(_96[1]):(parseFloat(_96[1])>0))}if(/^tracker$/.test(_96[0])){_35[_96[0]]=_96[1]}}}}catch(e){}if(/file:\/\//.test(_l.href)){_35.html=false}_47();_24.addListener(document,"DOMContentLoaded",_60)}else{_57()}};new function(){var A,C;var B="undefined";if(typeof swfobject!=B){SWFObject=swfobject}if(typeof FlashObject!=B){SWFObject=FlashObject}if(typeof SWFObject!=B){if(SWFObject.prototype&&SWFObject.prototype.write){A=SWFObject.prototype.write;SWFObject.prototype.write=function(){C=arguments;if(this.getAttribute("version").major<8){this.addVariable("$swfaddress",SWFAddress.getValue());((typeof C[0]=="string")?document.getElementById(C[0]):C[0]).so=this}var D;if(D=A.apply(this,C)){SWFAddress.addId(this.getAttribute("id"))}return D}}else{A=SWFObject.registerObject;SWFObject.registerObject=function(){C=arguments;A.apply(this,C);SWFAddress.addId(C[0])};A=SWFObject.createSWF;SWFObject.createSWF=function(){C=arguments;A.apply(this,C);SWFAddress.addId(C[0].id)};A=SWFObject.embedSWF;SWFObject.embedSWF=function(){C=arguments;A.apply(this,C);SWFAddress.addId(C[8].id)}}}if(typeof UFO!=B){A=UFO.create;UFO.create=function(){C=arguments;A.apply(this,C);SWFAddress.addId(C[0].id)}}if(typeof AC_FL_RunContent!=B){A=AC_FL_RunContent;AC_FL_RunContent=function(){C=arguments;A.apply(this,C);for(var E=0,D=C.length;E<D;E++){if(C[E]=="id"){SWFAddress.addId(C[E+1])}}}}};