/**
 * 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 e=false;var B=-1;var L=navigator.userAgent;var N=false;var E=false;var r=false;var I=false;var Y=false;if(/MSIE/.test(L)){N=true;B=parseFloat(L.substring(L.indexOf("MSIE")+4));e=B>=6;}else{if(/AppleWebKit/.test(L)){r=true;B=parseFloat(L.substring(L.indexOf("Safari")+7));e=B>=312;}else{if(/Opera/.test(L)){I=true;B=parseFloat(navigator.appVersion);e=B>=9.02;}else{if(/Camino/.test(L)){E=true;B=parseFloat(L.substring(L.indexOf("Camino")+7));e=B>=1;}else{if(/Firefox/.test(L)){Y=true;B=parseFloat(L.substring(L.indexOf("Firefox")+8));e=B>=1;}else{if(/Netscape/.test(L)){Y=true;B=parseFloat(L.substring(L.indexOf("Netscape")+9));e=B>=8;}else{if(/Mozilla/.test(L)&&/rv:/.test(L)){Y=true;B=parseFloat(L.substring(L.indexOf("rv:")+3));e=B>=1.8;}}}}}}}this.isSupported=function(){return e;};this.getVersion=function(){return B;};this.isIE=function(){return N;};this.isSafari=function(){return r;};this.isOpera=function(){return I;};this.isCamino=function(){return E;};this.isMozilla=function(){return Y;};};asual.util.Functions=new function(){this.extend=function(B,E){function e(){}e.prototype=B.prototype;E.prototype=new e();E.prototype.constructor=E;E.superConstructor=B;E.superClass=B.prototype;for(var I in B){if(I!="prototype"){E[I]=B[I];}}return E;};this.bindAsListener=function(I,e,E){return function(B){return I.call(e,B||((E)?E.event:window.event));};};};asual.util.Events=new function(){var e=new Array();var I=asual.util.Browser;var B="DOMContentLoaded";if(I.isIE()){document.write("<script id=swfaddress-domload defer=true src=//:></script>");document.getElementById("swfaddress-domload").onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);for(var L=0,r;r=e[L];L++){if(r.t==B){r.l.call(null);}}}};}else{if(I.isSafari()){var Y=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(Y);for(var L=0,r;r=e[L];L++){if(r.t==B){r.l.call(null);}}}},10);}}this.addListener=function(N,L,r){e.push({o:N,t:L,l:r});if(L==B&&(I.isIE()||I.isSafari())){return ;}if(N.addEventListener){N.addEventListener(L,r,false);}else{if(N.attachEvent){N.attachEvent("on"+L,r);}else{N["on"+L]=r;}}};this.removeListener=function(o,r,N){for(var L=0,O;O=e[L];L++){if(O.o==o&&O.t==r&&O.l==N){e.splice(L,1);break;}}if(r==B&&(I.isIE()||I.isSafari())){return ;}if(o.removeEventListener){o.removeEventListener(r,N,false);}else{if(o.detachEvent){o.detachEvent("on"+r,N);}else{o["on"+r]=N;}}};var E=function(){for(var r=0,L;L=e[r];r++){if(L.t!=B){asual.util.Events.removeListener(L.o,L.t,L.l);}}};if(I.isIE()||I.isSafari()){this.addListener(window,"unload",asual.util.Functions.bindAsListener(E,this));}};SWFAddressEvent=function(e){this.type=e;this.target=[SWFAddress][0];this.value=SWFAddress.getValue();this.path=SWFAddress.getPath();this.parameters=new Array();var I=SWFAddress.getParameterNames();for(var E=0,B;B=I[E];E++){this.parameters[B]=SWFAddress.getParameter(B);}};SWFAddressEvent.INIT="init";SWFAddressEvent.CHANGE="change";SWFAddress=new function(){var Q=asual.util.Browser;var c,e,B=Q.isSupported();var S,r,p,f=false;var s=document.title;var o=history.length;var L=new Array();var g=new Object();var n=true;var O=true;var G="swfaddress.js";var k="swfaddress.swf";var j="swfaddress.html";var V=top.document;var z=top.history;var R=top.location;if((!B&&R.href.indexOf("#")!=-1)||(Q.isSafari()&&Q.getVersion()<412&&R.href.indexOf("#")!=-1&&R.search!="")){V.open();V.write("<html><head><meta http-equiv=\"refresh\" content=\"0;url="+R.href.substr(0,R.href.indexOf("#"))+"\" /></head></html>");V.close();}var C=function(a){var d=document.getElementsByTagName("script");for(var t=0,U;U=d[t];t++){if(U.src.indexOf(G)>-1){return (new String(U.src)).replace(G,a);}}};var u=function(){var i=R.href.indexOf("#");if(i!=-1){return R.href.substring(i).replace(/^#/g,"");}return "";};var E=u();var N=function(){if(Q.isIE()&&V.title!=s){SWFAddress.setTitle(s);}};var J=function(){if(Q.isSafari()){if(o!=z.length&&!f){o=z.length;if(typeof L[o-1]!="undefined"){E=L[o-1];}M();}}else{if(Q.isIE()){if(E!=u()){if(Q.getVersion()<7){R.reload();}else{I(u(),false);}}}else{if(E!=R.hash){E=u();M();}}}N();};var H=function(){x("init");};var K=function(){x("change");};var x=function(i){if(SWFAddress.hasEventListener(i)){SWFAddress.dispatchEvent(new SWFAddressEvent(i));}i=i.substr(0,1).toUpperCase()+i.substring(1);if(typeof SWFAddress["on"+i]=="function"){SWFAddress["on"+i]();}};var M=function(){var d=E;if(d!=S){S=d;if(r&&r.call){r.call("setSWFAddressValue",d);}else{var i=document[p]||document.getElementById(p);if(i){i=(typeof i!="undefined"&&typeof i.setSWFAddressValue!="undefined")?i:((typeof i.getElementsByTagName("object")[0]!="undefined"&&typeof i.getElementsByTagName("object")[0].setSWFAddressValue!="undefined")?i.getElementsByTagName("object")[0]:null);if(i){i.setSWFAddressValue(d);}}}K();}};var A=function(){if(n&&typeof urchinTracker!="undefined"){var i=R.pathname+SWFAddress.getValue();i=i.replace(/\/\//,"/");i=i.replace(/^\/$/,"");urchinTracker(i);}};var Y=function(){if(c.contentWindow&&c.contentWindow.location){var i=c.contentWindow;i.document.title=V.title=s;var d=i.location.href;if(d.indexOf("?")>-1){E=d.substring(d.indexOf("?")+1);}else{E="";}if(E!=u()){M();R.hash="#"+E;}}};var P=function(){var i=document.createElement("div");document.body.appendChild(i);i.id="swfaddress";i.style.position="absolute";i.style.left=i.style.top="-9999px";if(Q.isIE()||Q.isSafari()){i.innerHTML="<iframe src=\""+C(j)+"?"+u()+"\" width=\"0\" height=\"0\"></iframe>";c=i.getElementsByTagName("iframe")[0];}if(Q.isIE()){asual.util.Events.addListener(c,"load",asual.util.Functions.bindAsListener(Y,this));}if(Q.isSafari()){e=document.createElement("form");e.id="swfaddress-form";e.method="get";i.appendChild(e);if(typeof R.swfaddress=="undefined"){R.swfaddress=new Object();}if(typeof R.swfaddress.history!="undefined"){L=R.swfaddress.history.split(",");}}if(Q.isOpera()&&typeof p=="undefined"){i.innerHTML="<embed src=\""+C(k)+"\" type=\"application/x-shockwave-flash\" width=\"1\" height=\"1\" />";}A();M();setTimeout(H,1);setTimeout(K,2);setInterval(J,50);};var I=function(T,t){if(!B){return null;}if(T=="null"){T="";}if(S==T){return ;}E=T;if(t){S=T;M();}else{M();S=T;}L[history.length]=E;if(Q.isSafari()){if(O){R.swfaddress.history=L.toString();f=true;o=history.length+1;if(Q.getVersion()<412){if(R.search==""){e.action="#"+E;e.submit();}}else{var i=document.createEvent("MouseEvents");i.initEvent("click",true,true);var d=document.createElement("a");d.href="#"+E;d.dispatchEvent(i);}f=false;}else{R.hash="#"+E;}}else{if(t){if(O){R.hash="#"+E;}else{R.replace("#"+E);}}}if(Q.isIE()&&O){var U=c.contentWindow;var a="?"+u();U.location.assign(U.location.pathname+a);}A();K();};this.onInit=null;this.onChange=null;this.toString=function(){return "[class SWFAddress]";};this.back=function(){z.back();};this.forward=function(){z.forward();};this.go=function(i){z.go(i);};this.addEventListener=function(i,d){if(typeof g[i]=="undefined"){g[i]=new Array();}g[i].push(d);};this.removeEventListener=function(t,U){if(typeof g[t]!="undefined"){for(var a=0,d;d=g[t][a];a++){if(d==U){break;}}g[t].splice(a,1);}};this.dispatchEvent=function(t){if(typeof g[t.type]!="undefined"){t.target=this;for(var a=0,d;d=g[t.type][a];a++){d(t);}}};this.hasEventListener=function(i){return (typeof g[i]!="undefined"&&g[i].length>0);};this.getHistoryEnabled=function(){return O;};this.setHistoryEnabled=function(i){O=i;};this.getTrackingEnabled=function(){return n;};this.setTrackingEnabled=function(i){n=i;};this.openLink=function(i,d){switch(d){case "_blank":window.open(i);break;case "_self":self.location=i;break;case "_top":loc=i;break;default:self.location=i;break;}};this.openPopup=function(t,a,d,U){var i=window.open(t,a,d);};this.getSWFObject=function(){if(!B){return null;}return r;};this.setSWFObject=function(i){if(!B){return null;}r=i;};this.getId=function(){if(!B){return null;}return p;};this.setId=function(i){if(!B){return null;}p=i;};this.getTitle=function(){if(!B){return null;}return V.title;};this.setTitle=function(i){if(!B){return null;}if(i=="null"){i="";}if(typeof i!="undefined"){s=i;V.title=s;}};this.getStatus=function(){if(!B){return null;}return top.status;};this.setStatus=function(i){if(!B){return null;}if(!Q.isSafari()){if(i=="null"||typeof i=="undefined"){i="";}var d=R.href.indexOf("#");if(d==-1){i=R.href+"#"+i;}else{i=R.href.substr(0,d)+"#"+i;}top.status=i;}};this.resetStatus=function(){top.status="";};this.getValue=function(){if(!B){return null;}return E;};this.setValue=function(i){I(i,true);};this.getPath=function(){var i=this.getValue();if(i.indexOf("?")!=-1){return i.split("?")[0];}else{return i;}};this.getQueryString=function(){var d=this.getValue();var i=d.indexOf("?");if(i!=-1&&i<d.length){return d.substr(i+1);}return "";};this.getParameter=function(v){var t=this.getValue();var d=t.indexOf("?");if(d!=-1){t=t.substr(d+1);var T=t.split("&");var U,a=T.length;while(a--){U=T[a].split("=");if(U[0]==v){return U[1];}}}return "";};this.getParameterNames=function(){var t=this.getValue();var d=t.indexOf("?");var U=new Array();if(d!=-1){t=t.substr(d+1);if(t!=""&&t.indexOf("=")!=-1){var T=t.split("&");var a=0;while(a<T.length){U.push(T[a].split("=")[0]);a++;}}}return U;};if(!B){return ;}for(var w=1;w<o;w++){L.push("");}L.push(R.hash.replace(/^#/g,""));if(Q.isIE()&&R.hash!=u()){R.hash="#"+u();}S=this.getValue();N();asual.util.Events.addListener(document,"DOMContentLoaded",P);};if(typeof deconcept!="undefined"&&deconcept.SWFObject){asual.SWFAddressObject=asual.util.Functions.extend(deconcept.SWFObject,function(B,e,O,Y,r,N,o,L,E,I){asual.SWFAddressObject.superConstructor.apply(this,arguments);SWFAddress.setSWFObject(this);SWFAddress.setId(e);this.setAttribute("style",";");if(this.getAttribute("version").major<8){this.addVariable("$swfaddress",SWFAddress.getValue());}});SWFObject=deconcept.SWFObject=asual.SWFAddressObject;}if(typeof SWFFix!="undefined"){asual.SWFAddressRegisterFix=SWFFix.registerObject;SWFFix.registerObject=function(e,E){SWFAddress.setId(e);asual.SWFAddressRegisterFix.apply(this,arguments);};asual.SWFAddressCreateFix=SWFFix.createSWF;SWFFix.createSWF=function(e,E,I){SWFAddress.setId(e.id);asual.SWFAddressCreateFix.apply(this,arguments);};}