/** * SWFAddress v1.2: Deep linking for Flash - 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 asual=="undefined"){var asual=new Object();}if(typeof asual.util=="undefined"){asual.util=new Object();}asual.util.Browser=new function(){var _1=false;var _2=-1;var _3=navigator.userAgent;var ie=false;var _5=false;var _6=false;var _7=false;if(/MSIE/.test(_3)){ie=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(/Firefox/.test(_3)){_5=true;_2=parseFloat(_3.substring(_3.indexOf("Firefox")+8));_1=_2>=1;}else{if(/Camino/.test(_3)){_5=true;_2=parseFloat(_3.substring(_3.indexOf("Camino")+7));_1=_2>=1;}else{if(/Netscape/.test(_3)){_5=true;_2=parseFloat(_3.substring(_3.indexOf("Netscape")+9));_1=_2>=8;}else{if(/Mozilla/.test(_3)&&/rv:/.test(_3)){_5=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 ie;};this.isSafari=function(){return _6;};this.isOpera=function(){return _7;};this.isGecko=function(){return _5;};};asual.util.Functions=new function(){this.extend=function(_8,_9){function inheritance(){}inheritance.prototype=_8.prototype;_9.prototype=new inheritance();_9.prototype.constructor=_9;_9.superConstructor=_8;_9.superClass=_8.prototype;for(var p in _8){if(p!="prototype"){_9[p]=_8[p];}}return _9;};this.bindAsListener=function(_b,_c,_d){return function(_e){return _b.call(_c,_e||((_d)?_d.event:window.event));};};};asual.util.Events=new function(){var _f=new Array();this.addListener=function(obj,_11,_12){if(obj.addEventListener){obj.addEventListener(_11,_12,false);}else{if(obj.attachEvent){obj.attachEvent("on"+_11,_12);}else{obj["on"+_11]=_12;}}_f.push({o:obj,t:_11,l:_12});};this.removeListener=function(obj,_14,_15){if(obj.removeEventListener){obj.removeEventListener(_14,_15,false);}else{if(obj.detachEvent){obj.detachEvent("on"+_14,_15);}else{obj["on"+_14]=_15;}}};var _16=function(){for(var i=0,evt;evt=_f[i];i++){asual.util.Events.removeListener(evt.o,evt.t,evt.l);}};if(asual.util.Browser.isIE()||asual.util.Browser.isSafari()){this.addListener(window,"unload",asual.util.Functions.bindAsListener(_16,this));}};asual.SWFAddress=new function(){var _19=asual.util.Browser;var _1a,_1b,_1c=_19.isSupported();var _1d,_1e,_1f,_20=false;var _21=document.title;var _22=history.length;var _23=new Array();var _24=new Object();var _25=true;var _26=true;var js="swfaddress.js";var _28="swfaddress.html";var swf="swfaddress.swf";var d=top.document;var h=top.history;var l=top.location;if((!_1c&&l.href.indexOf("#")!=-1)||(_19.isSafari()&&_19.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 _2d=function(url){var _2f=document.getElementsByTagName("script");for(var i=0,s;s=_2f[i];i++){if(s.src.indexOf(js)>-1){return (new String(s.src)).replace(js,url);}}};var _32=function(){var _33=l.href.indexOf("#");if(_33!=-1){return l.href.substring(_33);}return "";};var _34=_32();var _35=function(){if(_19.isIE()&&d.title!=_21){asual.SWFAddress.setTitle(_21);}};var _36=function(){if(_19.isSafari()){if(_22!=h.length&&!_20){_22=h.length;if(typeof _23[_22-1]!="undefined"){_34=_23[_22-1];}_37();}}else{if(_19.isIE()){if(_34!=_32()){if(_19.getVersion()<7){l.reload();}else{_38(_32().replace(/^#/g,""),false);}}}else{if(_34!=l.hash){_34=_32();_37();}}}_35();};var _39=function(){if(typeof SWFAddress.onInit=="function"){SWFAddress.onInit();}if(SWFAddress.hasEventListener("init")){SWFAddress.dispatchEvent({target:SWFAddress,type:"init"});}};var _3a=function(){if(typeof SWFAddress.onChange=="function"){SWFAddress.onChange();}if(SWFAddress.hasEventListener("change")){SWFAddress.dispatchEvent({target:SWFAddress,type:"change"});}};var _37=function(){var _3b=_34.replace(/^#/g,"");if(_3b!=_1d){_1d=_3b;var obj=document[_1f]||document.getElementById(_1f);if(obj&&obj.setSWFAddressValue){obj.setSWFAddressValue(_3b);}if(_1e&&_1e.call){_1e.call("setSWFAddressValue",_3b);}_3a();}};var _3d=function(){if(_25&&typeof urchinTracker!="undefined"){var _3e=l.pathname+this.getValue();_3e=_3e.replace(/\/\//,"/");_3e=_3e.replace(/^\/$/,"");urchinTracker(_3e);}};var _3f=function(){if(_1a.contentWindow&&_1a.contentWindow.location){var win=_1a.contentWindow;win.document.title=d.title=_21;var src=win.location.href;if(src.indexOf("?")>-1){_34="#"+src.substring(src.indexOf("?")+1);}else{_34="#";}if(_34!=_32()){_37();l.hash=_34;}}};var _42=function(){if(_19.isIE()||_19.isSafari()){var _43=document.createElement("div");_43.id="swfaddress";_43.innerHTML="<iframe id=\"swfaddress-iframe\" src=\""+_2d(_28)+_32().replace(/^#/g,"?")+"\" frameborder=\"no\" scrolling=\"no\"></iframe>";document.body.appendChild(_43);_43.style.position="absolute";_43.style.left=_43.style.top="-9999px";_1a=_43.getElementsByTagName("iframe")[0];}if(_19.isIE()){asual.util.Events.addListener(_1a,"load",asual.util.Functions.bindAsListener(_3f,this));}if(_19.isSafari()){_1b=document.createElement("form");_1b.id="swfaddress-form";_1b.method="get";_43.appendChild(_1b);if(typeof l.swfaddress=="undefined"){l.swfaddress=new Object();}if(typeof l.swfaddress.history!="undefined"){_23=l.swfaddress.history.split(",");}}if(_19.isOpera()&&typeof _1f=="undefined"){document.body.innerHTML+="<embed src=\""+_2d(swf)+"\" width=\"1\" height=\"1\" style=\"position: absolute; top: -9999px; left: -9999px\" type=\"application/x-shockwave-flash\" />";}_3d.call(this);_37.call(this);setTimeout(_39,1);setTimeout(_3a,2);setInterval(_36,50);};var _38=function(_44,_45){if(!_1c){return null;}if(_44=="null"){_44="";}if(_1d==_44){return;}_34="#"+_44;if(_45){_1d=_44;_37();}else{_37();_1d=_44;}if(_19.isSafari()){if(_26){_23[history.length]=_34;l.swfaddress.history=_23.toString();_20=true;_22=history.length+1;if(_19.getVersion()<412){if(l.search==""){_1b.action=_34;_1b.submit();}}else{var evt=document.createEvent("MouseEvents");evt.initEvent("click",true,true);var _47=document.createElement("a");_47.href=_34;_47.dispatchEvent(evt);}_20=false;}else{l.hash=_34;}}else{if(_45){if(_26){l.hash=_34;}else{l.replace(_34);}}}if(_19.isIE()&&_26){var win=_1a.contentWindow;var _49="?"+_32().substring(_34.indexOf("#")+1);win.location.assign(win.location.pathname+_49);}_3d.call(this);_3a.call(this);};this.toString=function(){return "[object SWFAddress]";};this.back=function(){h.back();};this.forward=function(){h.forward();};this.go=function(_4a){h.go(_4a);};this.addEventListener=function(_4b,_4c){if(typeof _24[_4b]=="undefined"){_24[_4b]=new Array();}_24[_4b].push(_4c);};this.removeEventListener=function(_4d,_4e){if(typeof _24[_4d]!="undefined"){for(var i=0,l;l=_24[_4d][i];i++){if(l==_4e){break;}}_24[_4d].splice(i,1);}};this.dispatchEvent=function(_50){if(typeof _24[_50.type]!="undefined"){_50.target=this;for(var i=0,l;l=_24[_50.type][i];i++){l(_50);}}};this.hasEventListener=function(_52){return (typeof _24[_52]!="undefined"&&_24[_52].length>0);};this.getHistoryEnabled=function(){return _26;};this.setHistoryEnabled=function(_53){_26=_53;};this.getTrackingEnabled=function(){return _25;};this.setTrackingEnabled=function(_54){_25=_54;};this.openLink=function(url,_56){switch(_56){case "_blank":window.open(url);break;case "_self":self.location=url;break;case "_top":loc=url;break;default:self.location=url;break;}};this.openPopup=function(url,_58,_59,_5a){var w=window.open(url,_58,_59);};this.getSWFObject=function(){if(!_1c){return null;}return _1e;};this.setSWFObject=function(_5c){if(!_1c){return null;}_1e=_5c;};this.getId=function(){if(!_1c){return null;}return _1f;};this.setId=function(id){if(!_1c){return null;}_1f=id;};this.getTitle=function(){if(!_1c){return null;}return d.title;};this.setTitle=function(_5e){if(!_1c){return null;}if(_5e=="null"){_5e="";}if(typeof _5e!="undefined"){_21=_5e;d.title=_21;}};this.getStatus=function(){if(!_1c){return null;}return top.status;};this.setStatus=function(_5f){if(!_1c){return null;}if(!_19.isSafari()){if(_5f=="null"||typeof _5f=="undefined"){_5f="";}var _60=l.href.indexOf("#");if(_60==-1){_5f=l.href+"#"+_5f;}else{_5f=l.href.substr(0,_60)+"#"+_5f;}top.status=_5f;}};this.resetStatus=function(){top.status="";};this.getValue=function(){if(!_1c){return null;}var _61=_34.replace(/^#/g,"");return _61;};this.setValue=function(_62){_38(_62,true);};this.getPath=function(){var _63=this.getValue();if(_63.indexOf("?")!=1){return _63.split("?")[0];}else{return _63;}};this.getQueryString=function(){var _64=this.getValue();var _65=_64.indexOf("?");if(_65!=-1&&_65<_64.length){return _64.substr(_65+1);}return "";};this.getParameter=function(_66){var _67=this.getValue();var _68=_67.indexOf("?");if(_68!=-1){_67=_67.substr(_68+1);var _69=_67.split("&");var p,i=_69.length;while(i--){p=_69[i].split("=");if(p[0]==_66){return p[1];}}}return "";};if(!_1c){return;}if(_19.isSafari()){for(var i=1;i<_22;i++){_23.push("");}_23.push(l.hash);}if(_19.isIE()){if(_34==""){_34=l.hash="#";}else{if(l.hash!=_32()){l.hash=_32();}}}_1d=this.getValue();_35();asual.util.Events.addListener(window,"load",asual.util.Functions.bindAsListener(_42,this));};SWFAddress=asual.SWFAddress;if(typeof deconcept!="undefined"&&deconcept.SWFObject){asual.SWFAddressObject=asual.util.Functions.extend(deconcept.SWFObject,function(swf,id,w,h,ver,c,_73,_74,_75,_76){asual.SWFAddressObject.superConstructor.apply(this,arguments);SWFAddress.setSWFObject(this);SWFAddress.setId(id);this.setAttribute("style",";");if(this.getAttribute("version").major<8){this.addVariable("$swfaddress",SWFAddress.getValue());}});SWFObject=deconcept.SWFObject=asual.SWFAddressObject;}