/**
* SWFAddress 2.2: Deep linking for Flash and Ajax
*
* SWFAddress is (c) 2006-2008 Rostislav Hristov and contributors
* This software is released under the MIT License
*
*/
if(typeof asual == "undefined") {
   asual = {
      };
   }
if(typeof asual.swfaddress == "undefined") {
   asual.swfaddress = {
      };
   }
if(typeof asual.util == "undefined") {
   asual.util = {
      };
   }
asual.util.Browser = new function() {
   var H =- 1, C = navigator.userAgent, E = false, F = false, B = false, G = false, D = false;
   var A = function(J, I) {
      return parseFloat(C.substr(C.indexOf(J) + I));
      };
   if(E = /MSIE/.test(C)){H=A("MSIE",4);
   }
if(B = /AppleWebKit/.test(C)){H=A("Safari",7);
}
if(G = /Opera/.test(C)){H=parseFloat(navigator.appVersion);
}
if(F = /Camino/.test(C)){H=A("Camino",7);
}
if(D = (/Firefox/.test(C)&&!F)){H=A("Firefox",8);
}
this.toString = function() {
return "[class Browser]";
};
this.getVersion = function() {
return H;
};
this.isIE = function() {
return E;
};
this.isSafari = function() {
return B;
};
this.isOpera = function() {
return G;
};
this.isCamino = function() {
return F;
};
this.isFirefox = function() {
return D;
};
};
asual.util.Events = new function() {
var C = "DOMContentLoaded", G = "onstop", I = window, F = document, B = [], A = asual.util, D = A.Browser;
this.toString = function() {
return "[class Events]";
};
this.addListener = function(L, J, K) {
B.push( {
o : L, t : J, l : K}
);
if(!(J == C && (D.isIE() || D.isSafari()))) {
if(L.addEventListener) {
L.addEventListener(J, K, false);
}
else {
if(L.attachEvent) {
L.attachEvent("on" + J, K);
}
}
}
};
this.removeListener = function(N, K, L) {
for(var J = 0, M; M = B[J]; J++) {
if(M.o == N && M.t == K && M.l == L) {
B.splice(J, 1);
break;
}
}
if(!(K == C && (D.isIE() || D.isSafari()))) {
if(N.removeEventListener) {
N.removeEventListener(K, L, false);
}
else {
if(N.detachEvent) {
N.detachEvent("on" + K, L);
}
}
}
};
var H = function() {
for(var K = 0, J; J = B[K]; K++) {
if(J.t != C) {
A.Events.removeListener(J.o, J.t, J.l);
}
}
};
var E = function() {
if(F.readyState == "interactive") {
function J() {
F.detachEvent(G, J);
H();
};
F.attachEvent(G, J);
I.setTimeout(function() {
F.detachEvent(G, J); }
, 0);
}
};
if(D.isIE() || D.isSafari()) {
(function() {
try {
if((D.isIE() && F.body) ||!/loaded|complete/.test(F.readyState)){F.documentElement.doScroll("left");}}catch(K){return setTimeout(arguments.callee,0);}for(var J=0,K;K=B[J];J++){if(K.t==C){K.l.call(null);}}})();
}
if(D.isIE()) {
I.attachEvent("onbeforeunload", E);
}
this.addListener(I, "unload", H);
};
asual.util.Functions = new function() {
this.toString = function() {
return "[class Functions]";
};
this.extend = function(C, A) {
function B() {
};
B.prototype = C.prototype;
A.prototype = new B();
A.prototype.constructor = A;
A.superConstructor = C;
A.superClass = C.prototype;
return A;
};
this.bind = function(F, B, E) {
for(var C = 2, D, A = []; D = arguments[C]; C++) {
A.push(D);
}
return function() {
return F.apply(B, A);
};
};
};
asual.swfaddress.WEBAddressEvent = function(D) {
var A = asual.swfaddress.WEBAddress;
this.toString = function() {
return "[object WEBAddressEvent]";
};
this.type = D;
this.target = [A][0];
this.value = A.getValue();
this.path = A.getPath();
this.pathNames = A.getPathNames();
this.parameters = {
};
var E = A.getParameterNames();
for(var C = 0, B = E.length; C < B; C++) {
this.parameters[E[C]] = A.getParameter(E[C]);
}
this.parametersNames = E;
};
asual.swfaddress.WEBAddressEvent.INIT = "init";
asual.swfaddress.WEBAddressEvent.CHANGE = "change";
asual.swfaddress.WEBAddress = new function() {
var ID = "", _2e = "function", _2f = "undefined", _30 = asual.swfaddress, _31 = asual.util, _32 = _31.Browser, _33 = _31.Events, _34 = _31.Functions, _35 = _32.getVersion(), _36 = false, _t = top, _d = _t.document, _h = _t.history, _l = _t.location, _si = setInterval, _st = setTimeout, _dc = decodeURIComponent, _ec = encodeURIComponent, _3f, _40, _41, _42, _43 = _d.title, _44 = _h.length, _45 = false, _46 = false, _47 = true, _48 = true, _49 = [], _4a = {
}
, _4b = {
history : true, html : false, strict : true, tracker : "_trackDefault"};
if(_32.isIE()) {
_36 = _35 >= 6;
}
if(_32.isSafari()) {
_36 = _35 >= 312;
}
if(_32.isOpera()) {
_36 = _35 >= 9.02;
}
if(_32.isCamino()) {
_36 = _35 >= 1;
}
if(_32.isFirefox()) {
_36 = _35 >= 1;
}
if((!_36 && _l.href.indexOf("#") !=- 1) || (_32.isSafari() && _35 < 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 _4c = function() {
var _4d = _l.href.indexOf("#");
return _4d !=- 1 ? _l.href.substr(_4d + 1) : "";
};
var _4e = _4c();
var _4f = function(_50, _51) {
if(_4b.strict) {
_50 = _51 ? (_50.substr(0, 1) != "/" ? "/" + _50 : _50) : (_50 == "" ? "/" : _50);
}
return _50;
};
var _52 = function(_53) {
return (_32.isIE() && _l.protocol == "file:") ? _4e.replace(/\?/,"%3F"):_53;
};
var _54 = function(el) {
for(var i = 0, l = el.childNodes.length, s; i < l; i++) {
if(el.childNodes[i].src) {
   _41 = String(el.childNodes[i].src);
   }
if(s = _54(el.childNodes[i])) {
   return s;
   }
}
};
var _59 = function() {
if(_32.isIE() && _d.title != _43 && _d.title.indexOf("#") !=- 1) {
_d.title = _43;
if(_4b.html && _3f && _3f.contentWindow && _3f.contentWindow.document) {
   _3f.contentWindow.document.title = _43;
   }
}
};
var _5a = function() {
if(!_45) {
var _5b = _4c();
if(_32.isIE()) {
   if(_4e != _5b) {
      if(_35 < 7) {
         _l.reload();
         }
      else {
         this.setValue(_5b);
         }
      }
   }
else {
   if(_32.isSafari() && _35 < 523) {
      if(_44 != _h.length) {
         _44 = _h.length;
         if(typeof _49[_44 - 1] != _2f) {
            _4e = _49[_44 - 1];
            }
         _5c.call(this);
         }
      }
   else {
      if(_4e != _5b) {
         _4e = _5b;
         _5c.call(this);
         }
      }
   }
_59.call(this);
}
};
var _5d = function(_5e) {
this.dispatchEvent(new _30.WEBAddressEvent(_5e));
_5e = _5e.substr(0, 1).toUpperCase() + _5e.substr(1);
if(typeof this["on" + _5e] == _2e) {
this["on" + _5e]();
}
};
var _5f = function() {
_5d.call(this, "init");
};
var _60 = function() {
_5d.call(this, "change");
};
var _5c = function() {
_60.call(this);
_st(_34.bind(_61, this), 10);
};
var _62 = function(_63) {
if(typeof urchinTracker == _2e) {
urchinTracker(_63);
}
if(typeof pageTracker != _2f && typeof pageTracker._trackPageview == _2e) {
pageTracker._trackPageview(_63);
}
};
eval("var _trackDefault = " + _62 + ";");
var _61 = function() {
if(typeof _4b.tracker != _2f && eval("typeof " + _4b.tracker + " != \"" + _2f + "\"")) {
var fn = eval(_4b.tracker);
if(typeof fn == _2e) {
   fn((_l.pathname + (/\/$/.test(_l.pathname)?"":"/")+this.getValue()).replace(/\/\//,"/").replace(/^\/$/,""));
   }
}
};
var _65 = function() {
var doc = _3f.contentWindow.document;
doc.open();
doc.write("<html><head><title>" + _d.title + "</title><script>var " + ID + " = \"" + _ec(_4c()) + "\";</script></head></html>");
doc.close();
};
var _67 = function() {
var win = _3f.contentWindow;
var src = win.location.href;
_4e = (_4b.html) ? (src.indexOf("?") >- 1 ? _dc(src.substr(src.indexOf("?") + 1)) : "") : (typeof win[ID] != _2f ? _dc(win[ID]) : "");
if(_4b.html) {
win.document.title = _43;
}
if(_4e != _4c()) {
_5c.call(_30.WEBAddress);
_l.hash = _52(_4e);
}
};
var _6a = function() {
if(!_46) {
_46 = true;
var _6b = "id=\"" + ID + "\" style=\"position:absolute;top:-9999px;\"";
if(_32.isIE() && _35 < 8) {
   _d.body.appendChild(_d.createElement("div")).innerHTML = "<iframe " + _6b + " src=\"" + (_4b.html ? _41.replace(/\.js(\?.*)?$/,".html")+"?"+_ec(_4c()):"javascript:false;")+"\" width=\"0\" height=\"0\"> ";_3f=_d.getElementById(ID);_st(function(){_33.addListener(_3f,"load",_67);if(!_4b.html&&typeof _3f.contentWindow[ID]==_2f){_65();}},50);}else{if(_32.isSafari()){if(_35<412){_d.body.innerHTML+=" < form "+_6b+" method = \"get\"></form>";
   _40 = _d.getElementById(ID);
   }
if(typeof _l[ID] == _2f) {
   _l[ID] = {
      };
   }
if(typeof _l[ID][_l.pathname] != _2f) {
   _49 = _l[ID][_l.pathname].split(",");
   }
}
}
_st(_34.bind(_5f, this), 1);
_st(_34.bind(_60, this), 2);
_st(_34.bind(_61, this), 10);
if(_32.isIE() && _35 >= 8) {
_d.body.onhashchange = _34.bind(_5a, this);
_42 = _si(_34.bind(_59, this), 50);
}
else {
_42 = _si(_34.bind(_5a, this), 50);
}
}
};
var _6c = function() {
clearInterval(_42);
};
this.onInit = null;
this.onChange = null;
this.toString = function() {
return "[class WEBAddress]";
};
this.back = function() {
_h.back();
};
this.forward = function() {
_h.forward();
};
this.up = function() {
var _6d = this.getPath();
this.setValue(_6d.substr(0, _6d.lastIndexOf("/", _6d.length - 2) + (_6d.substr(_6d.length - 1) == "/" ? 1 : 0)));
};
this.go = function(_6e) {
_h.go(_6e);
};
this.addEventListener = function(_6f, _70) {
if(typeof _4a[_6f] == _2f) {
_4a[_6f] = [];
}
_4a[_6f].push(_70);
};
this.removeEventListener = function(_71, _72) {
if(typeof _4a[_71] != _2f) {
for(var i = 0, l; l = _4a[_71][i]; i++) {
if(l == _72) {
break;
}
}
_4a[_71].splice(i, 1);
}
};
this.dispatchEvent = function(_75) {
if(this.hasEventListener(_75.type)) {
_75.target = this;
for(var i = 0, l; l = _4a[_75.type][i]; i++) {
l(_75);
}
return true;
}
return false;
};
this.hasEventListener = function(_78) {
return (typeof _4a[_78] != _2f && _4a[_78].length > 0);
};
this.getBaseURL = function() {
var url = _l.href;
if(url.indexOf("#") !=- 1) {
url = url.substr(0, url.indexOf("#"));
}
if(url.substr(url.length - 1) == "/") {
url = url.substr(0, url.length - 1);
}
return url;
};
this.getStrict = function() {
return _4b.strict;
};
this.setStrict = function(_7a) {
_4b.strict = _7a;
};
this.getHistory = function() {
return _4b.history;
};
this.setHistory = function(_7b) {
_4b.history = _7b;
};
this.getTracker = function() {
return _4b.tracker;
};
this.setTracker = function(_7c) {
_4b.tracker = _7c;
};
this.getTitle = function() {
return _d.title;
};
this.setTitle = function(_7d) {
if(!_36) {
return null;
}
if(typeof _7d == _2f) {
return;
}
if(_7d == "null") {
_7d = "";
}
_43 = _d.title = _7d;
_st(function() {
if((_48 || _4b.html) && _3f && _3f.contentWindow && _3f.contentWindow.document) {
_3f.contentWindow.document.title = _7d; _48 = false; }
if(!_47 && (_32.isCamino() || _32.isFirefox())) {
_l.replace(_l.href.indexOf("#") !=- 1 ? _l.href : _l.href + "#"); }
_47 = false; }
, 50);
};
this.getStatus = function() {
return _t.status;
};
this.setStatus = function(_7e) {
if(typeof _7e == _2f) {
return;
}
if(!_32.isSafari()) {
_7e = _4f((_7e != "null") ? _7e : "", true);
if(_7e == "/") {
_7e = "";
}
if(!(/http(s)?:\/\//.test(_7e))){var _7f=_l.href.indexOf("#");
_7e = (_7f ==- 1 ? _l.href : _l.href.substr(0, _7f)) + "#" + _7e;
}
_t.status = _7e;
}
};
this.resetStatus = function() {
_t.status = "";
};
this.getValue = function() {
if(!_36) {
return null;
}
return _4f(_4e, false);
};
this.setValue = function(_80) {
if(!_36) {
return null;
}
if(typeof _80 == _2f) {
return;
}
if(_80 == "null") {
_80 = "";
}
_80 = _4f(_80, true);
if(_80 == "/") {
_80 = "";
}
if(_4e == _80) {
return;
}
_47 = true;
_4e = _80;
_45 = true;
_5c.call(_30.WEBAddress);
_49[_h.length] = _4e;
if(_32.isSafari()) {
if(_4b.history) {
_l[ID][_l.pathname] = _49.toString();
_44 = _h.length + 1;
if(_35 < 412) {
if(_l.search == "") {
_40.action = "#" + _4e;
_40.submit();
}
}
else {
if(_35 < 523 || _4e == "") {
var evt = _d.createEvent("MouseEvents");
evt.initEvent("click", true, true);
var _82 = _d.createElement("a");
_82.href = "#" + _4e;
_82.dispatchEvent(evt);
}
else {
_l.hash = "#" + _4e;
}
}
}
else {
_l.replace("#" + _4e);
}
}
else {
if(_4e != _4c()) {
if(_4b.history) {
_l.hash = "#" + _52(_4e);
}
else {
_l.replace("#" + _4e);
}
}
}
if((_32.isIE() && _35 < 8) && _4b.history) {
if(_4b.html) {
var loc = _3f.contentWindow.location;
loc.assign(loc.pathname + "?" + _4c());
}
else {
_st(_65, 50);
}
}
if(_32.isSafari()) {
_st(function() {
_45 = false; }
, 1);
}
else {
_45 = false;
}
};
this.getPath = function() {
var _84 = this.getValue();
return (_84.indexOf("?") !=- 1) ? _84.split("?")[0] : _84;
};
this.getPathNames = function() {
var _85 = this.getPath();
var _86 = _85.split("/");
if(_85.substr(0, 1) == "/" || _85.length == 0) {
_86.splice(0, 1);
}
if(_85.substr(_85.length - 1, 1) == "/") {
_86.splice(_86.length - 1, 1);
}
return _86;
};
this.getQueryString = function() {
var _87 = this.getValue();
var _88 = _87.indexOf("?");
return (_88 !=- 1 && _88 < _87.length) ? _87.substr(_88 + 1) : "";
};
this.getParameter = function(_89) {
var _8a = this.getValue();
var _8b = _8a.indexOf("?");
if(_8b !=- 1) {
_8a = _8a.substr(_8b + 1);
var _8c = _8a.split("&");
var p, i = _8c.length;
while(i--) {
p = _8c[i].split("=");
if(p[0] == _89) {
return p[1];
}
}
}
return "";
};
this.getParameterNames = function() {
var _8f = this.getValue();
var _90 = _8f.indexOf("?");
var _91 = [];
if(_90 !=- 1) {
_8f = _8f.substr(_90 + 1);
if(_8f != "" && _8f.indexOf("=") !=- 1) {
var _92 = _8f.split("&");
var i = 0;
while(i < _92.length) {
_91.push(_92[i].split("=")[0]);
i++;
}
}
}
return _91;
};
if(_36) {
for(var i = 1; i < _44; i++) {
_49.push("");
}
_49.push(_4c());
if(_32.isIE() && _l.hash != _4c()) {
_l.hash = "#" + _52(_4c());
}
_54(document);
var _qi = _41.indexOf("?");
if(_41 && _qi >- 1) {
var _96, _97 = _41.substr(_qi + 1).split("&");
for(var i = 0, p; p = _97[i]; i++) {
_96 = p.split("=");
if(/^(history|html|strict)$/.test(_96[0])){_4b[_96[0]]=(isNaN(_96[1])?eval(_96[1]):(parseFloat(_96[1])>0));
}
if(/^tracker$/.test(_96[0])){_4b[_96[0]]=_96[1];
}
}
}
if(/file:\/\//.test(_l.href)){_4b.html=false;
}
var _ei = _41.indexOf(".js"), l;
if(_41 && _ei >- 1) {
while(_ei--) {
l = _41.substr(_ei, 1);
if(/(\/|\\)/.test(l)){break;
}
ID = l + ID;
}
}
_59.call(this);
if(window == _t) {
_33.addListener(document, "DOMContentLoaded", _34.bind(_6a, this));
}
_33.addListener(_t, "load", _34.bind(_6a, this));
_33.addListener(_t, "unload", _34.bind(_6c, this));
}
else {
_61();
}
};
SWFAddressEvent = asual.swfaddress.SWFAddressEvent = function(A) {
SWFAddressEvent.superConstructor.apply(this, arguments);
this.target = [SWFAddress][0];
this.toString = function() {
return "[object SWFAddressEvent]";
};
};
asual.util.Functions.extend(asual.swfaddress.WEBAddressEvent, SWFAddressEvent);
asual.swfaddress.SWFAddressEvent.INIT = "init";
asual.swfaddress.SWFAddressEvent.CHANGE = "change";
SWFAddress = asual.swfaddress.SWFAddress = new function() {
var _9c = "undefined", _t = top, _l = _t.location, _9f = this, _a0 = [], _a1 = [], _a2 = {
}
, _a3 = asual.util, _a4 = asual.util.Functions, _a5 = asual.swfaddress.WEBAddress;
for(var p in _a5) {
this[p] = _a5[p];
}
var _a7 = function(_a8) {
this.dispatchEvent(new SWFAddressEvent(_a8));
_a8 = _a8.substr(0, 1).toUpperCase() + _a8.substr(1);
if(typeof this["on" + _a8] == "function") {
this["on" + _a8]();
}
};
var _a9 = function(e) {
if(_a1.length > 0) {
var _ab = window.open(_a1[0], _a1[1], eval(_a1[2]));
if(typeof _a1[3] != _9c) {
eval(_a1[3]);
}
}
_a1 = [];
};
var _ac = function() {
if(_a3.Browser.isSafari()) {
document.body.addEventListener("click", _a9);
}
_a7.call(this, "init");
};
var _ad = function() {
_ae();
_a7.call(this, "change");
};
var _ae = function() {
for(var i = 0, id, obj, _b2 = SWFAddress.getValue(), _b3 = "setSWFAddressValue"; id = _a0[i]; i++) {
obj = document.getElementById(id);
if(obj) {
if(obj.parentNode && typeof obj.parentNode.so != _9c) {
obj.parentNode.so.call(_b3, _b2);
}
else {
if(!(obj && typeof obj[_b3] != _9c)) {
var _b4 = obj.getElementsByTagName("object");
var _b5 = obj.getElementsByTagName("embed");
obj = ((_b4[0] && typeof _b4[0][_b3] != _9c) ? _b4[0] : ((_b5[0] && typeof _b5[0][_b3] != _9c) ? _b5[0] : null));
}
if(obj) {
obj[_b3](_b2);
}
}
}
else {
if(obj = document[id]) {
if(typeof obj[_b3] != _9c) {
obj[_b3](_b2);
}
}
}
}
};
this.toString = function() {
return "[class SWFAddress]";
};
this.addEventListener = function(_b6, _b7) {
if(typeof _a2[_b6] == _9c) {
_a2[_b6] = [];
}
_a2[_b6].push(_b7);
};
this.removeEventListener = function(_b8, _b9) {
if(typeof _a2[_b8] != _9c) {
for(var i = 0, l; l = _a2[_b8][i]; i++) {
if(l == _b9) {
break;
}
}
_a2[_b8].splice(i, 1);
}
};
this.dispatchEvent = function(_bc) {
if(typeof _a2[_bc.type] != _9c && _a2[_bc.type].length) {
_bc.target = this;
for(var i = 0, l; l = _a2[_bc.type][i]; i++) {
l(_bc);
}
return true;
}
return false;
};
this.hasEventListener = function(_bf) {
return (typeof _a2[_bf] != _9c && _a2[_bf].length > 0);
};
this.href = function(url, _c1) {
_c1 = typeof _c1 != _9c ? _c1 : "_self";
if(_c1 == "_self") {
self.location.href = url;
}
else {
if(_c1 == "_top") {
_l.href = url;
}
else {
if(_c1 == "_blank") {
window.open(url);
}
else {
_t.frames[_c1].location.href = url;
}
}
}
};
this.popup = function(url, _c3, _c4, _c5) {
try {
var _c6 = window.open(url, _c3, eval(_c4));
if(typeof _c5 != _9c) {
eval(_c5);
}
}
catch(ex) {
}
_a1 = arguments;
};
this.getIds = function() {
return _a0;
};
this.getId = function(_c7) {
return _a0[0];
};
this.setId = function(id) {
_a0[0] = id;
};
this.addId = function(id) {
this.removeId(id);
_a0.push(id);
};
this.removeId = function(id) {
for(var i = 0; i < _a0.length; i++) {
if(id == _a0[i]) {
_a0.splice(i, 1);
break;
}
}
};
_a5.addEventListener("init", _a4.bind(_ac, this));
_a5.addEventListener("change", _a4.bind(_ad, this));
(function() {
var _cc; if(typeof FlashObject != _9c) {
SWFObject = FlashObject; }
if(typeof SWFObject != _9c && SWFObject.prototype && SWFObject.prototype.write) {
var _s1 = SWFObject.prototype.write; SWFObject.prototype.write = function() {
_cc = arguments; if(this.getAttribute("version").major < 8) {
this.addVariable("$swfaddress", SWFAddress.getValue()); ((typeof _cc[0] == "string") ? document.getElementById(_cc[0]) : _cc[0]).so = this; }
var _ce; if(_ce = _s1.apply(this, _cc)) {
_9f.addId(this.getAttribute("id")); }
return _ce; }; }
if(typeof swfobject != _9c) {
var _cf = swfobject.registerObject; swfobject.registerObject = function() {
_cc = arguments; _cf.apply(this, _cc); _9f.addId(_cc[0]); }; var _d0 = swfobject.createSWF; swfobject.createSWF = function() {
_cc = arguments; _d0.apply(this, _cc); _9f.addId(_cc[0].id); }; var _d1 = swfobject.embedSWF; swfobject.embedSWF = function() {
_cc = arguments; _d1.apply(this, _cc); _9f.addId(_cc[8].id); }; }
if(typeof UFO != _9c) {
var _u = UFO.create; UFO.create = function() {
_cc = arguments; _u.apply(this, _cc); _9f.addId(_cc[0].id); }; }
if(typeof AC_FL_RunContent != _9c) {
var _a = AC_FL_RunContent; AC_FL_RunContent = function() {
_cc = arguments; _a.apply(this, _cc); for(var i = 0, l = _cc.length; i < l; i++) {
if(_cc[i] == "id") {
_9f.addId(_cc[i + 1]); }
}
}; }
}
)();
}; 