/** * SWFAddress v1.1: Deep linking for Flash - http://www.asual.com/swfaddress/ * * SWFAddress is (c) 2006 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=navigator.userAgent;this.supported=false;this.ie=false;this.gecko=false;this.safari=false;this.opera=false;this.version=-1;if(/MSIE/.test(_1)){this.ie=true;this.version=parseFloat(_1.substring(_1.indexOf("MSIE")+4));this.supported=this.version>=6;}else{if(/AppleWebKit/.test(_1)){this.safari=true;this.version=parseFloat(_1.substring(_1.indexOf("Safari")+7));this.supported=this.version>=312;}else{if(/Opera/.test(_1)){this.opera=true;this.version=parseFloat(navigator.appVersion);this.supported=this.version>=9.02;}else{if(/Firefox/.test(_1)){this.gecko=true;this.version=parseFloat(_1.substring(_1.indexOf("Firefox")+8));this.supported=this.version>=1;}else{if(/Camino/.test(_1)){this.gecko=true;this.version=parseFloat(_1.substring(_1.indexOf("Camino")+7));this.supported=this.version>=1;}else{if(/Netscape/.test(_1)){this.gecko=true;this.version=parseFloat(_1.substring(_1.indexOf("Netscape")+9));this.supported=this.version>=8;}else{if(/Mozilla/.test(_1)&&/rv:/.test(_1)){this.gecko=true;this.version=parseFloat(_1.substring(_1.indexOf("rv:")+3));this.supported=this.version>=1.8;}}}}}}}if(!this.supported&&top.location.href.indexOf("#")!=-1){document.open();document.write("<html><head><meta http-equiv=\"refresh\" content=\"0;url="+top.location.href.substr(0,top.location.href.indexOf("#"))+"\" /></head></html>");document.close();}};asual.util.Functions=new function(){this.extend=function(_2,_3){function inheritance(){}inheritance.prototype=_2.prototype;_3.prototype=new inheritance();_3.prototype.constructor=_3;_3.superConstructor=_2;_3.superClass=_2.prototype;return _3;};this.bindAsListener=function(_4,_5,_6){return function(_7){return _4.call(_5,_7||((_6)?_6.event:window.event));};};};asual.util.Events=new function(){var _8=new Array();this.addListener=function(_9,_a,_b){if(_9.addEventListener){_9.addEventListener(_a,_b,false);}else{if(_9.attachEvent){_9.attachEvent("on"+_a,_b);}else{_9["on"+_a]=_b;}}_8.push({o:_9,t:_a,l:_b});};this.removeListener=function(_c,_d,_e){if(_c.removeEventListener){_c.removeEventListener(_d,_e,false);}else{if(_c.detachEvent){_c.detachEvent("on"+_d,_e);}else{_c["on"+_d]=_e;}}};var _f=function(){for(var i=0,evt;evt=_8[i];i++){asual.util.Events.removeListener(evt.o,evt.t,evt.l);}};if(asual.util.Browser.ie||asual.util.Browser.safari){this.addListener(window,"unload",asual.util.Functions.bindAsListener(_f,this));}};asual.SWFAddress=new function(){var _12=asual.util.Browser;var _13=_12.supported;var _14,_15;var _16,_17,_18=false;var _19=document.title;var _1a=history.length;var _1b=new Array();var js="swfaddress.js";var _1d="swfaddress.html";var _1e=function(){var _1f=top.location.href.indexOf("#");if(_1f!=-1){return top.location.href.substring(_1f);}return "";};var _20=_1e();var _21=function(){if(_12.safari){if(_1a!=history.length&&!_18){_1a=history.length;if(typeof _1b[_1a-1]!="undefined"){_20=_1b[_1a-1];}_22();}}else{if(_12.ie){if(_20!=_1e()){if(_12.version<7){top.location.reload();}else{_23(_1e().replace(/#/g,""),false);}}if(top.document.title!=_19){asual.SWFAddress.setTitle(_19);}}else{if(_20!=top.location.hash){_20=top.location.hash;_22();}}}};var _22=function(){var _24=_20.replace(/#/g,"");if(_24!=_16){_16=_24;var obj=document[_17]||document.getElementById(_17);if(obj){obj.setSWFAddressValue(_24);}if(typeof SWFAddress.onChange=="function"){SWFAddress.onChange();}}};var _26=function(){if(_14.contentWindow&&_14.contentWindow.location){var win=_14.contentWindow;win.document.title=top.document.title=_19;var src=win.location.href;if(src.indexOf("?")>-1){_20="#"+src.substring(src.indexOf("?")+1);}else{_20="#";}if(_20!=_1e()){_22();top.location.hash=_20;}}};var _29=function(){if(_12.ie||_12.safari){var _2a=document.createElement("div");_2a.id="swfaddress";var _2b=document.getElementsByTagName("script");for(var i=0,s;s=_2b[i];i++){if(s.src.indexOf(js)>-1){_1d=(new String(s.src)).replace(js,_1d);}}_2a.innerHTML="<iframe id=\"swfaddress-iframe\" src=\""+_1d+_1e().replace(/#/g,"?")+"\" frameborder=\"no\" scrolling=\"no\"></iframe>";document.body.appendChild(_2a);_2a.style.position="absolute";_2a.style.left=_2a.style.top="-9999px";_14=_2a.getElementsByTagName("iframe")[0];}if(_12.ie){asual.util.Events.addListener(_14,"load",asual.util.Functions.bindAsListener(_26,this));}if(_12.safari){_15=document.createElement("form");_15.id="swfaddress-form";_15.method="get";_2a.appendChild(_15);if(typeof top.document.location.swfaddress=="undefined"){top.document.location.swfaddress=new Object();}if(typeof top.document.location.swfaddress.history!="undefined"){_1b=top.document.location.swfaddress.history.split(",");}}_2e.call(this);_22.call(this);if(typeof this.onChange=="function"){this.onChange();}setInterval(_21,50);};var _2e=function(){if(typeof urchinTracker!="undefined"){var _2f=top.location.pathname+this.getValue();_2f=_2f.replace(/\/\//,"/");_2f=_2f.replace(/^\/$/,"");urchinTracker(_2f);}};var _23=function(_30,_31){if(!_13){return null;}if(_30=="null"){_30="";}if(_16==_30){return;}_20="#"+_30;if(_31){_16=_30;_22();}else{_22();_16=_30;}if(_12.safari){_15.action=_20;_1b[history.length]=_20;top.document.location.swfaddress.history=_1b.toString();_18=true;_1a=history.length+1;_15.submit();_18=false;}else{if(_31){top.location.hash=_20;}}if(_12.ie){var win=_14.contentWindow;var _33="?"+_1e().substring(_20.indexOf("#")+1);win.location.assign(win.location.pathname+_33);}_2e.call(this);if(typeof SWFAddress.onChange=="function"){SWFAddress.onChange();}};this.getId=function(){if(!_13){return null;}return _17;};this.setId=function(id){if(!_13){return null;}_17=id;};this.getTitle=function(){if(!_13){return null;}return top.document.title;};this.setTitle=function(_35){if(!_13){return null;}if(_35=="null"){_35="";}if(typeof _35!="undefined"){_19=_35;top.document.title=_19;}};this.getStatus=function(){if(!_13){return null;}return top.status;};this.setStatus=function(_36){if(!_13){return null;}if(!_12.safari){if(_36=="null"||typeof _36=="undefined"){_36="";}var _37=top.location.href.indexOf("#");if(_37==-1){_36=top.location.href+"#"+_36;}else{_36=top.location.href.substr(0,_37)+"#"+_36;}top.status=_36;}};this.resetStatus=function(){top.status="";};this.getValue=function(){if(!_13){return null;}var _38=_20.replace(/#/gi,"");return _38;};this.setValue=function(_39){_23(_39,true);};if(!_13){return;}if(_12.safari){for(var i=1;i<_1a;i++){_1b.push("");}_1b.push(top.location.hash);}if(_12.ie){if(_20==""){top.location.hash="#";}else{top.location.hash=_1e();}}asual.util.Events.addListener(window,"load",asual.util.Functions.bindAsListener(_29,this));_16=this.getValue();};if(typeof deconcept!="undefined"&&deconcept.SWFObject){asual.SWFAddressObject=asual.util.Functions.extend(deconcept.SWFObject,function(swf,id,w,h,ver,c,_41,_42,_43,_44){asual.SWFAddressObject.superConstructor.apply(this,arguments);asual.SWFAddress.setId(id);});SWFObject=deconcept.SWFObject=asual.SWFAddressObject;}SWFAddress=asual.SWFAddress;