var WebApp=(function(){var L2R=+1;var R2L=-1;var HEAD=0;var HOME=1;var BACK=2;var LEFT=3;var RIGHT=4;var TITLE=5;var _def,_headView,_head;var _webapp,_group;var _loader=[];var _fading=[];var _header=[];var _async=[];var _location=[];var _history=[];var _historyPos=-1;var _prev=-1;var _initialNav=history.length;var _sliding=false;var _hold=false;var _baseTitle=null;var _baseBack=null;var _lockCnt=0;var _width=0;var _dialog=null;var _handler={}
_handler.load=[];_handler.beginslide=[];_handler.endslide=[];_handler.orientationchange=[];_handler.error=[];__p={SetDefault:function(layer){_def=layer},HideBar:function(){window.scrollTo(0,1);return false},Header:function(show,what){_C(show);_S(_headView,0);_headView=$(what);_S(_headView,!show);return false},Tab:function(id,active){var o=$(id);_g(o,$$("li",o)[active])},AddEventListener:function(evt,handler){if(typeof _handler[evt]!="undefined")if(_handler[evt].indexOf(handler)==-1)_handler[evt].push(handler)},Toggle:function(){if(_history.length>1){if(_historyPos==_history.length-1)history.back();else history.forward()}return false},Back:function(){if(_hold)return(_hold=false);if(history.length-_initialNav==_historyPos)history.back();else window.location=_location[_historyPos-1]||"#";return false},Home:function(){if(history.length-_initialNav==_historyPos)history.go(-_historyPos);else window.location="#";return(_hold=false)},Form:function(frm){var s,a,b,c,o,f;a=$(frm);b=$(_history[_historyPos]);s=(a.style.display!="block");f=_L(a)=="form"?a:_O(a,"form");o=f.onsubmit;if(!s){f.onsubmit=f.onsubmit(null,true)}else{a.style.top=parseInt($("__wa_shadow").style.top)-2+"px";f.onsubmit=function(e,b){if(b)return o;if(o)o(e);e.preventDefault();__p.Submit(this)}}
_q();_U(s);_S(a,s);_o(s?$$("legend",a)[0].innerHTML:(_historyPos?b.title:null));_dialog=(s)?a:null;if(s){c=a;a=b;b=c}
_E(a);_D(b,s);if(s)__p.Header(s);else _C(!s);return false},Submit:function(frm,submiter){var e=arguments[2];var a=submiter;var f=$(frm);if(f&&_L(f)!="form")f=_O(f,"form");if(f){var _=function(i,f){var q="";for(var n=0;n<i.length;n++)if(f?f(i[n]):1)q+="&"+i[n].name+"="+escape(i[n].value);return q}
var q=_($$("input",f),function(i){with(i)return(name&&!disabled&&(_F(type,["text","password","hidden","search"])||(_F(type,["radio","checkbox"])&&checked)))}
);q+=_($$("select",f));e=e||event;a=!a?_K(e.target):a;if(!a)_B();q+="&"+(a&&a.id?a.id:"__submit")+"=1";q=q.substr(1);_x(f.action||self.location.href,null,q);if(_dialog)__p.Form(_dialog)}return false},Postable:function(keys,values){var q="";for(var i=1;i<values.length&&i<=keys.length;i++)q+="&"+keys[i-1]+"="+escape(values[i]);return q.replace(/&=/g,"&").substr(1)},Request:function(url,prms,cb,async,loader){cb=cb==-1?_y():cb;var o=new XMLHttpRequest();var c=function(){_1(o,cb,loader)}
var m=prms?"post":"get";async=(!async?false:true);if(loader)__p.Loader(loader,true);if(_handler.error.length>0)_async[_async.length]=[o,url,prms];url=_w(url,"__async","true");url=_w(url,"__source",_history[_historyPos]);o.open(m,url,async);if(prms)o.setRequestHeader("Content-Type","application/x-www-form-urlencoded");o.onreadystatechange=(async)?c:null;o.send(prms);if(!async)c()},Loader:function(obj,show){var o=obj;var h=_I(o,"__lod");if(h==show)return h;if(show){_M(o,"__lod");_loader.push(o)}else _N(o,"__lod");_A(o);return h},Player:function(src){src=src||_K(event.target).href;if(!_b()){window.open(src)}else{var o=$("__wa_media");if(o)delete _webapp.removeChild(o);o=_H("iframe");o.id="__wa_media";o.src=src;_webapp.appendChild(o)}return false}}
function _A(o){if(_I(o,"iMore")){var a=$$("a",o)[0];if(a.title){o=a.innerHTML;a.innerHTML=a.title;a.title=o}}
}
function _B(){var i=_H("input");_group.appendChild(i);i.type="text";i.focus();_S(i,0);setTimeout(function(){delete _group.removeChild(i)},5)}
function _C(s){if(!_head)return;for(var i=1;i<_header.length;i++)_S(_header[i],s);_S(_header[BACK],s&&!_header[LEFT]&&_historyPos);_S(_header[HOME],s&&!_header[RIGHT]&&_historyPos>1)}
function _D(lay,ignore){if(!_head)return;var a=$$("a",lay);var p=RIGHT;for(var i=0;i<a.length&&p>=LEFT;i++){if(_header[p]&&!ignore){i--;p--;continue}if(_F(a[i].rel,["action","back"])){_M(a[i],p==RIGHT?"iRightButton":"iLeftButton");_S(a[i],1);_header[p--]=a[i];_head.appendChild(a[i--])}}
}
function _E(lay){if(!_head)return;for(var i=LEFT;i<=RIGHT;i++){var a=_header[i];if(a&&_F(a.rel,["action","back"])){_S(a,0);_N(a,i==RIGHT?"iRightButton":"iLeftButton");lay.insertBefore(a,lay.firstChild)}}
_header[RIGHT]=$("waRightButton");_header[LEFT]=$("waLeftButton")}
function _F(o,a){return a.indexOf(o)!=-1}
function _G(o){return o.rev=="async"||o.rev=="async:np"}
function $(i){return typeof i=="string"?document.getElementById(i):i}
function $$(t,o){return(o||document).getElementsByTagName(t)}
function _H(t){return document.createElement(t)}
function _I(o,c){return _F(c,_J(o))}
function _J(o){return o.className.split(" ")}
function _K(o){return _L(o)=="a"?o:_O(o,"a")}
function _L(o){return o.localName.toLowerCase()}
function _M(o,c){var h=_I(o,c);if(!h)o.className+=" "+c;return h}
function _N(o){var c=_J(o);var a=arguments;for(var i=1;i<a.length;i++){var p=c.indexOf(a[i]);if(p!=-1)c.splice(p,1)}
o.className=c.join(" ")}
function _O(o,t){while((o=o.parentNode)&&(o.nodeType!=1||_L(o)!=t));return o}
function _P(o,c){while((o=o.parentNode)&&(o.nodeType!=1||!_I(o,c)));return o}
function _Q(o){var o=o.childNodes;for(var i=0;i<o.length;i++)if(o[i].nodeType==3)return o[i].nodeValue.replace(/^\s+|\s+$/g,"");return null}
function _R(){_webapp=$("WebApp");_group=$("iGroup");_header[HEAD]=$("iHeader");_header[BACK]=$("waBackButton");_header[HOME]=$("waHomeButton");_header[RIGHT]=$("waRightButton");_header[LEFT]=$("waLeftButton");_header[TITLE]=$("waHeadTitle")}
function _S(o,s){if(o)o.style.display=s?"block":"none"}
function _T(o){_S(o,1);o.style.width="100%"}
function _U(s){_S($("__wa_shadow"),s)}
function _V(){if(!_lockCnt++)_S($("__wa_noclick"),1)}
function _W(){if(!--_lockCnt)_S($("__wa_noclick"),0)}
function _X(o,l){if(o){_history.splice(++_historyPos,_history.length);_history.push(o);_location.splice(_historyPos,_location.length);_location.push(l?window.location.href:null)}}
function _Y(){var s,i,c;while(s=_loader.pop())__p.Loader(s,0);s=$$("li");for(i=0;i<s.length;i++)if(_I(s[i],"__sel"))_N(s[i],"__sel")}
function _Z(s,np){var ed=s.indexOf("#_");if(ed==-1)return null;var rs="";var bs=_v(s);if(!np)for(var i=0;i<bs[1].length;i++)rs+="/"+bs[1][i].split("=").pop();return bs[2]+rs}
function _a(o,show,next){if(!next){if(!o||_fading.indexOf(o)!=-1)return;_fading.push(o)}
with(o.style){if((!show&&opacity>0)||(show&&opacity<1)){if(show)display="block";opacity=parseFloat(opacity)+(show?+0.5:-0.5);setTimeout(function(){_a(o,show,1)},0)}else{display=(opacity==0)?"none":"block";_fading.splice(_fading.indexOf(o),1)}}
}
function _b(){with(navigator.userAgent)return(indexOf("iPhone")+indexOf("iPod")>-2)}
function _c(){if(_sliding)return;var w=(window.innerWidth>=480)?480:320;if(w!=_width){_width=w;_webapp.style.minHeight=((w==320)?417:269)+"px";_webapp.className=(w==320)?"portrait":"landscape";_e("orientationchange")}}
function _d(){if(_sliding||_hold)return;var act=_u();if(act==null)act=_history[0];var pos=_history.indexOf(act);var cur=_history[_historyPos];if(act==cur)return;if(pos!=-1&&pos<_historyPos){_historyPos=pos+1;_j(cur,act,L2R)}else{_i(act)}}
function _e(evt,ctx){var e={}
e.type=evt;e.context=ctx||_r(window.location.href);e.windowWidth=_width;e.windowHeight=_webapp.offsetHeight;var k=true;for(var i=0;i<_handler[evt].length;i++)k=k&&(_handler[evt][i](e)==false?false:true);return k}
function _f(){_R();_();_4();_3();_2();_7();_8();var l=$("iLoader");if(l)_S(l,0);if(!_def)_def=_s()[0].id;_X(_def);var a=_u();if(a!=_def)_X(a,true);if(!a)a=_def;_T($(a));_D($(a));_S(_header[BACK],(!_header[LEFT]&&_historyPos));_S(_header[HOME],(!_header[RIGHT]&&_historyPos>1&&a!=_def));if(_header[BACK])_baseBack=_header[BACK].innerHTML;if(_header[TITLE]){_baseTitle=_header[TITLE].innerHTML;_header[TITLE].innerHTML=_t($(a))}
setInterval(_c,100);setInterval(_d,100);setTimeout(function(){_e("load")},100);setTimeout(_q,500)}
function _g(ul,li,h){var al=$$("li",ul);for(var i=0;i<al.length;i++){_S($(ul.id+i),(!h&&al[i]==li));_N(al[i],"__act")}
_M(li,"__act")}
function _h(e,b){if(_sliding){e.preventDefault();return}
var o=e.target;var n=_L(o);if(n=="label"){var f=$(o.getAttribute("for"));if(_I(f,"iToggle")){setTimeout(function(){_p(f.previousSibling.childNodes[1],true)},1)}return}
var li=_O(o,"li");if(li&&_I(li,"iRadio")){_M(li,"__sel");_6(li);return}
var ul=_O(o,"ul");var pr=!ul?null:ul.parentNode;var a=_K(o);if(ul&&_I(pr,"iTab")){var h=$(ul.id+"-loader");_S(h,0);if(_G(a)){_S(h,1);_x(a,function(o){_S(h,0);_g(ul,li,null);_S(_z(o)[0],1)}
)}else{h=null}
_g(ul,li,h);e.preventDefault();return}if(a&&!a.onclick&&_F(a.id,["waBackButton","waHomeButton"])){if(a.id=="waBackButton")__p.Back();else __p.Home();e.preventDefault();return}if(ul&&_I(ul,"iCheck")){var al=$$("li",ul);for(var i=0;i<al.length;i++)_N(al[i],"__act","__sel");_M(li,"__act __sel");setTimeout(function(){_N(li,"__sel")},1000);e.preventDefault();return}if(ul&&((_I(ul,"iMenu")||_I(pr,"iMenu"))||(_I(ul,"iList")||_I(pr,"iList")))){if(a&&!_I(a,"iButton")){var c=_M(li,"__sel");if(_G(a)){if(!c)_x(a);e.preventDefault()}if(a.rev=="media"){__p.Player(a.href);setTimeout(function(){_N(li,"__sel")},500);e.preventDefault()}}return}
var dv=_P(o,"iMore");if(dv){if(!__p.Loader(dv,1)&&_G(o))_x(o,_0);e.preventDefault();return}if(a&&_dialog&&!a.onclick){if(a.rel=="back")__p.Form(_dialog,a);if(a.rel=="action")__p.Submit(_dialog,a);e.preventDefault();return}if(a&&a.rev=="media"){__p.Player(a.href);e.preventDefault()}if(n=="a"&&_G(o)){_x(o);e.preventDefault()}}
function _i(to){if(_history[_historyPos]!=to)_j(_history[_historyPos],to);return false}
function _j(src,dst,dir){if(_sliding)return;_q();_V();if(dst==_history[0])_initialNav=history.length;dir=dir||R2L;src=$(src);dst=$(dst);_a(_head,0);_S($("iFooter"),0);_S(_headView,0);_sliding=true;_l(src,dst,dir)}
function _k(d){return[_r(_location[_prev]),_r(window.location.href),d]}
function _l(src,dst,dir){if(_fading.length>0){setTimeout(function(){_l(src,dst,dir)},5);return}
_prev=_historyPos;_e("beginslide",_k(dir));_E(src);_D(dst);_T(src);_T(dst);_webapp.style.width="200%";src.style.width="50%";dst.style.width="50%";var s=0;var w=src.offsetWidth;if(dir==R2L){src.parentNode.insertBefore(src,dst);_X(dst.id,true)}else{dst.parentNode.insertBefore(dst,src);while(_historyPos&&_history[--_historyPos]!=dst.id);window.scrollTo(w,1)}
setTimeout(function(){while(s<=w){s+=Math.max((w-s)/16,4);window.scrollTo((w+w*dir)/2-Math.min(s,w)*dir,1)}
var c=dst.cloneNode(true);dst.parentNode.insertBefore(c,dst);_S(src,0);setTimeout(function(){var o=c.parentNode.removeChild(c);delete o;_m(src,dst,dir)},0)},5)}
function _m(src,dst,dir){_Y();if(_header[BACK]){var txt;if(dir==R2L)txt=src.title||_baseBack;else if(_historyPos)txt=$(_history[_historyPos-1]).title||_baseBack;if(txt)_header[BACK].innerHTML=txt}
_S(_header[BACK],!_header[LEFT]&&_historyPos);_S(_header[HOME],!_header[RIGHT]&&_historyPos>1);_S(_header[LEFT],1);_S(_header[RIGHT],1);_S($("iFooter"),1);_o(_t(dst));_a(_head,1);_webapp.style.width="100%";_T(dst);_n();_e("endslide",_k(dir));_prev=-1}
function _n(){if(_fading.length>0){setTimeout(_n,5);return}
_W();_q();_sliding=false}
function _o(title){var o;if(o=_header[TITLE]){o.innerHTML=title||_t(_u())||_baseTitle;_S(o,1)}}
function _p(o,dontChange){var i=$(o.parentNode.title);var txt=i.title.split("|");if(txt.length!=2)txt=["ON","OFF"];if(!dontChange)i.click();o.nextSibling.innerHTML=txt[i.checked?0:1];if(i.checked){o.style.left="";o.style.right="-1px";o.parentNode.className="iToggleOn";o.nextSibling.style.left="0";o.nextSibling.style.right=""}else{o.style.left="-1px";o.style.right="";o.parentNode.className="iToggle";o.nextSibling.style.left="";o.nextSibling.style.right="0"}}
function _q(){while(window.pageYOffset>1)window.scrollTo(0,Math.max(window.pageYOffset-window.pageYOffset/10,1));__p.HideBar()}
function _r(loc){if(loc){var pos=loc.indexOf("#_");var vis=[];if(pos!=-1){loc=loc.substring(pos+2).split("/");vis=_s().filter(function(l){return l.id=="wa"+loc[0]}
)}if(vis.length){loc[0]=vis[0].id;return loc}}return[]}
function _s(){var lay=[];var src=_group.childNodes;for(var i=0;i<src.length;i++)if(src[i].nodeType==1&&_I(src[i],"iLayer"))lay.push(src[i]);return lay}
function _t(o){return(!_historyPos&&_baseTitle)?_baseTitle:o.title}
function _u(){return _r(window.location.href)[0]}
function _v(u){var s,q,d;s=u.replace(/&amp;/g,"&");d=s.indexOf("#");d=s.substr(d!=-1?d:s.length);s=s.substr(0,s.length-d.length);q=s.indexOf("?");q=s.substr(q!=-1?q:s.length);s=s.substr(0,s.length-q.length);q=!q?[]:q.substr(1).split("&");return[s,q,d]}
function _w(u,k,v){u=_v(u);var q=u[1].filter(function(o){return o&&o.indexOf(k+"=")!=0}
);q.push(k+"="+escape(v));return u[0]+"?"+q.join("&")+u[2]}
function _x(item,cb,q){var h,o,u;u=(typeof item=="object"?item.href:item);o=_O(item,"li");if(!cb)cb=_y(u,item.rev=="async:np");__p.Request(u,q,cb,true,o)}
function _y(i,np){return function(o){var u=i?_Z(i,np):null;var g=_z(o);if(g&&(g[1]||u))window.location=g[1]||u;return null}}
function _z(o){if(o.responseXML)with(o.responseXML.documentElement){var dst=getElementsByTagName("destination")[0];var mod=dst.getAttribute("mode");var txt=getElementsByTagName("data")[0].firstChild.nodeValue;var i=$(dst.firstChild.nodeValue);var g=dst.getAttribute("go");if(mod=="append")i.innerHTML+=txt;else i.innerHTML=txt;return[i,g?"#_"+g.substr(2):null]}
throw "Invalid asynchronous response received."}
function _0(o){_z(o)}
function _1(o,cb,lr){if(o.readyState!=4)return;var er,ld,ob;er=(o.status!=200&&o.status!=0);if(!er){try{if(cb)ld=cb(o,lr)}
catch(ex){er=ex;console.error(er)}}
ob=_async.filter(function(a){return o==a[0]}
)[0];if(lr)__p.Loader(lr,0);if(er){if(lr)_N(lr,"__sel");_e("error",ob)}if(ob)_async.splice(_async.indexOf(ob),1);delete o}
function _2(){var hd=_header[HEAD];if(hd){var dv=_H("div");dv.style.opacity=1;while(hd.hasChildNodes())dv.appendChild(hd.firstChild);hd.appendChild(dv);_head=dv}}
function _3(){var o=$$("ul");for(var i=0;i<o.length;i++){var p=o[i].parentNode;if(p&&_I(p,"iTab")){_M($$("li",o[i])[0],"__act");if(p=$(o[i].id+"0"))_S(p,1)}}
}
function _4(){var o=$$("li");for(var i=0;i<o.length;i++){if(_I(o[i],"iRadio")){var lnk=_H("a");var sel=_H("span");var cpy=o[i].childNodes;var inp=$$("input",o[i]);for(var j=0;j<inp.length;j++){with(inp[j])if(type=="radio"&&checked){sel.innerHTML=_Q(parentNode);break}}
lnk.appendChild(sel);while(o[i].hasChildNodes())lnk.appendChild(o[i].firstChild);o[i].appendChild(lnk);lnk.href="#";lnk.onclick=function(){_hold=1;return _i("waRadio")}}
}
var d=_H("div");d.className="iLayer";d.id="waRadio";_group.appendChild(d)}
function _5(a,p,u){var x=$$("input",p);var y=$$("a",u);for(var i=0;i<y.length;i++)if(y[i]==a){x[i].checked=true;$$("span",p)[0].innerHTML=_Q(x[i].parentNode);break}}
function _6(p){var o=$$("input",p);var dv=_H("div");var ul=_H("ul");ul.className="iCheck";for(var i=0;i<o.length;i++){if(o[i].type=="radio"){var li=_H("li");var a=_H("a");a.innerHTML=o[i].nextSibling.nodeValue;a.href="#";a.onclick=function(){_5(this,p,ul)}
li.appendChild(a);ul.appendChild(li);if(o[i].checked)li.className="__act"}}
dv.className="iMenu";dv.appendChild(ul);o=$("waRadio");if(o.firstChild)delete o.removeChild(o.firstChild);o.title=_Q(p.firstChild);o.appendChild(dv)}
function _7(){_9("div","__wa_noclick")}
function _8(){var o=_9("div","__wa_shadow");var h=_header[HEAD];o.style.top=(h?(h.offsetTop+h.offsetHeight):0)+"px"}
function _9(t,i){var o=_H(t);o.id=i;_webapp.appendChild(o);return o}
function _(){var o=$$("input");for(var i=0;i<o.length;i++){if(o[i].type=="checkbox"&&_I(o[i],"iToggle")){var txt=o[i].title.split("|");if(txt.length!=2)txt=["ON","OFF"];var b1=_H("b");var b2=_H("b");var i1=_H("i");b1.className="iToggle";b1.title=o[i].id;b1.innerHTML="&nbsp;";i1.innerHTML=txt[1];b1.appendChild(b2);b1.appendChild(i1);o[i].parentNode.insertBefore(b1,o[i]);b2.onclick=function(){_p(this)}
_p(b2,true)}}
}
addEventListener("load",_f,true);addEventListener("click",_h,true);return __p}
)();var WA=WebApp;