/** * 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 _1=false;var _2=-1;var _3=navigator.userAgent;var _4=false;var _5=false;var _6=false;var _7=false;var _8=false;if(/MSIE/.test(_3)){_4=true;_2=parseFloat(_3.substring(_3.indexOf("MSIE")+4));_1=_2>=6;}else{if(/AppleWebKit/.test(_3)){_6=true;_2=parseFloat(_3.substring(_3.indexOf("Safari")+7));_1=_2>=312;}else{if(/Opera/.test(_3)){_7=true;_2=parseFloat(navigator.appVersion);_1=_2>=9.02;}else{if(/Camino/.test(_3)){_5=true;_2=parseFloat(_3.substring(_3.indexOf("Camino")+7));_1=_2>=1;}else{if(/Firefox/.test(_3)){_8=true;_2=parseFloat(_3.substring(_3.indexOf("Firefox")+8));_1=_2>=1;}else{if(/Netscape/.test(_3)){_8=true;_2=parseFloat(_3.substring(_3.indexOf("Netscape")+9));_1=_2>=8;}else{if(/Mozilla/.test(_3)&&/rv:/.test(_3)){_8=true;_2=parseFloat(_3.substring(_3.indexOf("rv:")+3));_1=_2>=1.8;}}}}}}}this.isSupported=function(){return _1;};this.getVersion=function(){return _2;};this.isIE=function(){return _4;};this.isSafari=function(){return _6;};this.isOpera=function(){return _7;};this.isCamino=function(){return _5;};this.isMozilla=function(){return _8;};};com.asual.util.Events=new function(){var _9=[];var _a=com.asual.util.Browser;var _b="DOMContentLoaded";if(_a.isIE()||_a.isSafari()){(function(){try{if(_a.isIE()||!/loaded|complete/.test(document.readyState)){document.documentElement.doScroll("left");}}catch(e){return setTimeout(arguments.callee,0);}for(var i=0,e;e=_9[i];i++){if(e.t==_b){e.l.call(null);}}})();}this.addListener=function(_e,_f,_10){_9.push({o:_e,t:_f,l:_10});if(_f==_b&&(_a.isIE()||_a.isSafari())){return;}if(_e.addEventListener){_e.addEventListener(_f,_10,false);}else{if(_e.attachEvent){_e.attachEvent("on"+_f,_10);}}};this.removeListener=function(obj,_12,_13){for(var i=0,e;e=_9[i];i++){if(e.o==obj&&e.t==_12&&e.l==_13){_9.splice(i,1);break;}}if(_12==_b&&(_a.isIE()||_a.isSafari())){return;}if(obj.removeEventListener){obj.removeEventListener(_12,_13,false);}else{if(obj.detachEvent){obj.detachEvent("on"+_12,_13);}}};var _16=function(){for(var i=0,evt;evt=_9[i];i++){if(evt.t!=_b){com.asual.util.Events.removeListener(evt.o,evt.t,evt.l);}}};this.addListener(window,"unload",_16);};SWFAddressEvent=function(_19){this.toString=function(){return "[object SWFAddressEvent]";};this.type=_19;this.target=[SWFAddress][0];this.value=SWFAddress.getValue();this.path=SWFAddress.getPath();this.parameters={};var _1a=SWFAddress.getParameterNames();for(var i=0,n;n=_1a[i];i++){this.parameters[n]=SWFAddress.getParameter(n);}};SWFAddressEvent.INIT="init";SWFAddressEvent.CHANGE="change";SWFAddress=new function(){var _1d=com.asual.util.Browser;var _1e=_1d.isSupported();var _d=top.document;var _h=top.history;var _l=top.location;var _22,_23,_24;var _25=_d.title;var _26=_h.length;var _27=false;var _28={};var _29=[];var _2a=[];var _2b=[];_2b["history"]=true;_2b["html"]=false;_2b["strict"]=true;_2b["tracker"]="urchinTracker";if((!_1e&&_l.href.indexOf("#")!=-1)||(_1d.isSafari()&&_1d.getVersion()<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 _2c=function(){var _2d=_l.href.indexOf("#");if(_2d!=-1){return _l.href.substring(_2d).replace(/^#/g,"");}return "";};var _2e=_2c();var _2f=function(_30,_31){if(_2b["strict"]){if(_31){if(_30.substr(0,1)!="/"){_30="/"+_30;}if(_30.indexOf(".")==-1){_30=_30.replace(/^([^\?.]*[^\/])(\?|$)/,"$1/$2").replace(/\/\//,"/");}}else{if(_30==""){_30="/";}}}return _30;};var _32=function(el){if(el.src&&el.src.match(/swfaddress\.js(\?.*)?$/)){return el;}for(var i=0,c;c=el.childNodes[i];i++){if(s=_32(c)){return s;}}};var _36=function(){if(_1d.isIE()&&_d.title!=_25){SWFAddress.setTitle(_25);}};var _37=function(){if(!_27){if(_1d.isIE()){if(_2e!=_2c()){if(_1d.getVersion()<7){_l.reload();}else{SWFAddress.setValue(_2c());}}}else{if(_1d.isSafari()&&_1d.getVersion()<523){if(_26!=_h.length){_26=_h.length;if(typeof _29[_26-1]!="undefined"){_2e=_29[_26-1];}_38();}}else{if(_2e!=_2c()){_2e=_2c();_38();}}}_36();}};var _39=function(_3a){if(SWFAddress.hasEventListener(_3a)){SWFAddress.dispatchEvent(new SWFAddressEvent(_3a));}_3a=_3a.substr(0,1).toUpperCase()+_3a.substring(1);if(typeof SWFAddress["on"+_3a]=="function"){SWFAddress["on"+_3a]();}};var _3b=function(){_39("init");};var _3c=function(){_39("change");};var _3d=function(){for(var i=0,id;id=_2a[i];i++){var obj=document.getElementById(id);if(obj){if(obj.parentNode&&typeof obj.parentNode.so!="undefined"){obj.parentNode.so.call("setSWFAddressValue",SWFAddress.getValue());}else{obj=(obj&&typeof obj.setSWFAddressValue!="undefined")?obj:((obj.getElementsByTagName("object")[0]&&typeof obj.getElementsByTagName("object")[0].setSWFAddressValue!="undefined")?obj.getElementsByTagName("object")[0]:((obj.getElementsByTagName("embed")[0]&&typeof obj.getElementsByTagName("embed")[0].setSWFAddressValue!="undefined")?obj.getElementsByTagName("embed")[0]:null));if(obj){obj.setSWFAddressValue(SWFAddress.getValue());}}}}};var _38=function(){_3d();_3c();};var _41=function(){if(typeof _2b["tracker"]!="undefined"&&eval("typeof "+_2b["tracker"]+" != \"undefined\"")){var fn=eval(_2b["tracker"]);if(typeof fn=="function"){fn((_l.pathname+SWFAddress.getValue()).replace(/\/\//,"/").replace(/^\/$/,""));}}};var _43=function(){var doc=_22.contentWindow.document;doc.open();doc.write("<script>var swfaddress = \""+_2c()+"\";</script>");doc.close();};var _45=function(){if(_2b["html"]){var src=_22.contentWindow.location.href;_2e=(src.indexOf("?")>-1)?src.substring(src.indexOf("?")+1):"";}else{_2e=(typeof _22.contentWindow.swfaddress!="undefined")?_22.contentWindow.swfaddress:"";}if(_2e!=_2c()){_38();_l.hash=_2e;}};var _47=function(){var _48="id=\"swfaddress\" style=\"position:absolute;top:-9999px;\"";if(_1d.isIE()){document.body.appendChild(document.createElement("div")).innerHTML="<iframe "+_48+" src=\""+(_2b["html"]?_24.replace(/\.js(\?.*)?$/,".html")+"?"+_2c():"javascript:false;")+"\"></iframe>";_22=document.getElementById("swfaddress");setTimeout(function(){if(!_2b["html"]&&typeof _22.contentWindow.swfaddress=="undefined"){_43();}com.asual.util.Events.addListener(_22,"load",_45);},10);}else{if(_1d.isSafari()){if(_1d.getVersion()<412){document.body.innerHTML+="<form "+_48+" method=\"get\"></form>";_23=document.getElementById("swfaddress");}if(typeof _l.swfaddress=="undefined"){_l.swfaddress={};}if(typeof _l.swfaddress[_l.pathname]!="undefined"){_29=_l.swfaddress[_l.pathname].split(",");}}else{if(_1d.isOpera()&&_2a.length==0){document.body.innerHTML+="<embed "+_48+" src=\""+_24.replace(/\.js(\?.*)?$/,".swf")+"\" type=\"application/x-shockwave-flash\" />";}}}setTimeout(_3b,1);setTimeout(_3c,2);setTimeout(_41,10);setInterval(_37,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(_49){_h.go(_49);};this.href=function(url,_4b){_4b=typeof _4b!="undefined"?_4b:"_self";switch(_4b){case "_self":self.location.href=url;break;case "_top":_l.href=url;break;case "_blank":window.open(url);break;default:top.frames[_4b].location.href=url;break;}};this.popup=function(url,_4d,_4e,_4f){var _50=window.open(url,_4d,eval(_4e));eval(_4f);};this.addEventListener=function(_51,_52){if(typeof _28[_51]=="undefined"){_28[_51]=[];}_28[_51].push(_52);};this.removeEventListener=function(_53,_54){if(typeof _28[_53]!="undefined"){for(var i=0,l;l=_28[_53][i];i++){if(l==_54){break;}}_28[_53].splice(i,1);}};this.dispatchEvent=function(_57){if(typeof _28[_57.type]!="undefined"&&_28[_57.type].length){_57.target=this;for(var i=0,l;l=_28[_57.type][i];i++){l(_57);}return true;}return false;};this.hasEventListener=function(_5a){return (typeof _28[_5a]!="undefined"&&_28[_5a].length>0);};this.getStrict=function(){return _2b["strict"];};this.setStrict=function(_5b){_2b["strict"]=enabled;};this.getHistory=function(){return _2b["history"];};this.setHistory=function(_5c){_2b["history"]=_5c;};this.getTracker=function(){return _2b["tracker"];};this.setTracker=function(_5d){_2b["tracker"]=_5d;};this.getIds=function(){return _2a;};this.getId=function(_5e){return _2a[0];};this.setId=function(id){_2a[0]=id;};this.addId=function(id){this.removeId(id);_2a.push(id);};this.removeId=function(id){for(var i=0,_63;_63=_2a[i];i++){if(id==_63){_2a.splice(i,1);break;}}};this.getTitle=function(){return _d.title;};this.setTitle=function(_64){if(!_1e){return null;}if(typeof _64=="undefined"){return;}if(_64=="null"){_64="";}_25=_d.title=_64;if(_22&&_22.contentWindow){_22.contentWindow.document.title=_64;}};this.getStatus=function(){return top.status;};this.setStatus=function(_65){if(!_1e){return null;}if(typeof _65=="undefined"){return;}if(!_1d.isSafari()){if(_65=="null"){_65="";}_65=_2f(_65,true);if(_65=="/"){_65="";}if(!(/http(s)?:\/\//.test(_65))){var _66=_l.href.indexOf("#");_65=(_66==-1?_l.href:_l.href.substr(0,_66))+"#"+_65;}top.status=_65;}};this.resetStatus=function(){top.status="";};this.getValue=function(){if(!_1e){return null;}return _2f(_2e,false);};this.setValue=function(_67){if(!_1e){return null;}if(typeof _67=="undefined"){return;}if(_67=="null"){_67="";}_67=_2f(_67,true);if(_67=="/"){_67="";}if(_2e==_67){return;}_2e=_67;_27=true;_38();_29[_h.length]=_2e;if(_1d.isSafari()){if(_2b["history"]){_l.swfaddress[_l.pathname]=_29.toString();_26=_h.length+1;if(_1d.getVersion()<412){if(_l.search==""){_23.action="#"+_2e;_23.submit();}}else{var evt=document.createEvent("MouseEvents");evt.initEvent("click",true,true);var _69=document.createElement("a");_69.href="#"+_2e;_69.dispatchEvent(evt);}}else{_l.replace("#"+_2e);}}else{if(_2e!=_2c()){if(_2b["history"]){_l.hash="#"+_2e;}else{_l.replace("#"+_2e);}}}if(_1d.isIE()&&_2b["history"]){if(_2b["html"]){_22.contentWindow.location.assign(_22.contentWindow.location.pathname+"?"+_2c());}else{_43();}}setTimeout(_41,10);_27=false;};this.getPath=function(){var _6a=this.getValue();if(_6a.indexOf("?")!=-1){return _6a.split("?")[0];}else{return _6a;}};this.getQueryString=function(){var _6b=this.getValue();var _6c=_6b.indexOf("?");if(_6c!=-1&&_6c<_6b.length){return _6b.substr(_6c+1);}return "";};this.getParameter=function(_6d){var _6e=this.getValue();var _6f=_6e.indexOf("?");if(_6f!=-1){_6e=_6e.substr(_6f+1);var _70=_6e.split("&");var p,i=_70.length;while(i--){p=_70[i].split("=");if(p[0]==_6d){return p[1];}}}return "";};this.getParameterNames=function(){var _73=this.getValue();var _74=_73.indexOf("?");var _75=[];if(_74!=-1){_73=_73.substr(_74+1);if(_73!=""&&_73.indexOf("=")!=-1){var _76=_73.split("&");var i=0;while(i<_76.length){_75.push(_76[i].split("=")[0]);i++;}}}return _75;};if(!_1e){return;}for(var i=1;i<_26;i++){_29.push("");}_29.push(_l.hash.replace(/^#/g,""));if(_1d.isIE()&&_l.hash!=_2c()){_l.hash="#"+_2c();}_24=String(_32(document).src);if(_24&&(qi=_24.indexOf("?"))>-1){var _79,_7a=_24.substr(qi+1).split("&");for(var j=0,p;p=_7a[j];j++){_79=p.split("=");if(/^(history|html|strict)$/.test(_79[0])){_2b[_79[0]]=(isNaN(_79[1])?eval(_79[1]):(parseFloat(_79[1])>0));}if(/^tracker$/.test(_79[0])){_2b[_79[0]]=_79[1];}}}if(/file:\/\//.test(_l.href)){_2b["html"]=false;}_36();com.asual.util.Events.addListener(document,"DOMContentLoaded",_47);};if(typeof swfobject!="undefined"){SWFObject=swfobject;}if(typeof FlashObject!="undefined"){SWFObject=FlashObject;}if(typeof SWFObject!="undefined"){if(SWFObject.prototype&&SWFObject.prototype.write){com.asual.SWFObjectWrite=SWFObject.prototype.write;SWFObject.prototype.write=function(){if(this.getAttribute("version").major<8){this.addVariable("$swfaddress",SWFAddress.getValue());((typeof arguments[0]=="string")?document.getElementById(arguments[0]):arguments[0]).so=this;}if(success=com.asual.SWFObjectWrite.apply(this,arguments)){SWFAddress.addId(this.getAttribute("id"));}return success;};}else{com.asual.SWFObjectRegisterObject=SWFObject.registerObject;SWFObject.registerObject=function(){com.asual.SWFObjectRegisterObject.apply(this,arguments);SWFAddress.addId(arguments[0]);};com.asual.SWFObjectCreateSWF=SWFObject.createSWF;SWFObject.createSWF=function(){com.asual.SWFObjectCreateSWF.apply(this,arguments);SWFAddress.addId(arguments[0].id);};com.asual.SWFObjectEmbedSWF=SWFObject.embedSWF;SWFObject.embedSWF=function(){com.asual.SWFObjectEmbedSWF.apply(this,arguments);SWFAddress.addId(arguments[8].id);};}}if(typeof UFO!="undefined"){com.asual.UFOCreate=UFO.create;UFO.create=function(){com.asual.UFOCreate.apply(this,arguments);SWFAddress.addId(arguments[0].id);};}if(typeof AC_FL_RunContent!="undefined"){com.asual.AC_FL_RunContent=AC_FL_RunContent;AC_FL_RunContent=function(){com.asual.AC_FL_RunContent.apply(this,arguments);for(var i=0,a;a=arguments[i];i++){if(a=="id"){SWFAddress.addId(arguments[i+1]);break;}}};}