/** * 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=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)||(this.safari&&this.version<412&&top.location.href.indexOf("#")!=-1&&top.location.search!="")){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,_14,_15=_12.supported;var _16,_17,_18=false;var _19=document.title;var _1a=history.length;var _1b=new Array();var _1c=true;var _1d=true;var js="swfaddress.js";var _1f="swfaddress.html";var _20=function(){var _21=top.location.href.indexOf("#");if(_21!=-1){return top.location.href.substring(_21);}return "";};var _22=_20();var _23=function(){if(_12.ie&&top.document.title!=_19){asual.SWFAddress.setTitle(_19);}};var _24=function(){if(_12.safari){if(_1a!=history.length&&!_18){_1a=history.length;if(typeof _1b[_1a-1]!="undefined"){_22=_1b[_1a-1];}_25();}}else{if(_12.ie){if(_22!=_20()){if(_12.version<7){top.location.reload();}else{_26(_20().replace(/^#/g,""),false);}}}else{if(_22!=top.location.hash){_22=_20();_25();}}}_23();};var _25=function(){var _27=_22.replace(/^#/g,"");if(_27!=_16){_16=_27;var obj=document[_17]||document.getElementById(_17);if(obj&&obj.setSWFAddressValue){obj.setSWFAddressValue(_27);}if(typeof SWFAddress.onChange=="function"){SWFAddress.onChange();}}};var _29=function(){if(_1c&&typeof urchinTracker!="undefined"){var _2a=top.location.pathname+this.getValue();_2a=_2a.replace(/\/\//,"/");_2a=_2a.replace(/^\/$/,"");urchinTracker(_2a);}};var _2b=function(){if(_13.contentWindow&&_13.contentWindow.location){var win=_13.contentWindow;win.document.title=top.document.title=_19;var src=win.location.href;if(src.indexOf("?")>-1){_22="#"+src.substring(src.indexOf("?")+1);}else{_22="#";}if(_22!=_20()){_25();top.location.hash=_22;}}};var _2e=function(){if(_12.ie||_12.safari){var _2f=document.createElement("div");_2f.id="swfaddress";var _30=document.getElementsByTagName("script");for(var i=0,s;s=_30[i];i++){if(s.src.indexOf(js)>-1){_1f=(new String(s.src)).replace(js,_1f);}}_2f.innerHTML="<iframe id=\"swfaddress-iframe\" src=\""+_1f+_20().replace(/^#/g,"?")+"\" frameborder=\"no\" scrolling=\"no\"></iframe>";document.body.appendChild(_2f);_2f.style.position="absolute";_2f.style.left=_2f.style.top="-9999px";_13=_2f.getElementsByTagName("iframe")[0];}if(_12.ie){asual.util.Events.addListener(_13,"load",asual.util.Functions.bindAsListener(_2b,this));}if(_12.safari){_14=document.createElement("form");_14.id="swfaddress-form";_14.method="get";_2f.appendChild(_14);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(",");}}_29.call(this);_25.call(this);setTimeout(function(){if(typeof SWFAddress.onChange=="function"){SWFAddress.onChange();}},1);setInterval(_24,50);};var _26=function(_33,_34){if(!_15){return null;}if(_33=="null"){_33="";}if(_16==_33){return;}_22="#"+_33;if(_34){_16=_33;_25();}else{_25();_16=_33;}if(_12.safari){if(_1d){_1b[history.length]=_22;top.document.location.swfaddress.history=_1b.toString();_18=true;_1a=history.length+1;if(_12.version<412){if(top.location.search==""){_14.action=_22;_14.submit();}}else{var evt=document.createEvent("MouseEvents");evt.initEvent("click",true,true);var _36=document.createElement("a");_36.href=_22;_36.dispatchEvent(evt);}_18=false;}else{top.document.location.hash=_22;}}else{if(_34){if(_1d){top.location.hash=_22;}else{location.replace(_22);}}}if(_12.ie&&_1d){var win=_13.contentWindow;var _38="?"+_20().substring(_22.indexOf("#")+1);win.location.assign(win.location.pathname+_38);}_29.call(this);if(typeof SWFAddress.onChange=="function"){SWFAddress.onChange();}};var _39="    /**";var _39="     * Loads the previous URL in the history list.";var _39="     */";this.back=function(){history.back();};var _39="    /**";var _39="     * Loads the next URL in the history list.";var _39="     */    ";this.forward=function(){history.forward();};var _39="    /**";var _39="     * Loads a URL from the history list.";var _39="     * @param {Number} delta An integer representing a relative position in the history list";var _39="     */    ";this.go=function(_3a){history.go(_3a);};this.setHistoryEnabled=function(_3b){_1d=_3b;};this.setTrackingEnabled=function(_3c){_1c=_3c;};this.openLink=function(url,_3e){switch(_3e){case "_blank":window.open(url);break;case "_self":self.location=url;break;case "_top":top.location=url;break;default:self.location=url;break;}};var _39="    /**";var _39="     * Opens a browser popup window. ";var _39="     * @param {String} url The resource to be opened";var _39="     * @param {String} name The name of the popup window";var _39="     * @param {String} options Popup window options in a format compatible window.open()";var _39="     * @param {String} handler Optional handler function for window manipulation     ";var _39="     */";this.openPopup=function(url,_40,_41,_42){var w=window.open(url,_40,_41);};this.getId=function(){if(!_15){return null;}return _17;};this.setId=function(id){if(!_15){return null;}_17=id;};this.getTitle=function(){if(!_15){return null;}return top.document.title;};this.setTitle=function(_45){if(!_15){return null;}if(_45=="null"){_45="";}if(typeof _45!="undefined"){_19=_45;top.document.title=_19;}};this.getStatus=function(){if(!_15){return null;}return top.status;};this.setStatus=function(_46){if(!_15){return null;}if(!_12.safari){if(_46=="null"||typeof _46=="undefined"){_46="";}var _47=top.location.href.indexOf("#");if(_47==-1){_46=top.location.href+"#"+_46;}else{_46=top.location.href.substr(0,_47)+"#"+_46;}top.status=_46;}};this.resetStatus=function(){top.status="";};this.getValue=function(){if(!_15){return null;}var _48=_22.replace(/^#/g,"");return _48;};this.setValue=function(_49){_26(_49,true);};this.getPath=function(){var _4a=this.getValue();if(_4a.indexOf("?")!=1){return _4a.split("?")[0];}else{return _4a;}};this.getQueryString=function(){var _4b=this.getValue();var _4c=_4b.indexOf("?");if(_4c!=-1&&_4c<_4b.length){return _4b.substr(_4c+1);}return "";};this.getParameter=function(_4d){var _4e=this.getValue();var _4f=_4e.indexOf("?");if(_4f!=-1){_4e=_4e.substr(_4f+1);var _50=_4e.split("&");var p,i=_50.length;while(i--){p=_50[i].split("=");if(p[0]==_4d){return p[1];}}}return "";};if(!_15){return;}if(_12.safari){for(var i=1;i<_1a;i++){_1b.push("");}_1b.push(top.location.hash);}if(_12.ie){if(_22==""){_22=top.location.hash="#";}else{if(top.location.hash!=_20()){top.location.hash=_20();}}}_16=this.getValue();_23();asual.util.Events.addListener(window,"load",asual.util.Functions.bindAsListener(_2e,this));};if(typeof deconcept!="undefined"&&deconcept.SWFObject){asual.SWFAddressObject=asual.util.Functions.extend(deconcept.SWFObject,function(swf,id,w,h,ver,c,_5a,_5b,_5c,_5d){asual.SWFAddressObject.superConstructor.apply(this,arguments);asual.SWFAddress.setId(id);});SWFObject=deconcept.SWFObject=asual.SWFAddressObject;}SWFAddress=asual.SWFAddress;
