try{if(!document.getElementsByTagName("head")[0]){document.getElementsByTagName("html")[0].appendChild(document.createElement("head"))}}catch(e){}(function(){var b=Array.prototype,d={indexOf:function(f,g){g=g||0;for(var h=this.length;g<h;g++){if(this[g]===f){return g}}return -1},lastIndexOf:function(f,g){var h=this.length;g=g||h-1;if(g<0){g+=h}for(;g>=0;g--){if(this[g]==f){return g}}return -1},every:function(i,f){f=f||window;var g=0,h=this.length;for(;g<h;g++){if(!i.apply(f,[this[g],g,this])){break}}return(g==h)},filter:function(k,f){f=f||window;var j=this.length,i=0,h=new Array(j);for(var g=0;g<j;g++){if(k.apply(f,[this[g],g,this])){h[i++]=this[g]}}h.length=i;return h},forEach:function(i,f){f=f||window;for(var g=0,h=this.length;g<h;g++){i.apply(f,[this[g],g,this])}},map:function(j,f){f=f||window;var g=0,h=this.length,i=new Array(h);for(;g<h;g++){i[g]=j.apply(f,[this[g],g,this])}return i},some:function(i,f){f=f||window;var g=0,h=this.length;for(;g<h;g++){if(i.apply(f,[this[g],g,this])){break}}return(g!=h)},reduce:function(j){var f=this.length;if(typeof j!="function"){throw new TypeError()}if(f==0&&arguments.length==1){throw new TypeError()}var g=0,h;if(arguments.length>=2){h=arguments[1]}else{do{if(typeof this[g]!="undefined"){h=this[g++];break}if(++g>=f){throw new TypeError()}}while(true)}for(;g<f;g++){if(typeof this[g]!="undefined"){h=j.call(null,h,this[g],g,this)}}return h},reduceRight:function(j){var f=this.length;if(typeof j!="function"){throw new TypeError()}if(f==0&&arguments.length==1){throw new TypeError()}var g=f-1,h;if(arguments.length>=2){h=arguments[1]}else{do{if(typeof this[g]!="undefined"){h=this[g--];break}if(--g>=f){throw new TypeError()}}while(true)}for(;g>=0;g--){if(typeof this[g]!="undefined"){h=j.call(null,h,this[g],g,this)}}return h}};for(var c in d){if(!b[c]){b[c]=d[c]}}if(typeof[].unshift()=="undefined"){var a=b.unshift;b.unshift=function(){a.apply(this,arguments);return this.length}}if(!window.Node){window.Node={}}if(!Node.ELEMENT_NODE){("ELEMENT,ATTRIBUTE,TEXT,CDATA_SECTION,ENTITY_REFERENCE,ENTITY,PROCESSING_INSTRUCTION,COMMENT,DOCUMENT,DOCUMENT_TYPE,DOCUMENT_FRAGMENT,NOTATION").split(",").forEach(function(g,f){Node[g+"_NODE"]=f+1})}})();if(!this.JSON){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=new RegExp("[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]","g"),escapable=new RegExp('[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]',"g"),gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})();var y5=(function(){var l={},d=[],w={},h=/^(?:(.+?):)?(.+)$/,v={},o=[],t=document.getElementsByTagName("script"),q=/\./g,B=/[\/\\]/,k=/[:.]/g,n=/function\s+([^\(]+)\(/;function y(D){if(typeof D=="function"){D()}}function b(D){return !!l[D]}function f(D){return !l[D]}function s(F){for(var E=0,D=d.length;E<D;E++){if(F.indexOf(d[E])==0){return true}}return false}function p(D){l[D]=1;y5.fire("y5:moduleLoaded",y5,D)}function m(D){return !!w[D]}function i(D){w[D]=1;y5.fire("y5:moduleRequired",y5,D)}function a(D){delete w[D]}function z(D){var E=h.exec(D);return[E[1]||"y5",E[2]]}function j(D){var E=z(D);return E[0]+":"+E[1]}function C(D,F){var G=z(D),E=v[G[0]];if(!E){return false}return[(E.path+G[1].replace(q,"/")+"."+(F||"js")+E.query),E.charset]}function g(E){var G=0,D=E.length,F,H;for(;G<D;G++){F=E[G];if(b(F)||m(F)||s(F)){continue}H=C(F);if(H){i(F);y5.Load.script(H[0],H[1])}}}function c(){var E=0,D;for(;E<o.length;E++){D=o[E];if(D.modules.every(b)){o.splice(E,1);y(D.callback);E--}else{g(D.modules)}}}function x(G,I){var F=0,D=t.length,E,H;for(;F<D;F++){E=t[F];H=E.getAttribute("src");if(H&&H.lastIndexOf(G)>=0){return A(H,I||E.getAttribute("charset"))}}return null}function A(D,G){var F={path:D.substring(0,D.lastIndexOf("/")+1),query:"",charset:G||""},E=D.lastIndexOf("?");if(E>=0){F.query=D.substring(E,D.length)}return F}function r(D,E){v[D]=E;y5.fire("y5:namespaceAdded",y5,E);c()}function u(E){var F,D;switch(E){case"y5:Array":D=Array.prototype;E=y5.Array;break;case"y5:String":D=String.prototype;E=y5.String;break;case"y5:Date":D=Date.prototype;E=y5.Date;break;default:return}if(E){for(F in E){if(typeof E[F]=="function"&&!D[F]){D[F]=(function(G,H){return function(){var I=Array.prototype.slice.call(arguments);I.unshift(this);return H.apply(G,I)}})(E,E[F])}}}}return{version:1.5,require:function(){var G=arguments,F=[],I,H=0,E=G.length,D;for(;H<E;H++){D=G[H];if(D instanceof Array){F=F.concat(D)}else{if(typeof D=="string"){F.push(D)}else{if(typeof D=="function"){I=D}}}}F=F.map(j).filter(f);if(F.length==0){y(I)}else{o.push({modules:F,callback:I});g(F)}return this},loaded:function(D){D=j(D);a(D);p(D);c();return this},namespace:function(F,E,I){if(arguments.length==1){return v[F]}if(B.test(E)){if(E.indexOf("?")==-1&&E.lastIndexOf("/")!=E.length-1){E+="/"}r(F,A(E,I))}else{var H=null,D=0;function G(){if(D<1000){var J=x(E,I);if(J){window.clearInterval(H);r(F,J);return true}D++}else{window.clearInterval(H)}return false}if(!G()){H=window.setInterval(G,1)}}return this},module:function(H,J){H=j(H);var I=z(H),E=window,G=H.split(k),F=0,D=D=G.length;for(;F<D;F++){E=E[G[F]];if(typeof E==y5.UNDEF){E=null;break}}return{path:C(H,J)[0],name:H,namespace:I[0],object:E}},block:function(E,D){if(E.substr(-1)!==":"){E=j(E);if(!D){E+="."}}if(E&&d.indexOf(E)==-1){d.push(E);return true}return false},unblock:function(E){E=j(E);if(E){var D=d.indexOf(E);if(D==-1){D=d.indexOf(E+".")}if(D!=-1){d.splice(D,1);return true}}return false},extendGlobalObjects:function(){u("y5:Arrays");u("y5:Dates");u("y5:Strings")},extend:function(D,I,E){try{E=E||I.toString().match(n)[1]}catch(J){E="Parent"}var G,H=D.prototype,F=I.prototype,K=y5.Types;H[E]=I;for(G in F){if(K.undef(H[G])){H[G]=F[G]}else{if(K.test(H[G],K.OBJECT)&&K.test(F[G],K.OBJECT)){H[G]=this.merge(F[G],H[G])}}}return this},copy:function(E){var G=y5.Types,F,D=E;if(G.test(E,G.OBJECT)){if(G.func(E.copy)){D=E.copy()}else{D={};for(F in E){D[F]=this.copy(E[F])}}}else{if(G.date(E)){D=new Date(E)}else{if(G.array(E)){D=[].concat(E)}}}return D},merge:function(H){var E=1,D={},F=arguments.length,G=arguments[1],I=y5.Types;D=this.copy(H);if(F==2&&I.def(G)){if(I.test(G,I.OBJECT)){for(E in G){if(!D[E]){D[E]=G[E]}else{D[E]=this.merge(D[E],G[E])}}}else{D=this.copy(G)}}else{if(F>2){for(;E<F;E++){D=this.merge(D,arguments[E])}}}return D},DEBUG:false,UNDEF:"undefined"}})();(function(){var a=function(){};y5.Console={log:a,info:a,warn:a,error:a,trace:a,dir:a,dirxml:a,group:a,groupEnd:a}})();y5.Id=(function(){var a=0;return{generateUnique:function(b){return(b||"")+(new Date()).getTime()+Math.round(Math.random()*10000)},generate:function(){return"y5__id"+(++a)},get:function(b){if(b===document){return y5.Id.document}return b.uniqueID||this.set(b)},set:function(b,c){if(typeof c==y5.UNDEF){c=this.generate()}return(b.uniqueID=c)}}})();y5.Id.document=y5.Id.generateUnique("y5__");y5.dataField=y5.Id.generateUnique("_y5");y5.Browser=(function(){var d=window.navigator,c=d.userAgent.toLowerCase(),a={version:0};function f(g){var h=g.exec(c);return h?parseFloat(h[1]):0}function b(g){return c.indexOf(g)!=-1}a.os="";if(b("windows")){a.os="windows"}else{if(b("linux")){a.os="linux"}else{if(b("mac")){a.os="mac"}}}a.opera=b("opera");a.ie=!a.opera&&b("msie");a.gecko=b("gecko/");a.webkit=b("applewebkit/");a.iphone=a.webkit&&b("iphone");if(a.ie){a.version=f(/msie (\d+\.\d)/)}else{if(a.gecko){a.version=f(/rv:(\d+\.\d)/)}else{if(a.webkit){a.version=f(/applewebkit\/([\d.]+)/)}else{if(a.opera){a.version=f(/opera[\/ ](\d+\.\d)/)}}}}a.cookieEnabled=d.cookieEnabled;return a})();y5.Load=(function(){var c=document.getElementsByTagName("head")[0];function b(g,f){var h,i;for(h in f){i=f[h];if(i){g.setAttribute(h,i)}}}function d(g,f){var h=document.createElement(g);b(h,f);c.insertBefore(h,c.firstChild);return h}function a(g,h){var f=d("script",g);if(typeof h=="function"){if(y5.Browser.ie){f.onreadystatechange=function(){var i=this.readyState;if(i=="loaded"||i=="complete"){h(f)}}}else{f.onload=function(){h(f)}}}return f}return{script:function(f,i,h,g){return a({src:f,charset:i,type:"text/javascript",id:g},h)},style:function(f,g){return d("link",{href:f,rel:"stylesheet",type:"text/css",id:g})},moduleStyle:function(f,g){return this.style(y5.module(f,"css").path,g)}}})();(function(){var b=y5.UNDEF,c=/function\s*[^(]+\(\)\s*{\n?\s*\[native code\]\s*\n?}/;function a(f,d){return(f&&f.nodeType&&f.nodeType==d)||false}y5.Types={UNDEFINED:1<<0,OBJECT:1<<1,FUNCTION:1<<2,NUMBER:1<<3,STRING:1<<4,BOOLEAN:1<<5,DATE:1<<10,REGEXP:1<<11,ARRAY:1<<12,NULL:1<<13,EVENT:1<<14,NODE:1<<15,TYPES:{"undefined":1<<0,object:1<<1,"function":1<<2,number:1<<3,string:1<<4,"boolean":1<<5},type:function(f){var d=this.TYPES[typeof f];if(f===null){return this.NULL}if(d==this.OBJECT){if(f.nodeName||this.document(f)){return this.NODE}}if(d==this.OBJECT||d==this.FUNCTION){switch(f.constructor){case Array:return this.ARRAY;case RegExp:return this.REGEXP;case Date:return this.DATE}}if(this.event(f)){return this.EVENT}return d},test:function(f,d){return !!(this.type(f)&d)},def:function(d){return typeof d!=b},undef:function(d){return typeof d==b},object:function(d){return typeof d=="object"},func:function(d){return Object.prototype.toString.call(d)==="[object Function]"},nativeFunc:function(d){return this.func(d)&&c.test(d.toString())},number:function(d){return typeof d=="number"},string:function(d){return typeof d=="string"},bool:function(d){return typeof d=="boolean"},nul:function(d){return d===null},array:function(d){return Object.prototype.toString.call(d)==="[object Array]"},regexp:function(d){return d instanceof RegExp},date:function(d){return d instanceof Date},event:function(d){return d instanceof Event},element:function(d){return a(d,Node.ELEMENT_NODE)},attribute:function(d){return a(d,Node.ATTRIBUTE_NODE)},text:function(d){return a(d,Node.TEXT_NODE)},document:function(d){return a(d,Node.DOCUMENT_NODE)},comment:function(d){return a(d,Node.COMMENT_NODE)},node:function(d){return(d&&this.def(d.nodeType))}};if(y5.Browser.ie){y5.Types.event=function(d){return d&&typeof d.type!=b&&typeof(d.stopPropagation||d.cancelBubble)!=b}}})();(function(){var a=y5.Browser,q=y5.Types,t=function(){},s="DOMAttrModified",f="propertychange",h="DOMMouseScroll",r="mousewheel",c={},p=y5.dataField,o="events";if(document.createElement("a").onpropertychange===null){c[s]=f;c.focus="focusin";c.blur="focusout"}else{c[f]=s}if(a.ie||a.opera||a.webkit){c[h]=r}else{c[r]=h}function l(u){return c[u]||u}var g=(function(){var y,w={L:[0,65535],M:[1],R:[2]};if(a.ie){function C(){this.returnValue=false}function v(){this.cancelBubble=true}y=function(F){F.timeStamp=new Date().getTime();F.charCode=F.type=="keypress"?F.keyCode:0;F.isChar=F.charCode>0;F.target=F.srcElement;F.metaKey=F.altKey;F.attrName=F.propertyName=="className"?"class":F.propertyName;F.preventDefault=C;F.stopPropagation=v;var E=document.documentElement,D=document.body;F.pageX=F.clientX+(E.scrollLeft||D.scrollLeft);F.pageY=F.clientY+(E.scrollTop||D.scrollTop);switch(F.type){case"mouseout":F.relatedTarget=F.toElement;break;case"mouseover":F.relatedTarget=F.fromElement;break}F.scrollDetail=0;if(F.wheelDelta){F.scrollDetail=-F.wheelDelta/40}};w={L:[1],M:[4],R:[2]}}else{if(a.webkit){w={L:[0,65535,1],M:[2],R:[3]};y=function(D){if(!q.func(D.preventDefault)){D.preventDefault=t}if(!q.func(D.stopPropagation)){D.stopPropagation=t}if(D.target&&(D.target.nodeType==3||D.target.nodeType==4)){D.target=D.target.parentNode}if(D.wheelDelta){D.scrollDetail=-D.wheelDelta/400}}}else{if(a.opera){y=function(D){D.scrollDetail=0;if(D.wheelDelta){D.scrollDetail=D.wheelDelta/40}if(a.version>=9.2){D.scrollDetail*=-1}}}else{y=function(D){try{D.scrollDetail=D.detail}catch(D){}}}}}function x(E){if(!E){return{}}var D;try{D=E.button}catch(E){}if(q.def(D)){E.buttonL=w.L.indexOf(D)!=-1;E.buttonM=w.M.indexOf(D)!=-1;E.buttonR=w.R.indexOf(D)!=-1}else{E.buttonL=E.buttonM=E.buttonR=false}y(E);return E}function z(I){I=x(I);var G=this[p][o][I.type],J=y5.copy(G),F=0,E=J.length,H,D;for(;F<E;F++){H=J[F];H.listener.call(H.context||this,I,this);if(H.runOnce){D=G.indexOf(H);if(D!=-1){G.splice(D,1)}}}}function u(D,E){if(D===E){return false}while(E&&E!==D){E=E.parentNode}return E===D}function B(D){return function(H,E){var F=false,G=H.relatedTarget;try{if(G.tagName.toLowerCase().indexOf("xul:")==0){F=true}}catch(H){F=true}if(F){G=H.target;while(G=G.parentNode){if(G.offsetTop||G.offsetHeight!=G.scrollHeight){break}}}if(E===G||u(E,G)){return}D.call(this,H,E)}}var A;if(document.attachEvent){A=function(D,E){var F=(function(G){return function(){z.apply(G,arguments)}})(D);D.attachEvent("on"+E,F)}}else{A=function(E,F,D){E.addEventListener(F,z,D)}}return function(H,I,G,J,F,E){G=G||document;H=l(H);J=q.def(J)?J:true;this.enabled=false;if(H=="mouseenter"&&!a.ie){I=B(I);H="mouseover"}else{if(H=="mouseleave"&&!a.ie){I=B(I);H="mouseout"}}var D=false;if(H=="focus"||H=="blur"){D=true}this.callback={runOnce:!!E,context:F,listener:I};if(!G[p]){G[p]={}}if(!G[p][o]){G[p][o]={}}if(!G[p][o][H]){G[p][o][H]=[];A(G,H,D)}this.listeners=G[p][o][H];if(J){this.enable()}}})();g.prototype={enable:function(){if(!this.enabled){this.listeners.push(this.callback);this.enabled=true}},disable:function(){if(this.enabled){var u=this.listeners.indexOf(this.callback);if(u!=-1){this.listeners.splice(u,1)}this.enabled=false}}};var n=(function(){var x;if(document.createEvent){var w={Mouse:/^mouse|click/,Key:/^key/,Mutation:/^DOM/,HTML:/./},v=[0,1,2];if(a.webkit){v=[0,2,3]}if(a.webkit||a.opera){delete w.Key}function u(z){for(var y in w){if(w[y].test(z)){return y}}return"HTML"}x=function(z,A,C){var y=u(A),B=document.createEvent(y+"Events");switch(y){case"Mouse":B.initMouseEvent(A,true,true,document.defaultView,C.detail||0,C.screenX||0,C.screenY||0,C.clientX||0,C.clientY||0,!!C.ctrlKey,!!C.altKey,!!C.shiftKey,!!C.metaKey,v[C.button||0],null);break;case"Key":B.initKeyEvent(A,true,true,document.defaultView,!!C.ctrlKey,!!C.altKey,!!C.shiftKey,!!C.metaKey,C.keyCode||0,C.charCode||0);break;default:B.initEvent(A,true,true);break}return z.dispatchEvent(B)}}else{if(document.createEventObject){v=[1,4,2];x=function(z,A,E){var B=document.createEventObject(),y,C;for(y in E){try{switch(y){case"button":C=v[E.button||0];break;default:C=E[y];break}B[y]=C}catch(D){}}return z.fireEvent("on"+A,B)}}else{x=function(y,z,B){try{return y[z](B)}catch(A){y5.Console.warn("Browser is too old",["Event"]);return false}}}}return function(z,y,A){z=l(z);y=y||document;A=A[0]||{};x(y,z,A)}})();var i=(function(){var v={},w={};function u(y,z){var x=true;x&=y.listener.apply(y.context,z);y5.Console.log("Run custom event listener: ",y,["Event"]);return x}return{dispatch:function(F,B,A,z){var G=true,x=this.generateId(F,B),D=w[x];if(D){D=y5.copy(D);var C=0,y=D.length,E;for(;C<y;C++){E=D[C];if(!E.enabled){continue}G&=u(E,A);if(E.runOnce){E.disable()}}}if(z){if(!v[x]){v[x]=[]}v[x].push(A)}return G},add:function(z){var B=z.id;if(!w[B]){w[B]=[]}w[B].push(z);var y=v[B];if(y){for(var A=0,x=y.length;A<x;A++){u(z,y[A])}}},remove:function(x){var z=w[x.id],y=z?z.indexOf(x):-1;if(y!=-1){z.splice(y,1)}},generateId:function(y,x){var z=x;if(!x||typeof x=="object"){z=y5.Id.get(x||y5)}return y+"_"+z}}})();var b=function(x,y,w,z,v,u){this.type=x;this.id=i.generateId(x,w);this.enabled=false;this.listener=y;this.context=v||w;this.runOnce=!!u;z=q.def(z)?z:true;if(z){this.enable()}};b.prototype={enable:function(){if(!this.enabled){i.add(this);this.enabled=true;y5.Console.log("Custom event observer added: ",this,["Event"])}},disable:function(){if(this.enabled){i.remove(this);this.enabled=false;y5.Console.log("Custom event observer removed: ",this,["Event"])}}};function m(w,v,y,x){y5.Console.group("Custom event dispatch: ",[w,v,y],["Event"]);var u=i.dispatch(w,v,y,x);y5.Console.groupEnd("Custom event dispatch: ",["Event"]);return u}function d(x,y,w,A,v,u){var z=j(x,w)?b:g;return new z(x,y,w,A,v,u)}function k(u){return Array.prototype.slice.call(u,2)}function j(v,u){return v.indexOf(":")!=-1||!(u==window||q.node(u))}y5.on=function(z,B,y,x,u){if(q.undef(y)){return null}u=u||{};switch(q.type(z)){case q.ARRAY:var A=z.length,w=new Array(A),v=0;for(;v<A;v++){w[v]=d(z[v],B,y,u.add,x,u.runOnce)}return w;case q.STRING:return d(z,B,y,u.add,x,u.runOnce)}return null};y5.fire=function(v,u){var w=j(v,u)?m:n;return w(v,u,k(arguments),false)};y5.flag=function(v,u){m(v,u,k(arguments),true)};(function(){var v=false,y=document,u=window;function x(){if(v){return}v=true;arguments.callee=function(){};y5.flag("dom:loaded",y5)}if(y.addEventListener){y.addEventListener("DOMContentLoaded",function(){y.removeEventListener("DOMContentLoaded",arguments.callee,false);x()},false)}else{if(y.attachEvent){y.onreadystatechange=function(){if(y.readyState=="complete"){y.detachEvent("onreadystatechange",arguments.callee);x()}};if(y.documentElement.doScroll&&u==u.top){(function(){try{y.documentElement.doScroll("left")}catch(w){setTimeout(arguments.callee,0);return}x()})()}}}y5.on("load",x,u,null,{runOnce:true})})();if(window.CollectGarbage){window.attachEvent("onunload",function(){window.CollectGarbage()})}})();y5.namespace("y5","y5.js","utf-8");y5.loaded("Id");y5.loaded("Browser");y5.loaded("Load");y5.loaded("Types");y5.loaded("Events");if(/y5debug/.test(window.location.search+document.cookie)){y5.require("Debug")}y5.namespace("y5","//img.yandex.net/y5/1.5-os","utf-8");y5.Vars={days:{Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},dayNames:["\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430","\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435"],dayShortNames:["\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431","\u0412\u0441"],monthNames:["\u042f\u043d\u0432\u0430\u0440\u044c","\u0424\u0435\u0432\u0440\u0430\u043b\u044c","\u041c\u0430\u0440\u0442","\u0410\u043f\u0440\u0435\u043b\u044c","\u041c\u0430\u0439","\u0418\u044e\u043d\u044c","\u0418\u044e\u043b\u044c","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c","\u041e\u043a\u0442\u044f\u0431\u0440\u044c","\u041d\u043e\u044f\u0431\u0440\u044c","\u0414\u0435\u043a\u0430\u0431\u0440\u044c"],monthNamesPartitive:["\u044f\u043d\u0432\u0430\u0440\u044f","\u0444\u0435\u0432\u0440\u0430\u043b\u044f","\u043c\u0430\u0440\u0442\u0430","\u0430\u043f\u0440\u0435\u043b\u044f","\u043c\u0430\u044f","\u0438\u044e\u043d\u044f","\u0438\u044e\u043b\u044f","\u0430\u0432\u0433\u0443\u0441\u0442\u0430","\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f","\u043e\u043a\u0442\u044f\u0431\u0440\u044f","\u043d\u043e\u044f\u0431\u0440\u044f","\u0434\u0435\u043a\u0430\u0431\u0440\u044f"]};y5.Vars.monthShortNames=y5.Vars.monthNames.map(function(a){return a.substr(0,3)});y5.loaded("Vars");y5.Cache=function(){this.data={}};y5.Cache.prototype={get:function(a){return this.data[a]},set:function(a,b){return this.data[a]=b},test:function(a){return typeof this.data[a]!=y5.UNDEF},remove:function(a){var b=this.data[a];delete this.data[a];return b}};y5.loaded("Cache");y5.require("Vars",function(){var u="",g=" ",n=/(^[\s\xA0]+|[\s\xA0]+$)/g,a=/^[\s\xA0]*$/,b=/[\s\xA0]{2,}/g,p=/([\|\!\[\]\^\$\(\)\{\}\+\=\?\.\*\\])/g,o=/(<([^>]+)>)/ig,t=/\r\n|\r|\n/g,q=/[&<>\"\']/g,c=function(v){return"&#"+v.charCodeAt(0)+";"},s=/(&(lt|gt|quot|apos|amp|#\d+);|.)/gi,k={lt:"<",gt:">",quot:'"',apos:"'",amp:"&"},l=function(v,x,w){return k[w]||(w?String.fromCharCode(w.substring(1)):x)},r=/[A-Z]+[a-z]+/g,m=function(v){return"-"+v.toLowerCase()},j=function(w,v){if(v!=0){return y5.String.capitalize(w)}return w},i=/((\d+):(\d+):?(\d+)?)?\s?((\d+)[-.\/,](\d+)[-.,\/,](\d+))\s?((\d+):(\d+):?(\d+)?)?/;function f(v,w){if(w<1){return u}return(new Array(w+1)).join(v)}function d(z,x){x=x.toString();var w=/^%(0?)(\d+)d$/.exec(z);if(w){var v=w[1]||g,y=parseInt(w[2],10)-x.length;return f(v,y)+x}return x}function h(w){w=w.toLowerCase();var y=["monthNamesPartitive","monthShortNames","monthNames"],x,z=-1,v;for(x=0;x<3;x++){for(v=0;v<12;v++){if(w==y5.Vars[y[x]][v].toLowerCase()){z=v;break}}if(z!=-1){break}}return z}y5.String={isVoid:function(v){return(!v||a.test(v))},contains:function(v,x,w){if(w){v=v.toUpperCase();x=x.toUpperCase()}return v.indexOf(x)!==-1},startsWith:function(v,x,w){if(w){v=v.toUpperCase();x=x.toUpperCase()}return v.indexOf(x)===0},endsWith:function(v,x,w){if(w){v=v.toUpperCase();x=x.toUpperCase()}return v.lastIndexOf(x)+x.length===v.length},compare:function(x,w,v){if(v){x=x.toLowerCase();w=w.toLowerCase()}if(x==w){return 0}else{if(x<w){return -1}else{return 1}}},trim:function(v){return v.replace(n,u)},normalize:function(v){return this.trim(v.replace(b,g))},escapeRegexp:function(v){return v.replace(p,"\\$1")},escapeHTML:function(v){return v.replace(q,c)},unescapeHTML:function(v){return v.replace(s,l)},stripTags:function(v){return v.replace(o,u)},IoToIe:function(v){return v.replace(/[\u0451\u0401]/g,"\u0435")},capitalize:function(v){return v.charAt(0).toUpperCase()+v.substr(1).toLowerCase()},camelize:function(v){return v.split("-").map(j).join(u)},dasherize:function(v){return v.replace(r,m)},nl2br:function(v,w){return v.replace(t,w?"<br />":"<br>")},printf:function(y,C){var w=C;var x=arguments,B=x.length;if(B>2){w=[];for(var A=1;A<B;A++){w.push(x[A])}}else{if(typeof C!="object"){w=[C]}}var v=0;function z(D){var E=w[v];v++;return d(D,typeof E!=y5.UNDEF?E:u)}return y.replace(/%(s|\d*d)/g,z).replace(/%%/g,"%")},toDate:function(B){if(!B){return undefined}var v,D=0,w=0,C=0,A=0,x=0,E=0,z=B.match(i);if(z&&z[5]){if(z[6].length==4){D=parseInt(z[6],10);if(1<=z[7]&&z[7]<=12){w=parseInt(z[7],10);C=parseInt(z[8],10)}else{w=parseInt(z[8],10);C=parseInt(z[7],10)}}else{if(z[8].length==4){D=parseInt(z[8],10);if(1<=z[7]&&z[7]<=12){w=parseInt(z[7],10);C=parseInt(z[6],10)}else{w=parseInt(z[6],10);C=parseInt(z[7],10)}}else{if(1<=z[6]&&z[6]<=31){C=parseInt(z[6],10);w=parseInt(z[7],10);D=parseInt(z[8],10)}else{C=parseInt(z[8],10);w=parseInt(z[7],10);D=parseInt(z[6],10)}D=D<70?2000+D:1900+D}}if(z[1]){A=parseInt(z[2],10);x=parseInt(z[3],10);E=parseInt(z[4],10)}else{if(z[9]){A=parseInt(z[10],10);x=parseInt(z[11],10);E=parseInt(z[12],10)}}E=isNaN(E)?0:E;v=new Date(D,w-1,C,A,x,E)}else{if((z=B.match(/(\d+)\s+(.*)\s+(\d+)/))){C=parseInt(z[1],10);D=parseInt(z[3],10);w=h(z[2]);if(!isNaN(C)&&!isNaN(D)&&w!=-1){v=new Date();v.setDate(C);v.setMonth(w);v.setYear(D)}}else{if((z=B.match(/(\d+)\s+(.*)/))){C=parseInt(z[1],10);w=h(z[2]);if(!isNaN(C)&&w!=-1){v=new Date();v.setDate(C);v.setMonth(w)}}}}return v}};y5.loaded("String")});y5.require(["String","Vars"],function(){var b=/\%e[^\%]*\%B/,a={};["Y","y","m","n","B","b","d","e","H","M","S"].forEach(function(c){a[c]=new RegExp("%"+c,"g")});y5.Date={format:function(f,k){var j=(b.test(k)?y5.Vars.monthNamesPartitive:y5.Vars.monthNames),c=[[a.Y,"%04d",f.getFullYear()],[a.y,"%02d",f.getFullYear()%100],[a.m,"%02d",f.getMonth()+1],[a.n,"%d",f.getMonth()+1],[a.d,"%02d",f.getDate()],[a.e,"%d",f.getDate()],[a.H,"%02d",f.getHours()],[a.M,"%02d",f.getMinutes()],[a.S,"%02d",f.getSeconds()],[a.B,"%s",j[f.getMonth()]],[a.b,"%s",y5.Vars.monthShortNames[f.getMonth()]]],g,d=c.length,h;for(g=0;g<d;g++){h=c[g];k=k.replace(h[0],y5.String.printf(h[1],[h[2]]))}c=null;return k},shift:function(f,c,g){f=y5.copy(f);c=c+(g||0)*12;var h=f.getMonth()+c,d=h>0?h%12:(h+(12*Math.ceil(Math.abs(h/12))))%12;f.setMonth(h);if(d!=f.getMonth()){f.setDate(0)}return f},getDays:function(d,c){if(y5.Types.date(d)){c=d.getFullYear();d=d.getMonth()}var f=[31,(((c%4==0&&c%100!=0)||c%400==0)?29:28),31,30,31,30,31,31,30,31,30,31];return f[d]}};y5.loaded("Date")});y5.require(["Cache","String"],function(){var f=new y5.Cache(),b=y5.String,d=y5.Types,c=function(g){if(typeof g=="string"){return g.split(" ")}if(typeof g.source!=y5.UNDEF){return[g]}return g},a=function(i){var h="",g="",j="";if(d.regexp(i)){j=i.source;h=i.toString();g+=i.ignoreCase?"i":""}else{j=h=b.escapeRegexp(i.toString())}if(!f.test(h)){return f.set(h,new RegExp("(^|\\s+)"+j+"(\\s+|$)",g))}return f.get(h)};y5.Classes={test:function(g,h){if(d.node(g)&&(d.string(h)||d.regexp(h))){if(h=="*"){return true}return a(h).test(g.className)}return false},add:function(g,h){var i=[];if(d.node(g)&&(d.string(h)||d.array(h))){i=c(h).filter(function(j){return !this.test(g,j)},this);if(i.length){g.className+=" "+i.join(" ")}}return i},remove:function(h,i){var j=[];if(d.node(h)&&(d.string(i)||d.array(i)||d.regexp(i))){var g=h.className;c(i).forEach(function(l){var k=a(l);while(k.test(g)){j.push(l);g=g.replace(k," ")}});h.className=b.normalize(g)}return j},replace:function(h,i,g){if(this.test(h,i)){h.className=b.normalize(h.className.replace(a(i,true),"$1"+g+"$2"));return true}return false},assign:function(h,g,i){if(i){return this.add(h,g)}else{return this.remove(h,g)}},toggle:function(h,g){var i=!this.test(h,g);this.assign(h,g,i);return i},swap:function(g,i,h){if(this.test(g,i)){this.replace(g,i,h);return h}else{if(this.test(g,h)){this.replace(g,h,i)}else{this.add(g,i)}}return i}};y5.loaded("Classes")});y5.require("String",function(){var i=y5.String,q=y5.Types,b=y5.Browser,p=/\s*;\s*/g,n=/\s*:\s*/,o=/[<>\s]/,d=/^\s*<(tbody|thead|tfoot)/i,m=/^\s*<tr/i,a=/^\s*<(td|th)/i,u=/\d+px/,s=/z-?index|font-?weight|opacity|zoom|line-?height/i,w,f,k="innerHTML";(function(){var x=document.createElement("i");x.innerHTML="<b>a</b>a";if(x.textContent=="aa"){k="textContent"}else{if(x.innerText=="aa"){k="innerText"}}})();function v(x,z,y){x.style[i.camelize(z)]=y}function r(x,y){return h(x).getPropertyValue(i.dasherize(y))}function h(x){return document.defaultView.getComputedStyle(x,null)}if(q.undef(document.defaultView)){h=function(x){return x.currentStyle||x.runtimeStyle};r=function(y,C){var x=i.camelize(C),z;switch(x){case"opacity":z=100;try{z=y.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(A){try{z=y.filters("alpha").opacity}catch(A){}}return(z/100).toString();case"float":x="styleFloat";break;case"width":case"height":case"top":case"right":case"bottom":case"left":var B=false;if(!y.style[x]){y.style[x]=h(y)[x];B=true}z=y.style["pixel"+i.capitalize(x)];if(B){y.style[x]=null}return z}try{while(y&&(z=h(y)[x])&&z=="inherit"){y=y.parentNode}}catch(A){z=""}z=q.def(z)?z:"";return z};function t(x){return x.replace(/alpha\s*\([^\)]*\)/ig,"")}var c=v;v=function(x,B,A){switch(B){case"opacity":var z=r(x,"filter");var y=x.style;if(A==1){z=t(z);if(z){y.filter=z}else{y.removeAttribute("filter")}return x}else{if(A<0.00001){A=0}}if(!y.zoom){y.zoom=1}y.filter=t(z)+"alpha(opacity="+(A*100)+")";break;default:c(x,B,A)}}}function j(z){var A={left:0,top:0},x=document.body,y=document.documentElement;while((z=z.parentNode)&&(z!=x)&&(z!=y)){if(q.def(z.scrollLeft)&&z.tagName.toUpperCase()!="TR"){A.left+=z.scrollLeft;A.top+=z.scrollTop}}return A}if(document.documentElement&&document.documentElement.getBoundingClientRect){f=function(A,x){var B,z=(x!==document?x.getBoundingClientRect():{left:document.body.clientLeft+document.documentElement.clientLeft-Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),top:document.body.clientTop+document.documentElement.clientTop-Math.max(document.documentElement.scrollTop,document.body.scrollTop)});if(w.css(A,"display")=="inline"){var y=A.getClientRects();B={left:y[0].left,top:y[0].top}}else{B=A.getBoundingClientRect()}return{left:Math.round(B.left-z.left),top:Math.round(B.top-z.top)}}}else{if(document.getBoxObjectFor){f=function(A,x){var D=document,z={x:0,y:0},y={left:0,top:0},C=D.getBoxObjectFor(A),B=j(A);x=q.node(x)?x:D;if(x!==D){z=D.getBoxObjectFor(x);y=j(x)}return{left:C.x-B.left-z.x-y.left,top:C.y-B.top-z.y-y.top}}}else{f=function(F,G){G=q.node(G)?G:document;var A=0,y=0,H=j(F),B={left:0,top:0},D={left:0,top:0},E,z,C,x;if(b.opera&&r(F,"display")=="inline"){A=parseInt(r(F,"margin-left"),10);x=document.createElement("span");F.parentNode.insertBefore(x,F);F=x}while(F!==null&&F!==G){A+=F.offsetLeft||0;y+=F.offsetTop||0;if(!(b.opera&&b.version>8.6)){E=r(F,"position");z=E=="static";C=E=="relative";if(z||(!b.opera&&C)){A+=parseInt(r(F,"border-left-width"),10);y+=parseInt(r(F,"border-top-width"),10)}}F=F.offsetParent}if(q.element(x)){x.parentNode.removeChild(x)}if(G!==document&&F!==G){B=f(G);D=j(G)}return{left:A-H.left-B.left-D.left,top:y-H.top-B.top-D.top}}}}function l(A,y){y=y.split(".");var B=A[y5.dataField],z=0,x=y.length;for(;z<x;z++){try{B=B[y[z]]}catch(C){return undefined}}return B}function g(A,y,D){y=y.split(".");var B=A[y5.dataField]||(A[y5.dataField]={}),C=B,z=0,x=y.length;for(;z<x;z++){B=C;C=B[y[z]]||(B[y[z]]={})}B[y[z-1]]=D}y5.Element=w={create:function(z,x,B){var y;if(!o.test(z)){if(i.compare(z,"style",true)==0){y=document.createElement("div");y.innerHTML="<p>x</p><style>"+(B||x.innerHTML||"")+"</style>";y=y.childNodes[1];B=undefined;delete x.innerHTML}else{try{if(b.ie&&x&&x.name){y=document.createElement("<"+z+' name="'+x.name+'"/>');delete x.name}else{y=document.createElement(z)}}catch(A){}}}if(!y){y=document.createElement("div");if(d.test(z)){y.innerHTML="<table>"+z+"</table>";y=y.firstChild.firstChild}else{if(m.test(z)){y.innerHTML="<table><tbody>"+z+"</tbody></table>";y=y.firstChild.firstChild.firstChild}else{if(a.test(z)){y.innerHTML="<table><tbody><tr>"+z+"</tr></tbody></table>";y=y.firstChild.firstChild.firstChild.firstChild}else{if(i.startsWith(z,"<style",true)){y.innerHTML="<p>x</p>"+z;y=y.childNodes[1]}else{y.innerHTML=z;y=y.firstChild}}}}}if(q.object(x)){this.attributes(y,x)}if(q.def(B)){this.html(y,B)}return y},attributes:function(B,D,E){if(q.element(B)&&(q.object(D)||q.string(D))){var A=D;if(q.string(D)){if(q.undef(E)){switch(D){case"style":case"cssText":return B.style.cssText;break;case"class":case"className":return B.className;break;case"value":case"innerHTML":return B[D];break;default:return B.getAttribute(D)}}A={};A[D]=E}var y,F,C,x,z;for(y in A){E=A[y];switch(y){case"style":case"cssText":if(B.style.cssText&&!(E.indexOf("opacity")!=-1&&b.ie)){B.style.cssText=E}else{F=E.split(p);C=F.length;for(z=0;z<C;z++){x=F[z].split(n);v(B,x[0],x[1])}}break;case"class":case"className":B.className=E;break;case"innerHTML":case"value":B[y]=E;break;default:B.setAttribute(y,E)}}return B}},html:function(y,x){if(q.element(y)){if(q.def(x)){y.innerHTML=x.toString();return y}return y.innerHTML}},text:function(x,y){if(q.node(x)){if(y){x.innerHTML=i.escapeHTML(y.toString());return x}return x.nodeType==1?x[k]:x.nodeValue}},css:function(x,A,z){if(q.element(x)&&(q.object(A)||q.string(A))){var y=A,B;if(q.string(A)){if(q.undef(z)){z=r(x,A);if(A=="opacity"){return parseFloat(z,10)}return u.test(z)?parseInt(z,10):z}else{y={};y[A]=z}}for(B in y){z=y[B];v(x,B,q.number(z)&&!s.test(B)?z+"px":z)}return x}},offset:function(y,x){if(x&&!q.node(x)&&q.object(x)){return this.css(y,x)}if(!q.node(y)||y===document){return{left:0,top:0}}return f(y,q.element(x)?x:document)},size:function(z,y){if(q.element(z)){if(q.object(y)){return this.css(z,y)}var E=this.css(z,"display");if(E!="none"&&E!=null){return{width:z.offsetWidth,height:z.offsetHeight}}var B=z.style,D=B.visibility,A=B.position,x=B.display,C;B.visibility="hidden";B.position="absolute";B.display="block";C={width:z.offsetWidth,height:z.offsetHeight};B.display=x;B.position=A;B.visibility=D;return C}},scroll:function(y,x){if(q.node(y)){if(x){if(x.top){y.scrollTop=x.top}if(x.left){y.scrollLeft=x.left}return y}if(y==document||y==window||y==document.documentElement||y==document.body){return{left:document.body.scrollLeft||document.documentElement.scrollLeft,top:document.body.scrollTop||document.documentElement.scrollTop}}else{return{left:y.scrollLeft,top:y.scrollTop}}}},data:function(y,x,B){if(q.node(y)){var A=x,C;if(q.string(x)){if(q.undef(B)){return l(y,x)}else{A={};A[x]=B}}var z;if(!y[y5.dataField]){z=y[y5.dataField]={}}else{z=y[y5.dataField]}for(C in A){g(y,C,A[C])}return y}}};y5.loaded("Element")});y5.require(["Classes","Element"],function(){var a="*",o=y5.Classes,l=y5.Element.create,d=y5.Types;function k(p,i,r,q,s){if(d.node(p)){p=s?p:p[q];while(p){if(b(p,i,r)){return p}p=p[q]}}}function m(u,t){if(!u||!u.tagName){return false}if((t||a)==a){return true}var q=u.tagName.toLowerCase();if(typeof t=="string"){return q==t.toLowerCase()}var r,s=0,p=t.length;for(;s<p;s++){r=t[s];if(r==a||q==r.toLowerCase()){return true}}return false}function b(p,i,q){return m(p,i)&&o.test(p,q||a)}y5.Dom={parent:function(p,i,q){return k(p,i,q,"parentNode",true)},previous:function(p,i,q){return k(p,i,q,"previousSibling")},next:function(p,i,q){return k(p,i,q,"nextSibling")},children:function(q,p,r){var i=[];if(d.node(q)){var s=q.firstChild;do{if(b(s,p,r)){i.push(s)}}while(s&&(s=s.nextSibling))}return i},isChild:function(p,i){if(d.node(p)&&d.node(i)){if(i===document){return true}while(p=p.parentNode){if(p===i){return true}}}return false},appendChild:function(p,i){if(d.string(p)){p=l(p)}if(d.node(p)){i=(i&&i.appendChild)?i:document.body;return i.appendChild(p)}},removeChild:function(i){if(d.node(i)&&i.parentNode){return i.parentNode.removeChild(i)}},replaceChild:function(p,i){if(d.string(p)){p=l(p)}if(d.node(i)&&d.node(p)){return i.parentNode.replaceChild(p,i)}},clearNode:function(i){if(!d.element(i)){return}var p;while((p=i.firstChild)){i.removeChild(p)}},insertBefore:function(p,i){if(d.string(p)){p=l(p)}if(d.node(p)&&d.node(i)){return i.parentNode.insertBefore(p,i)}},insertAfter:function(q,p){if(d.string(q)){q=l(q)}if(d.node(q)&&d.node(p)){var i=p.nextSibling;if(i){return this.insertBefore(q,i)}return p.parentNode.appendChild(q)}},viewport:function(){var i=document.body;return{width:i.clientWidth,height:i.clientHeight}}};var g=y5.Dom;if(d.nativeFunc(document.evaluate)){function h(r){switch(d.type(r)){case d.STRING:return r.toLowerCase();case d.ARRAY:var q=0,s=r.length,t=[],p;if(s==1){return r[0].toLowerCase()}for(;q<s;q++){p=r[q];if(p!=a){t.push("name()='"+p.toLowerCase()+"'");t.push("name()='"+p.toUpperCase()+"'")}else{return a}}return a+"["+t.join(" or ")+"]"}return a}function n(v,s,r){if(!d.node(r)){return[]}var u=document.evaluate(v,r||document,null,s,null);if(s===9){return u.singleNodeValue}var t=u.snapshotLength,p=new Array(t),q=0;for(;q<t;q++){p[q]=u.snapshotItem(q)}return p}function j(t,v,s,u){var w=v+h(s);if(d.regexp(u)){var p=n(w,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,t),r,q=0;while(r=p[q++]){if(o.test(r,u)){break}}return r}else{if(d.string(u)&&u!=a){w+="[contains(concat(' ',@class,' '),' "+u+" ')]"}w+="[1]";return n(w,XPathResult.FIRST_ORDERED_NODE_TYPE,t)}}var c={parent:"ancestor-or-self",next:"following-sibling",previous:"preceding-sibling"},f;for(f in c){g[f]=(function(i){return function(q,p,r){return j(q,i+"::",p,r)}})(c[f])}}if(window.innerHeight){g.viewport=function(){return{width:window.innerWidth,height:window.innerHeight}}}else{if(document.documentElement&&document.documentElement.clientHeight){g.viewport=function(){var i=document.documentElement;return{width:i.clientWidth,height:i.clientHeight}}}}y5.$=function(i){return document.getElementById(i)};y5.loaded("Dom")});y5.require("Dom",function(){
/*
 * Sizzle CSS Selector Engine - v1.0
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,i=0,d=Object.prototype.toString,n=false;var b=function(E,u,B,w){B=B||[];var r=u=u||document;if(u.nodeType!==1&&u.nodeType!==9){return[]}if(!E||typeof E!=="string"){return B}var C=[],D,z,H,G,A,t,s=true,x=o(u);p.lastIndex=0;while((D=p.exec(E))!==null){C.push(D[1]);if(D[2]){t=RegExp.rightContext;break}}if(C.length>1&&j.exec(E)){if(C.length===2&&f.relative[C[0]]){z=g(C[0]+C[1],u)}else{z=f.relative[C[0]]?[u]:b(C.shift(),u);while(C.length){E=C.shift();if(f.relative[E]){E+=C.shift()}z=g(E,z)}}}else{if(!w&&C.length>1&&u.nodeType===9&&!x&&f.match.ID.test(C[0])&&!f.match.ID.test(C[C.length-1])){var I=b.find(C.shift(),u,x);u=I.expr?b.filter(I.expr,I.set)[0]:I.set[0]}if(u){var I=w?{expr:C.pop(),set:a(w)}:b.find(C.pop(),C.length===1&&(C[0]==="~"||C[0]==="+")&&u.parentNode?u.parentNode:u,x);z=I.expr?b.filter(I.expr,I.set):I.set;if(C.length>0){H=a(z)}else{s=false}while(C.length){var v=C.pop(),y=v;if(!f.relative[v]){v=""}else{y=C.pop()}if(y==null){y=u}f.relative[v](H,y,x)}}else{H=C=[]}}if(!H){H=z}if(!H){throw"Syntax error, unrecognized expression: "+(v||E)}if(d.call(H)==="[object Array]"){if(!s){B.push.apply(B,H)}else{if(u&&u.nodeType===1){for(var F=0;H[F]!=null;F++){if(H[F]&&(H[F]===true||H[F].nodeType===1&&h(u,H[F]))){B.push(z[F])}}}else{for(var F=0;H[F]!=null;F++){if(H[F]&&H[F].nodeType===1){B.push(z[F])}}}}}else{a(H,B)}if(t){b(t,r,B,w);b.uniqueSort(B)}return B};b.uniqueSort=function(s){if(c){n=false;s.sort(c);if(n){for(var r=1;r<s.length;r++){if(s[r]===s[r-1]){s.splice(r--,1)}}}}};b.matches=function(r,s){return b(r,null,null,s)};b.find=function(y,r,z){var x,v;if(!y){return[]}for(var u=0,t=f.order.length;u<t;u++){var w=f.order[u],v;if((v=f.match[w].exec(y))){var s=RegExp.leftContext;if(s.substr(s.length-1)!=="\\"){v[1]=(v[1]||"").replace(/\\/g,"");x=f.find[w](v,r,z);if(x!=null){y=y.replace(f.match[w],"");break}}}}if(!x){x=r.getElementsByTagName("*")}return{set:x,expr:y}};b.filter=function(B,A,E,u){var t=B,G=[],y=A,w,r,x=A&&A[0]&&o(A[0]);while(B&&A.length){for(var z in f.filter){if((w=f.match[z].exec(B))!=null){var s=f.filter[z],F,D;r=false;if(y==G){G=[]}if(f.preFilter[z]){w=f.preFilter[z](w,y,E,G,u,x);if(!w){r=F=true}else{if(w===true){continue}}}if(w){for(var v=0;(D=y[v])!=null;v++){if(D){F=s(D,w,v,y);var C=u^!!F;if(E&&F!=null){if(C){r=true}else{y[v]=false}}else{if(C){G.push(D);r=true}}}}}if(F!==undefined){if(!E){y=G}B=B.replace(f.match[z],"");if(!r){return[]}break}}}if(B==t){if(r==null){throw"Syntax error, unrecognized expression: "+B}else{break}}t=B}return y};var f=b.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(r){return r.getAttribute("href")}},relative:{"+":function(y,r,x){var v=typeof r==="string",z=v&&!/\W/.test(r),w=v&&!z;if(z&&!x){r=r.toUpperCase()}for(var u=0,t=y.length,s;u<t;u++){if((s=y[u])){while((s=s.previousSibling)&&s.nodeType!==1){}y[u]=w||s&&s.nodeName===r?s||false:s===r}}if(w){b.filter(r,y,true)}},">":function(x,s,y){var v=typeof s==="string";if(v&&!/\W/.test(s)){s=y?s:s.toUpperCase();for(var t=0,r=x.length;t<r;t++){var w=x[t];if(w){var u=w.parentNode;x[t]=u.nodeName===s?u:false}}}else{for(var t=0,r=x.length;t<r;t++){var w=x[t];if(w){x[t]=v?w.parentNode:w.parentNode===s}}if(v){b.filter(s,x,true)}}},"":function(u,s,w){var t=i++,r=q;if(!s.match(/\W/)){var v=s=w?s:s.toUpperCase();r=m}r("parentNode",s,t,u,v,w)},"~":function(u,s,w){var t=i++,r=q;if(typeof s==="string"&&!s.match(/\W/)){var v=s=w?s:s.toUpperCase();r=m}r("previousSibling",s,t,u,v,w)}},find:{ID:function(s,t,u){if(typeof t.getElementById!=="undefined"&&!u){var r=t.getElementById(s[1]);return r?[r]:[]}},NAME:function(t,w,x){if(typeof w.getElementsByName!=="undefined"){var s=[],v=w.getElementsByName(t[1]);for(var u=0,r=v.length;u<r;u++){if(v[u].getAttribute("name")===t[1]){s.push(v[u])}}return s.length===0?null:s}},TAG:function(r,s){return s.getElementsByTagName(r[1])}},preFilter:{CLASS:function(u,s,t,r,x,y){u=" "+u[1].replace(/\\/g,"")+" ";if(y){return u}for(var v=0,w;(w=s[v])!=null;v++){if(w){if(x^(w.className&&(" "+w.className+" ").indexOf(u)>=0)){if(!t){r.push(w)}}else{if(t){s[v]=false}}}}return false},ID:function(r){return r[1].replace(/\\/g,"")},TAG:function(s,r){for(var t=0;r[t]===false;t++){}return r[t]&&o(r[t])?s[1]:s[1].toUpperCase()},CHILD:function(r){if(r[1]=="nth"){var s=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(r[2]=="even"&&"2n"||r[2]=="odd"&&"2n+1"||!/\D/.test(r[2])&&"0n+"+r[2]||r[2]);r[2]=(s[1]+(s[2]||1))-0;r[3]=s[3]-0}r[0]=i++;return r},ATTR:function(v,s,t,r,w,x){var u=v[1].replace(/\\/g,"");if(!x&&f.attrMap[u]){v[1]=f.attrMap[u]}if(v[2]==="~="){v[4]=" "+v[4]+" "}return v},PSEUDO:function(v,s,t,r,w){if(v[1]==="not"){if(v[3].match(p).length>1||/^\w/.test(v[3])){v[3]=b(v[3],null,null,s)}else{var u=b.filter(v[3],s,t,true^w);if(!t){r.push.apply(r,u)}return false}}else{if(f.match.POS.test(v[0])||f.match.CHILD.test(v[0])){return true}}return v},POS:function(r){r.unshift(true);return r}},filters:{enabled:function(r){return r.disabled===false&&r.type!=="hidden"},disabled:function(r){return r.disabled===true},checked:function(r){return r.checked===true},selected:function(r){r.parentNode.selectedIndex;return r.selected===true},parent:function(r){return !!r.firstChild},empty:function(r){return !r.firstChild},has:function(t,s,r){return !!b(r[3],t).length},header:function(r){return/h\d/i.test(r.nodeName)},text:function(r){return"text"===r.type},radio:function(r){return"radio"===r.type},checkbox:function(r){return"checkbox"===r.type},file:function(r){return"file"===r.type},password:function(r){return"password"===r.type},submit:function(r){return"submit"===r.type},image:function(r){return"image"===r.type},reset:function(r){return"reset"===r.type},button:function(r){return"button"===r.type||r.nodeName.toUpperCase()==="BUTTON"},input:function(r){return/input|select|textarea|button/i.test(r.nodeName)}},setFilters:{first:function(s,r){return r===0},last:function(t,s,r,u){return s===u.length-1},even:function(s,r){return r%2===0},odd:function(s,r){return r%2===1},lt:function(t,s,r){return s<r[3]-0},gt:function(t,s,r){return s>r[3]-0},nth:function(t,s,r){return r[3]-0==s},eq:function(t,s,r){return r[3]-0==s}},filter:{PSEUDO:function(x,t,u,y){var s=t[1],v=f.filters[s];if(v){return v(x,u,t,y)}else{if(s==="contains"){return(x.textContent||x.innerText||"").indexOf(t[3])>=0}else{if(s==="not"){var w=t[3];for(var u=0,r=w.length;u<r;u++){if(w[u]===x){return false}}return true}}}},CHILD:function(r,u){var x=u[1],s=r;switch(x){case"only":case"first":while(s=s.previousSibling){if(s.nodeType===1){return false}}if(x=="first"){return true}s=r;case"last":while(s=s.nextSibling){if(s.nodeType===1){return false}}return true;case"nth":var t=u[2],A=u[3];if(t==1&&A==0){return true}var w=u[0],z=r.parentNode;if(z&&(z.sizcache!==w||!r.nodeIndex)){var v=0;for(s=z.firstChild;s;s=s.nextSibling){if(s.nodeType===1){s.nodeIndex=++v}}z.sizcache=w}var y=r.nodeIndex-A;if(t==0){return y==0}else{return(y%t==0&&y/t>=0)}}},ID:function(s,r){return s.nodeType===1&&s.getAttribute("id")===r},TAG:function(s,r){return(r==="*"&&s.nodeType===1)||s.nodeName===r},CLASS:function(s,r){return(" "+(s.className||s.getAttribute("class"))+" ").indexOf(r)>-1},ATTR:function(w,u){var t=u[1],r=f.attrHandle[t]?f.attrHandle[t](w):w[t]!=null?w[t]:w.getAttribute(t),x=r+"",v=u[2],s=u[4];return r==null?v==="!=":v==="="?x===s:v==="*="?x.indexOf(s)>=0:v==="~="?(" "+x+" ").indexOf(s)>=0:!s?x&&r!==false:v==="!="?x!=s:v==="^="?x.indexOf(s)===0:v==="$="?x.substr(x.length-s.length)===s:v==="|="?x===s||x.substr(0,s.length+1)===s+"-":false},POS:function(v,s,t,w){var r=s[2],u=f.setFilters[r];if(u){return u(v,t,s,w)}}}};var j=f.match.POS;for(var l in f.match){f.match[l]=new RegExp(f.match[l].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var a=function(s,r){s=Array.prototype.slice.call(s);if(r){r.push.apply(r,s);return r}return s};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(k){a=function(v,u){var s=u||[];if(d.call(v)==="[object Array]"){Array.prototype.push.apply(s,v)}else{if(typeof v.length==="number"){for(var t=0,r=v.length;t<r;t++){s.push(v[t])}}else{for(var t=0;v[t];t++){s.push(v[t])}}}return s}}var c;if(document.documentElement.compareDocumentPosition){c=function(s,r){var t=s.compareDocumentPosition(r)&4?-1:s===r?0:1;if(t===0){n=true}return t}}else{if("sourceIndex" in document.documentElement){c=function(s,r){var t=s.sourceIndex-r.sourceIndex;if(t===0){n=true}return t}}else{if(document.createRange){c=function(u,s){var t=u.ownerDocument.createRange(),r=s.ownerDocument.createRange();t.selectNode(u);t.collapse(true);r.selectNode(s);r.collapse(true);var v=t.compareBoundaryPoints(Range.START_TO_END,r);if(v===0){n=true}return v}}}}(function(){var s=document.createElement("div"),t="script"+(new Date).getTime();s.innerHTML="<a name='"+t+"'/>";var r=document.documentElement;r.insertBefore(s,r.firstChild);if(!!document.getElementById(t)){f.find.ID=function(v,w,x){if(typeof w.getElementById!=="undefined"&&!x){var u=w.getElementById(v[1]);return u?u.id===v[1]||typeof u.getAttributeNode!=="undefined"&&u.getAttributeNode("id").nodeValue===v[1]?[u]:undefined:[]}};f.filter.ID=function(w,u){var v=typeof w.getAttributeNode!=="undefined"&&w.getAttributeNode("id");return w.nodeType===1&&v&&v.nodeValue===u}}r.removeChild(s)})();(function(){var r=document.createElement("div");r.appendChild(document.createComment(""));if(r.getElementsByTagName("*").length>0){f.find.TAG=function(s,w){var v=w.getElementsByTagName(s[1]);if(s[1]==="*"){var u=[];for(var t=0;v[t];t++){if(v[t].nodeType===1){u.push(v[t])}}v=u}return v}}r.innerHTML="<a href='#'></a>";if(r.firstChild&&typeof r.firstChild.getAttribute!=="undefined"&&r.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(s){return s.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var r=b,t=document.createElement("div");t.innerHTML="<p class='TEST'></p>";if(t.querySelectorAll&&t.querySelectorAll(".TEST").length===0){return}b=function(x,w,u,v){w=w||document;if(!v&&w.nodeType===9&&!o(w)){try{return a(w.querySelectorAll(x),u)}catch(y){}}return r(x,w,u,v)};for(var s in r){b[s]=r[s]}})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var r=document.createElement("div");r.innerHTML="<div class='test e'></div><div class='test'></div>";if(r.getElementsByClassName("e").length===0){return}r.lastChild.className="e";if(r.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(s,t,u){if(typeof t.getElementsByClassName!=="undefined"&&!u){return t.getElementsByClassName(s[1])}}})()}function m(s,x,w,B,y,A){var z=s=="previousSibling"&&!A;for(var u=0,t=B.length;u<t;u++){var r=B[u];if(r){if(z&&r.nodeType===1){r.sizcache=w;r.sizset=u}r=r[s];var v=false;while(r){if(r.sizcache===w){v=B[r.sizset];break}if(r.nodeType===1&&!A){r.sizcache=w;r.sizset=u}if(r.nodeName===x){v=r;break}r=r[s]}B[u]=v}}}function q(s,x,w,B,y,A){var z=s=="previousSibling"&&!A;for(var u=0,t=B.length;u<t;u++){var r=B[u];if(r){if(z&&r.nodeType===1){r.sizcache=w;r.sizset=u}r=r[s];var v=false;while(r){if(r.sizcache===w){v=B[r.sizset];break}if(r.nodeType===1){if(!A){r.sizcache=w;r.sizset=u}if(typeof x!=="string"){if(r===x){v=true;break}}else{if(b.filter(x,[r]).length>0){v=r;break}}}r=r[s]}B[u]=v}}}var h=document.compareDocumentPosition?function(s,r){return s.compareDocumentPosition(r)&16}:function(s,r){return s!==r&&(s.contains?s.contains(r):true)};var o=function(r){return r.nodeType===9&&r.documentElement.nodeName!=="HTML"||!!r.ownerDocument&&r.ownerDocument.documentElement.nodeName!=="HTML"};var g=function(r,y){var u=[],v="",w,t=y.nodeType?[y]:y;while((w=f.match.PSEUDO.exec(r))){v+=w[0];r=r.replace(f.match.PSEUDO,"")}r=f.relative[r]?r+"*":r;for(var x=0,s=t.length;x<s;x++){b(r,t[x],u)}return b.filter(v,u)};y5.$$=y5.Dom.get=b;y5.loaded("cssQuery")});y5.require(["Events","Cache","Classes"],function(){var m=0,f=/\w+-c-[\w\-]+/g,a=new y5.Cache(),h=y5.Types,p=y5.Classes,j=y5.Id.generateUnique("_y5_Components");function i(){m++}function k(){if(--m==0){y5.fire("y5:allComponentsCreated",y5.Components)}}function n(r,q){return y5.Id.get(r)+"-"+q}function d(q){var s;try{s=q.onclick()}catch(r){}return s?s:{}}function l(s){var u=s.className.match(f),t=u.length,q=new Array(t),r=0;s[j]=t;for(;r<t;r++){q[r]=u[r].replace("-c-",":").replace(/-/g,".")}return q}function g(s,r){var q=n(s,r);if(!a.test(q)){a.set(q,true);return false}return true}function c(s,r,t){var q=y5.module(s).name;y5.Console.log("Start init %s",q,["y5","Components"]);i();y5.require(s,function(){var u=y5.module(s).object;if(u==null){y5.Console.error("Component init failed %s",q,["y5","Components"]);k();return}function v(){var w=new u(r,t);y5.Console.log("Component created %s",q,["y5","Components"]);r[j]--;y5.fire("y5:componentCreated",r,{name:q,element:r,instance:w});if(r[j]==0){y5.fire("y5:allComponentsCreated",r)}k()}window.setTimeout(v,0)})}function b(u){if(!h.element(u)){return}var v=d(u),q=l(u),t,s=0,r=q.length;for(;s<r;s++){t=q[s];if(!g(u,t)){c(t,u,v)}}}function o(t){t=h.element(t)?t:document.body;var w,v,u=[],q,s=0,r=y5.Components.tags.length;for(;s<r;s++){w=t.getElementsByTagName(y5.Components.tags[s]);q=0;while(v=w[q++]){if(p.test(v,f)){u.push(v)}}}if(p.test(t,f)){u.push(t)}u.forEach(b)}y5.Components={tags:["form","div","code"],init:function(q){if(!h.array(q)){q=[q]}q.forEach(o)}};y5.loaded("Components");new y5.on("dom:loaded",y5.Components.init,y5,y5.Components)});(function(){var t=y5.Types,u=decodeURIComponent,q=decodeURI,v,r=/^((((\w+):)\/\/)?(([\w\-\.]+\.\w+|localhost)(\:(\d+))?))?(\/?[^\?#]*)?(\?([^#]*))?(#(.*))?$/,x=/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/,w="%D0%B9%D1%86%D1%83%D0%BA%D0%B5%D0%BD%D0%B3%D1%88%D1%89%D0%B7%D1%85%D1%8A%D1%84%D1%8B%D0%B2%D0%B0%D0%BF%D1%80%D0%BE%D0%BB%D0%B4%D0%B6%D1%8D%D1%8F%D1%87%D1%81%D0%BC%D0%B8%D1%82%D1%8C%D0%B1%D1%8E%D1%91%D0%99%D0%A6%D0%A3%D0%9A%D0%95%D0%9D%D0%93%D0%A8%D0%A9%D0%97%D0%A5%D0%AA%D0%A4%D0%AB%D0%92%D0%90%D0%9F%D0%A0%D0%9E%D0%9B%D0%94%D0%96%D0%AD%D0%AF%D0%A7%D0%A1%D0%9C%D0%98%D0%A2%D0%AC%D0%91%D0%AE%D0%81".match(/.{6}/g),p={},a=/%([A-Fa-f0-9]{2})/g,j=/\+/g,o=[".xml",".html",".xhtml",".jpg",".gif",".png",".css",".js",".xsl",".php",".py",".pl"],d=/%3B|%2C|%2F|%3F|%3A|%40|%26|%3D|%2B|%24|%23/gi;"E9F6F3EAE5EDE3F8F9E7F5FAF4FBE2E0EFF0EEEBE4E6FDFFF7F1ECE8F2FCE1FEB8C9D6D3CAC5CDC3D8D9C7D5DAD4DBC2C0CFD0CECBC4C6DDDFD7D1CCC8D2DCC1DEA8".match(/../g).forEach(function(z,i){p[z]=w[i]});w=null;function c(i,z){return p[z]||i}function b(i){return i.replace(a,c)}function y(z){try{z=q(z)}catch(A){try{z=q(b(z))}catch(A){z=unescape(z)}}d.lastIndex=0;var i,B=0,C=[];while(i=d.exec(z)){if(d.lastIndex>B){if(i[0]){C.push(z.slice(B,i.index));C.push(i[0]);B=i.index+i[0].length}}}if(B!==z.length){C.push(z.slice(B))}if(C[0]){C[0]=encodeURI(C[0]);z=C.reduce(function(D,F,E){if(!(E%2)){F=encodeURI(F)}return D+F})}return z}function k(z){var i;try{i=u(z)}catch(A){try{i=u(b(z))}catch(A){i=unescape(z)}}return encodeURIComponent(i)}function n(i){return k(i.toString())}function f(A,i,z,B){i=k(i.toString());if(!t.array(z)){z=[z]}z=z.map(n);if(t.undef(A[i])||B){A[i]=[]}A[i]=A[i].concat(z)}function h(F){var D={},E=F.replace(j,"%20").split("&"),A,C,B=0,z=E.length;for(;B<z;B++){C=E[B].split("=");A=C.shift();if(A){f(D,A,C.join("="))}}return D}function m(A,C,z,D){var B=C,i;if(!t.object(C)){B={};B[C]=z}for(i in B){f(A,i,B[i],D)}}y5.Url=function(i){i=t.string(i)?i:window.location.href;var z=i.match(r);if(!z){throw"This is not an URL."}this.Host=z[6]||"";this.Path=z[9]||"";if(z[6]){var A=z[6].substring(z[6].lastIndexOf(".")),B=o.indexOf(A);if(B!=-1){this.Path=z[6];this.Host=""}}this.Href=z[0];this.Proto=z[4]||"";this.Port=z[8]||0;this.Path=y(this.Path);this.Query=h(z[11]||"");this.Hash=k((z[13]||"").replace(j,"%20"))};y5.Url.prototype={go:function(){window.location.href=this.toString()},toString:function(){var i="";if(this.Proto||this.Host){if(this.Host){i+=(this.Proto||"http")+"://"+this.Host;if(this.Port){i+=":"+this.Port}}}if(this.Path){if(this.Host&&this.Path.indexOf("/")!=0){i+="/"}i+=this.Path}var z=this.query();if(z){i+="?"+z}if(this.Hash){i+="#"+this.Hash}return i},copy:function(){return new y5.Url(this.toString())},proto:function(){},host:function(){},port:function(){},path:function(){},hash:function(i){if(t.def(i)){this.Hash=k(i);return this}return this.Hash},query:function(A){if(t.def(A)){this.Query={};if(t.string(A)){this.Query=h(A)}else{this.set(A)}return this}var i=[],z;for(z in this.Query){i=i.concat(this.Query[z].map(function(B){return z+"="+B}))}return i.join("&")},keys:function(){var i=[],z;for(z in this.Query){i.push(z)}return i.sort()},set:function(z,i){m(this.Query,z,i,true);return this},add:function(z,i){m(this.Query,z,i);return this},remove:function(i){if(!t.array(i)){i=[i.toString()]}i.forEach(function(z){delete this.Query[z]},this);return this},get:function(i){var z=this.Query[i];if(z&&z.length==1){z=z[0]}return z}};var g=y5.Url,s=g.prototype;var l={proto:"Proto",host:"Host",port:"Port",path:"Path"};for(v in l){s[v]=(function(i){return function(z){if(t.def(z)){this[i]=y(z);return this}return this[i]}})(l[v])}g.valid=function(i){return x.test(i)};y5.loaded("Url")})();y5.require("String",function(){y5.Template=function(a){this.template=a};y5.Template.prototype=new function(){var b=/([#$])\{([^}]+)\}/g;function a(g,c,f){var d=g[f];if(d==null){y5.Console.warn("y5.Template: unknown property "+f,"Template");return""}else{if(d instanceof y5.Template){d=d.evaluate(g)}}if(c=="$"){return d}return y5.String.escapeHTML(String(d))}this.evaluate=function(g){if(g==null){y5.Console.warn("y5.Template: object is null or undefined","Template");g={}}if(!y5.Types.array(g)){g=[g]}var c="",f=0,d=g.length;for(;f<d;f++){c+=this.template.replace(b,function(j,h,i){return a(g[f],h,i)})}return c}};y5.loaded("Template")});(function(){var w=y5.Types,b=y5.Browser,C=1<<16,r=C-1,n=C<<1,s=n<<1,B=1,f=2,y={checkTarget:true,runOnce:false,add:true},c=[],u=[];var t=function(J,K,I,F,E,H){E=w.object(E)?E:{};for(var G in y){if(w.undef(E[G])){E[G]=y[G]}}this.options=E;if(!w.array(J)){J=[J]}this.masks=J.map(function(L){return i(o(L),H)});this.list=(H==1)?c:u;this.node=I||document;this.context=F||this.node;this.callback=K;this.enabled=false;if(E.add){this.enable()}};t.prototype={enable:function(){if(!this.enabled){this.enabled=true;this.list.push(this)}},disable:function(){if(this.enabled){this.enabled=false;q(this,this.list)}},check:function(E,F,H,G){if(!this.enabled){return false}if(this.options.checkTarget&&F){return false}if(!this.checkMask(E)){return false}if(m(H,this.node)){this.callback.apply(this.context,[G,this.node]);return true}return false},checkMask:function(E){return this.masks.some(function(F){return F==E||F==0})}};var z={BS:8,BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PGUP:33,PAGE_DOWN:34,PGDN:34,END:35,HOME:36,LEFT_ARROW:37,LEFT:37,UP_ARROW:38,UP:38,RIGHT_ARROW:39,RIGHT:39,DOWN_ARROW:40,DOWN:40,INSERT:45,INS:45,DELETE:46,DEL:46,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,PLUS:b.ie||b.webkit?187:61,PLUS_NUM:107,MINUS:b.ie||b.webkit?189:109,MINUS_NUM:109,NUM_1:49,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUM_LOCK:144,SCROLL_LOCK:145,SLASH:191,ASTERISK:106};function m(F,E){if(E==document){return true}do{if(F===E){return true}}while(F=F.parentNode);return false}var l=/\s+/g,k=/\+/g;function o(E){if(w.object(E)){return E}var F=E.replace(l,"").split(k);E={};F.forEach(function(G){G=G.toUpperCase();switch(G){case"ALT":E.alt=true;break;case"SHFT":case"SHIFT":E.shift=true;break;case"CTL":case"CTRL":E.ctrl=true;break;default:var H=z[G];if(H){E.key=H}else{E.ch=G}}});return E}function q(F,G){var E=G.lastIndexOf(F);if(E!==-1){G=G.splice(E,1);return true}return false}function i(H,F){var G=0,E;if(H.key){G=H.key}else{if(H.ch){switch(F){case B:G=H.ch.toUpperCase();break;case f:G=H.ch.toLowerCase();break}G=G.charCodeAt(0)}}E=r&G;if(H.ctrl){E^=C}if(H.alt){E^=n}if(H.shift){E^=s}return E}function a(E,F){return{key:E,ctrl:F.ctrlKey,alt:F.altKey,shift:F.shiftKey}}function x(G,F){switch(F){case B:return i(a(G.keyCode,G));case f:var E=G.charCode?G.charCode:G.keyCode;return i(a(E,G))}return 0}function A(E){if(!E.tagName){return false}switch(E.tagName.toLowerCase()){case"input":switch(E.type){case"text":case"password":case"file":case"search":return true}break;case"textarea":return true}return false}function h(I,L,J){var H,F=I.target,N=x(I,L),M=A(F),K=false,G,E;for(H=0;H<J.length;H++){if(J[H].enabled){G=J[H];E=G.check(N,M,F,I);if(E&&G.options.runOnce){q(G,J)}K=E||K}}return K}function j(E){return h(E,B,c)}function d(E){return h(E,f,u)}y5.Shortcut={down:function(H,I,G,F,E){return new t(H,I,G,F,E,B)},press:function(H,I,G,F,E){return new t(H,I,G,F,E,f)}};for(var D in z){y5.Shortcut[D]=z[D]}var g=j;if(b.ie){g=function(E){if(!E.repeat){j(E)}d(E)}}else{if(b.webkit){var p=y5.on("keyup",function(){v=false;p.disable()},document,null,{add:false}),v=false;g=function(E){if(!v){p.enable();j(E)}v=true;d(E)}}else{y5.on("keypress",d,document)}}y5.on("keydown",g,document);y5.loaded("Shortcut")})();y5.require("String","Url",function(){var i=y5.Url,d=y5.Types,f=function(){},b="Request",k=["uninitialized","loading","loaded","interactive","complete"];function g(l){y5.Console.error(b,[l],[b])}function j(){return y5.String.trim(this.responseText)}function h(){return this.responseText}function c(){try{return JSON.parse(this.responseText)}catch(l){throw l}}function a(l,n){this.req=null;this.url=l instanceof i?l:new i(l);var m;if(n){m=n.callbackContext;delete n.callbackContext}this.params=y5.merge({},this.defaultParams,n);if(d.object(m)){this.params.callbackContext=m}this.params.method=this.params.method.toLowerCase()}a.prototype={defaultParams:{id:null,method:"get",onexception:g,callbackContext:null,callbackObject:null},abort:f,send:function(l){try{this.init();y5.Console.log(this.toString()+" "+this.params.method.toUpperCase(),[this,l],[b,this.toString()]);if(l&&y5.Types.object(l)&&!l.submit){l=new i("").set(l).query()}this._send(l)}catch(m){this.dispatch("exception",m)}return this},init:function(){if(this.isInit){return}if(!this.id){this.id=y5.Id.generateUnique("y5__")}this._init();this.isInit=true},_init:f,end:function(){this._end();this.req=null;this.isInit=false;this.dispatch("end")},_end:f,dispatch:function(l,o){var q=this.params,n="on"+l,m=q.callbackContext||this,p=q.callbackObject;o=o||this.req;if(d.func(this[n])){this[n].call(m,o)}if(d.func(q[n])){q[n].call(m,o)}if(p&&d.func(p[n])){p[n](o)}y5.fire("request:"+l,q.id||this,o);y5.fire("request:"+l,y5,this,o)},onStateChange:function(){try{y5}catch(n){return}var o=this.req.readyState,m=o==4;if(m){var l=0;try{l=this.req.status}catch(n){}if(y5.Browser.ie&&l==1223){l=204}if(!d.func(this["on"+l])){l=(l>=200&&l<300)?"load":"error"}var p=d.string(this.req.responseText);this.req.text=p?j:h;this.req.json=p?c:y5.NULL;this.dispatch(l)}this.dispatch(k[o]);if(m){this.end()}},toString:function(){return b}};y5.Get={};y5.Post={};a.ext=function(n,o,l){if(d.undef(l)){y5.extend(o,a,b)}var m=b+"."+n;y5.Get[n]=function(p,s,q){s=s||{};s.method="get";var r=new o(p,s);r.send(q);return r};y5.Post[n]=function(p,s,q){s=s||{};s.method="post";var r=new o(p,s);r.send(q);return r};o.prototype.toString=function(){return m};a[n]=o;y5.loaded(m)};y5.Request=a;y5.loaded(b)});y5.require("Request",function(){var b=y5.UNDEF;function a(c,d){this.Request(c,d)}a.prototype={defaultParams:{async:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript,text/html,application/xml,text/xml,text/plain,*/*"}},abort:function(){try{this.req.abort()}catch(c){}this.dispatch("abort")},_send:function(m){var l=this,k=this.params,c=k.method,j=k.async,i=c=="get",n=c=="post",f=this.url;if(typeof XMLHttpRequest!=b){this.req=new XMLHttpRequest()}else{if(typeof ActiveXObject!=b){this.req=new ActiveXObject("Microsoft.XMLHTTP")}else{return false}}if(i&&m){f=f.copy();f.query(m);m=null}if(n&&!m){f=f.copy();m=f.query();f.query("")}this.req.open(c.toUpperCase(),f,j);if(j){this.req.onreadystatechange=function(){l.onStateChange()}}var h=y5.merge({},k.headers);if(n){var g=k.encoding;h["Content-Type"]=k.contentType+(g?"; charset="+g:"");if(y5.Browser.gecko&&y5.Browser.version<1.8){h.Connection="close"}}for(var d in h){this.req.setRequestHeader(d,h[d])}this.req.send(m);if(!j){this.onStateChange()}}};if(y5.Browser.ie&&y5.Browser.version<7){a.prototype.onStateChange=function(){var c=this.req;if(this.req.readyState==4){this.req={status:c.status,readyState:c.readyState,responseText:c.responseText,responseXML:c.responseXML};this.req.getResponseHeader=function(d){return c.getResponseHeader(d)};this.req.abort=function(){return c.abort()}}this.Request.prototype.onStateChange.apply(this)}}y5.Request.ext("XML",a)});(function(){var a="0123456789ABCDEF".split(""),c=/([\d.]+)(\w+)/;function b(g,d){if(g=="px"){return 1}var f=document.createElement("i");f.style.cssText="position:absolute;display:block;visibility:hidden;width:100"+g;d.appendChild(f);return f.clientWidth/100}y5.Convert={dec2hex:function(d){return a[d>>4]+a[d&15]},hex2dec:function(d){return parseInt(d,16)},unit:function(h,g,d){if(!y5.Types.node(d)){return 0}d=d||document.body;var f=c.exec(h);if(!f||!f[0]){return 0}h=f[2];f=parseFloat(f[1],10);return f*b(h,d)/b(g,d)}};y5.loaded("Convert")})();y5.require("Convert",function(){var c=y5.Convert.hex2dec,n=y5.Convert.dec2hex,h=y5.Types,j=/^#([0-9a-fA-F]{3})$/,f=/^#([0-9a-fA-F]{6})$/,p=/^(?:rgb|hsl)\s*\(\s*(\-?\d+%?)\s*,\s*(\-?\d+%?)\s*,\s*(\-?\d+%?)/;function d(u,t,r,v){var s=parseInt(u,10);if(isNaN(s)){return t}if(u.toString().indexOf("%")==-1){u=s}else{if(h.def(v)){u=Math.round(s*v/100)}else{u=Math.round(s*r/100)}}if(h.def(v)){u=v+u}if(u>r){u=r}if(u<0){u=0}return u}function q(r){return c(r+r)}function o(r){var s=r.match(j);if(s){var t=s[1].split("");return[q(t[0]),q(t[1]),q(t[2])]}return null}function m(r){var s=r.match(f);if(s){var t=s[1].match(/../g);return[c(t[0]),c(t[1]),c(t[2])]}return null}function i(r){var s=r.match(p);if(s){return[d(s[1],0,255),d(s[2],0,255),d(s[3],0,255)]}return null}function k(r){var s=r.match(p);if(s){return[d(s[1],0,360),d(s[2],0,100),d(s[3],0,100)]}return null}function l(r){return typeof r=="string"?new y5.Color(r):r}function b(t,x,z){t/=255;x/=255;z/=255;var A=Math.max(t,x,z),v=Math.min(t,x,z),w,B,u=(A+v)*50,y=A-v;if(A==v){w=B=0}else{B=u>50?y/(2-A-v):y/(A+v);switch(A){case t:w=(x-z)/y*60+360;break;case x:w=(z-t)/y*60+120;break;case z:w=(t-x)/y*60+240;break}w=w%360}return[Math.round(w),Math.round(B*100),Math.round(u)]}function a(u,s,r){if(r<0){r+=1}else{if(r>1){r-=1}}if(r<1/6){return u+(s-u)*6*r}if(r<1/2){return s}if(r<2/3){return u+(s-u)*(2/3-r)*6}return u}function g(w,v,u){if(v==0){u/=100;return[u*255,u*255,u*255]}w=w/360;v/=100;u/=100;var y,x,t,z=u<0.5?u*(1+v):u+v-u*v,A=2*u-z;y=a(A,z,w+1/3);x=a(A,z,w);t=a(A,z,w-1/3);return[Math.round(y*255),Math.round(x*255),Math.round(t*255)]}y5.Color=function(r){if(h.string(r)){this.set(r)}};y5.Color.prototype={hex:"#000000",rgb:"rgb(0,0,0)",red:0,green:0,blue:0,hsl:"hsl(0,0,0)",hue:0,saturation:0,lightness:0,copy:function(){return new y5.Color(this.hex)},toString:function(){return this.hex},equals:function(r){return this.hex==l(r).hex},brightnessDiff:function(r){return Math.abs(this.brightness()-l(r).brightness())},difference:function(r){r=l(r);return((Math.max(this.red,r.red)-Math.min(this.red,r.red))+(Math.max(this.green,r.green)-Math.min(this.green,r.green))+(Math.max(this.blue,r.blue)-Math.min(this.blue,r.blue)))},contrast:function(r){r=l(r);return(this.brightnessDiff(r)>125)&&(this.difference(r)>400)},brightness:function(){return Math.round((0.299*this.red)+(0.587*this.green)+(0.114*this.blue))},gray:function(){var r=this.brightness();return new y5.Color().set({red:r,green:r,blue:r})},invert:function(){return new y5.Color().set({red:255-this.red,green:255-this.green,blue:255-this.blue})},set:function(r){var t,u,s;if(h.string(r)){if(r.indexOf("hsl")==0){r={hsl:r}}else{r={rgb:r}}}for(t in r){u=r[t];switch(t){case"rgb":case"hex":if((s=m(u))||(s=o(u))||(s=i(u))){this.red=s[0];this.green=s[1];this.blue=s[2];this._updateState(t)}break;case"hsl":if(s=k(u)){this.hue=s[0];this.saturation=s[1];this.lightness=s[2];this._updateState(t)}break;case"red":case"green":case"blue":this[t]=d(u,0,255);this._updateState(t);break;case"saturation":case"lightness":this[t]=d(u,0,100);this._updateState(t);break;case"hue":this[t]=d(u,0,360);this._updateState(t);break}}return this},alter:function(r){var s,t;for(s in r){t=r[s];if(h.number(this[s])){switch(s){case"red":case"green":case"blue":this[s]=d(t,0,255,this[s]);break;case"saturation":case"lightness":this[s]=d(t,0,100,this[s]);break;case"hue":this[s]=d(t,0,360,this[s]);break}this._updateState(s)}}return this},get:function(s){if(h.string(s)){return this[s]}var t={},r=this;s.forEach(function(u){t[u]=r[u]});return t},_updateState:function(s){var r;if(s=="rgb"||s=="hex"||s=="red"||s=="green"||s=="blue"){r=b(this.red,this.green,this.blue);this.hue=r[0];this.saturation=r[1];this.lightness=r[2]}else{r=g(this.hue,this.saturation,this.lightness);this.red=r[0];this.green=r[1];this.blue=r[2]}this.rgb="rgb("+this.red+","+this.green+","+this.blue+")";this.hex="#"+n(this.red)+n(this.green)+n(this.blue);this.hsl="hsl("+this.hue+","+this.saturation+","+this.lightness+")"}};y5.Color.valid=function(r){return j.test(r)||f.test(r)||p.test(r)};y5.loaded("Color")});(function(){var a=/[0]+$/g,b=y5.Types;y5.Number={format:function(g,l,c){g=parseFloat(g.toString(),10);if(isNaN(g)){return}l=b.string(l)?l:" ";c=b.string(c)?c:".";var h=g<0?"-":"",n=g.toString(),k=n.indexOf("."),f=0;if(k!=-1){f=n.substr(k+1)}g=Math.floor(Math.abs(g)).toString();var m=g.length%3,o=g.substr(0,m),d=Math.floor(g.length/3),j=0;for(;j<d;j++){o+=l+g.substr(3*j+m,3)}if(m==0){o=o.substr(1)}if(f){o+=c+f}return h+o},pluralize:function(h,d,f){var g=2,c=h%10,i=h%100;if(h==0){if(d[3]){return d[3]}}else{if(i<5||i>20){if(c==1){g=0}else{if(c>=2&&c<=4){g=1}}}}return f?d[g]:(h+" "+d[g])},random:function(d,c){return Math.floor(Math.random()*(c-d+1))+d},toFixed:function(c,d){return c.toFixed(d).replace(a,"")}};y5.loaded("Number")})();y5.require(["Element"],function(){var a=y5.Element,c=y5.Types,b=function(){return false};y5.ObjectMove=function(d,g,f){this.grab=d;this.target=c.node(g)?g:d;this.region=c.node(f)?f:document;this.moved=false;this.startPosition=null;this.clickPosition=null;this.listener={down:y5.on("mousedown",this.down,this.grab,this,{add:false}),move:y5.on("mousemove",this.move,document,this,{add:false}),up:y5.on("mouseup",this.up,document,this,{add:false})};this.backupListener={region_onselectstart:null,region_onmousedown:null,grab_onclick:null,grab_click:null};this.enable()};y5.ObjectMove.prototype={enable:function(){this.listener.down.enable();return this},disable:function(){this.listener.down.disable();this.listener.move.disable();this.listener.up.disable();return this},down:function(d){if(!d.buttonL){return true}this.listener.move.enable();this.listener.up.enable();this.disableSelection();this.startPosition=a.offset(this.target,this.region);this.cursorPosition={x:d.pageX,y:d.pageY};y5.fire("y5:down",this.grab,d,this.target,this.startPosition)},move:function(d){this.moved=true;y5.fire("y5:move",this.grab,d,this.target,this.calculateNewPoint(d),this.startPosition)},up:function(d){this.enableSelection();this.moved=false;this.listener.move.disable();this.listener.up.disable();y5.fire("y5:up",this.grab,d,this.target,this.calculateNewPoint(d),this.startPosition)},calculateNewPoint:function(d){return{left:this.startPosition.left+(d.pageX-this.cursorPosition.x),top:this.startPosition.top+(d.pageY-this.cursorPosition.y)}},disableSelection:function(){var g=this.backupListener,f=this,h=document;g.region_onselectstart=h.onselectstart;h.onselectstart=b;g.region_onmousedown=h.onmousedown;h.onmousedown=b;g.grab_onclick=f.grab.onclick;f.grab.onclick=b;g.grab_click=a.data(f.grab,"events.click");a.data(f.grab,"events.click",[])},enableSelection:function(){var g=this.backupListener,f=this,i=document;i.onselectstart=g.region_onselectstart;g.region_onselectstart=null;i.onmousedown=g.region_onmousedown;g.region_onmousedown=null;function h(){f.grab.onclick=g.grab_onclick;a.data(f.grab,"events.click",g.grab_click)}if(!this.moved){h()}else{window.setTimeout(h,100)}}};y5.loaded("ObjectMove")});(function(){y5.Timer=function(b,d,a,c){c=y5.Types.def(c)?c:true;this.period=d;this.enabled=false;this.tick=0;this.timersCount=10;this.timers=new Array(this.timersCount);this.context=a;this.listener=b;if(c){this.enable()}};y5.Timer.prototype={enable:function(){if(this.enabled){return}this.tick=0;this.enabled=true;this.setTimer()},disable:function(){if(!this.enabled){return}this.clearTimer();this.enabled=false},execListener:function(c,b){if(!this.enabled){return}window.clearTimeout(this.timers[b]);var a=new Date().getTime();var f=c-a;var d=f>0;this.tick++;this.listener.call(this.context,this,this.tick,d);if(this.tick%this.timersCount==0){this.setTimer()}},setTimer:function(){this.clearTimer();var d=0;var c=(new Date()).getTime();for(var a=0;a<this.timersCount;a++){d+=this.period;var b=c+d;this.timers[a]=y5.Timer.setTimeout(this.execListener,d,this,b,a)}},clearTimer:function(){for(var a=0;a<this.timersCount;a++){window.clearTimeout(this.timers[a])}}};y5.Timer.setTimeout=function(b,c,a){return window.setTimeout((function(g,f,d){return function(){g.apply(f,d)}})(b,a,Array.prototype.slice.call(arguments,3)),c)};y5.loaded("Timer")})();y5.require("Timer",function(){function a(b){return{value:b.value,checked:b.checked,selected:b.selected,selectedIndex:b.selectedIndex}}y5.Input=function(b,c){this.element=b;this.enabled=false;this.saveState();this.timer=new y5.Timer(function(){if(this.modified()){y5.fire("y5:valueChanged",this.element,this.element);this.state=a(this.element)}},100,this,false);if(c){this.enable()}};y5.Input.prototype={enable:function(){this.timer.enable();this.enabled=true;return this},disable:function(){this.timer.disable();this.enabled=false;return this},modified:function(){var b=this.element,c=this.state;return(c.checked!=b.checked||c.selected!=b.selected||c.selectedIndex!=b.selectedIndex||c.value!=b.value)},saveState:function(){this.state=a(this.element);return this}};y5.loaded("Input")});y5.require("Color","Convert","Element",function(){var A=y5.Color,x=y5.Convert,t=y5.Element,w=function(){};var j=y5.Fx=function(C,D,E){return new u(C,D,E)};var u=function(C,D,E){this.delay=0;this.element=C;this.effects=[];this.blend(D,E)};u.prototype={blend:function(C,D){D=D||{};D.delay=this.delay+(D.delay||b.prototype.defaultParams.delay);this.effects.push(C(this.element,D));return this},after:function(C,D){D=D||{};this.delay+=(D.duration||b.prototype.defaultParams.duration);this.blend(C,D);return this},start:function(){this.delay=0;this.effects.forEach(function(C){C.start()})}};var f=j.Transitions={_BACK_OVERSHOOT:1.70158,none:function(){return 0},fill:function(){return 1},linear:function(C){return C},wobble:function(C){return(-Math.cos(C*Math.PI*(9*C))/2)+0.5},reverse:function(C){return 1-C},random:function(){return Math.random()},back:function(D,E){if(D==0||D==1){return D}E=E||{};var C=E.overshoot||f._BACK_OVERSHOOT;return(C*D+D-C)*(D*D)},bounce:function(F){F=1-F;var C=0,E=7.5625,D=2.75;if(F<1/D){C=E*F*F}else{if(F<2/D){C=E*(F-=1.5/D)*F+0.75}else{if(F<2.5/D){C=E*(F-=2.25/D)*F+0.9375}else{C=E*(F-=2.625/D)*F+0.984375}}}return 1-C},elastic:function(C,D){if(C==0||C==1){return C}D=D||{};return Math.pow(2,6*--C)*Math.cos(10*C*Math.PI*(D.amplitude||1)/3)},quad:function(C){return C*C},cubic:function(C){return C*C*C},pow:function(C,D){D=D||{};return Math.pow(C,D.pow||4)},expo:function(C){return Math.pow(2,10*(C-1))},sin:function(C){return Math.sin(C*Math.PI/2)},circ:function(C){return 1-Math.sqrt(1-C*C)}};["back","bounce","elastic","quad","cubic","pow","expo","sin","circ"].forEach(function(C){var D=f[C];f[C+"In"]=D;f[C+"Out"]=function(E,F){return 1-D(1-E)};f[C]=function(E,F){if(E<=0.5){return D(E*2)/2}return(2-D(2*(1-E)))/2}});var y=j.Bezier={position:function(C,G,M,F){var I,H,D,L=1-F,E=M.length,N=new Array(E+2);N[0]=[C[0],C[1]];for(I=0;I<E;I++){D=M[I];N[I+1]=[D[0],D[1]]}N[I+1]=[G[0],G[1]];E+=2;for(H=1;H<E;H++){for(I=0;I<E-H;I++){var K=N[I],J=N[I+1];N[I][0]=L*K[0]+F*J[0];N[I][1]=L*K[1]+F*J[1]}}D=N[0];return[D[0],D[1]]}};var k=false,z=1,i=2,m=3;var r=/left|top|width|height|size|right|bottom|spacing|indent|padding|align/i,g=/opacity|weight/i,o=/color/i;function q(C){if(o.test(C)){return m}else{if(r.test(C)){return z}else{if(g.test(C)){return i}}}return k}function d(E,D,G){if(G=="auto"){switch(D){case"width":return[E.scrollWidth,"px"];case"height":return[E.scrollHeight,"px"];default:return[0,"px"]}}if(G=="normal"){switch(D){case"lineHeight":return[1.2,"em"];default:return[0,"px"]}}var C=parseFloat(G),F;try{F=G.match(/[+-]?\d*.?\d+(.*)/)[1]}catch(H){F="px"}if(F==""){F="px"}return[C,F]}var b=y5.Effect=function(C,D,E){E=E||{};["complete","completeRewind","start","tween"].forEach(function(F){F="on"+F;if(!y5.Types.func(E[F])){E[F]=w}});this.element=C;this.initCSS=C.style.cssText;this.styles=y5.merge({},this.defaultStyles,D);this.params=y5.merge({},this.defaultParams,E);this.forward=true;this.transition=this.params.transition;this.ticks=Math.round(this.params.duration*this.params.fps);if(this.ticks==0){this.ticks=1}this._tick=0;this._interval=null;this.init();if(this.params.start){this.start()}};b.prototype={init:function(){},defaultStyles:{},defaultParams:{start:false,duration:1,delay:0,fps:40},animate:function(C){C=typeof C=="number"?C:this.params.delay;window.setTimeout((function(D){return function(){D.timerStart()}})(this),C*1000)},start:function(C){this.forward=true;this.animate(C)},rewind:function(C){this.forward=false;this.animate(C)},cancel:function(){window.clearInterval(this._interval);this._interval=null;if(this.forward){this.runCallback("complete")}else{this.runCallback("completeRewind")}},reset:function(){this.element.style.cssText=this.initCSS},tween:function(){var D=++this._tick;var F=this.ticks;var C=this.forward;if(!C){D=F-D}var E=(C?F:0)==D;var G=this.transition(D/F,this.params);this.update(G,D,F);this.runCallback("tween",G);if(E){this.cancel()}},timerStart:function(){this._tick=0;window.clearInterval(this._interval);this._interval=window.setInterval((function(C){return function(){C.tween()}})(this),1000/this.params.fps);this.runCallback("start")},runCallback:function(C,D){this.params["on"+C].call(this,D);y5.fire("fx:"+C,this.element,D)}};b.prototype.defaultParams.transition=f.cubic;var a=b.Morph=function(C,D,E){this.morph={Type:{},Start:{},End:{}};this.Effect(C,D,E)};a.prototype={init:function(){var M=this.styles;var G=this.element;for(var C in M){C=y5.String.camelize(C);var H=q(C);this.morph.Type[C]=H;this.initProp(C,null,H,"Start");this.initProp(C,M[C],H,"End");switch(H){case z:var E=this.morph.Start[C];var F=E[0];var I=E[1];var D=this.morph.End[C][1];if(I!=D){var L=G.parentNode;var K=x.unit(F,I,L);var J=x.unit(K,D,L);this.morph.Start[C]=[J,D]}break}}},initProp:function(C,E,D,F){if(E===null){E=t.css(this.element,C)}switch(D){case z:E=d(this.element,C,E);break;case i:E=parseFloat(E||0);break;case m:if(["rgba(0, 0, 0, 0)","transparent"].indexOf(E)!=-1){E="#fff"}E=new A(E);break}this.morph[F][C]=E},update:function(G,C,F){var E=this.morph;for(var D in E.Start){this.updateProp(D,G,C,F)}},updateProp:function(E,H){var G=this.morph;var F=G.Type[E];var I=G.Start[E];var C=G.End[E];var D=null;switch(F){case z:D=(I[0]+(C[0]-I[0])*H).toFixed(0)+C[1];break;case i:D=I+(C-I)*H;break;case m:D=this.colorMorph(H,I,C);break}if(D!==null){t.css(this.element,E,D)}},colorMorph:function(F,H,D){var G=H.red+(D.red-H.red)*F;var E=H.green+(D.green-H.green)*F;var C=H.blue+(D.blue-H.blue)*F;return new A().set({red:G,green:E,blue:C}).get("rgb")}};y5.extend(a,b,"Effect");var h=b.Scale=function(C,D,E){this.scaleStyles=["width","height","fontSize","paddingTop","paddingRight","paddingBottom","paddingLeft","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"];this.Morph(C,D,E)};h.prototype={defaultParams:{scale:1.5},init:function(){this.scaleStyles.forEach(function(C){this.styles[C]=null},this);this.Morph.prototype.init.apply(this)},initProp:function(C,F,D,G){if(G=="End"&&this.scaleStyles.indexOf(C)!=-1){var E=this.morph.Start[C];this.morph.End[C]=[E[0]*this.params.scale,E[1]]}else{this.Morph.prototype.initProp.call(this,C,F,D,G)}}};y5.extend(h,a,"Morph");var c=b.Gray=function(C,D,E){this.colorStyles=["color","backgroundColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"];this.Morph(C,D,E)};c.prototype={init:function(){this.colorStyles.forEach(function(C){this.styles[C]=null},this);this.Morph.prototype.init.apply(this)},initProp:function(C,E,D,F){if(F=="End"&&this.colorStyles.indexOf(C)!=-1){this.morph.End[C]=this.morph.Start[C].gray()}else{this.Morph.prototype.initProp.call(this,C,E,D,F)}}};y5.extend(c,a,"Morph");var n=b.Invert=function(C,D,E){this.Gray(C,D,E)};n.prototype={initProp:function(C,E,D,F){if(F=="End"&&this.colorStyles.indexOf(C)!=-1){this.morph.End[C]=this.morph.Start[C].invert()}else{this.Morph.prototype.initProp.call(this,C,E,D,F)}}};y5.extend(n,c,"Gray");var p=b.Pulsate=function(C,D,E){this.Morph(C,D,E)};p.prototype={defaultParams:{pulses:5},init:function(){this.transition=function(){var E=this.params,D=this.ticks,C=this._tick;D/=E.pulses;C%=D;if(C*2>D){C=D-C}return E.transition(2*C/D,E)};this.Morph.prototype.init.apply(this)}};y5.extend(p,a,"Morph");var l=b.Highlight=function(C,D,E){this.Pulsate(C,D,E)};l.prototype={defaultParams:{pulses:1,duration:2},defaultStyles:{backgroundColor:"#ffcc00",color:"#000"}};y5.extend(l,p,"Pulsate");var v=b.Move=function(D,F,G){this.Morph(D,F,G);var E=this.morph;var H=E.Start;var C=E.End;this.startPoint=[H.left[0],H.top[0]];this.endPoint=[C.left[0],C.top[0]];this.controlPoints=this.params.controlPoints||[];this.leftUnit=C.left[1];this.topUnit=C.top[1];this.currentPoint=[0,0]};v.prototype={defaultStyles:{left:0,top:0},update:function(E,C,D){this.currentPoint=y.position(this.startPoint,this.endPoint,this.controlPoints,E);this.Morph.prototype.update.call(this,E,C,D)},updateProp:function(D,F,C,E){switch(D){case"left":this.element.style.left=this.currentPoint[0]+this.leftUnit;break;case"top":this.element.style.top=this.currentPoint[1]+this.topUnit;break;default:this.Morph.prototype.updateProp.call(this,D,F,C,E)}}};y5.extend(v,a,"Morph");var s=b.Shake=function(C,D,E){this.Morph(C,D,E)};s.prototype={defaultParams:{offsetX:5,offsetY:0,fps:15},defaultStyles:{left:null,top:null},updateProp:function(D,H,C,G){var I=this.params,F=this.morph,E=C==G;switch(D){case"left":I.offsetX=E?0:I.offsetX*-1;this.element.style.left=F.Start.left[0]+I.offsetX*H+"px";break;case"top":I.offsetY=E?0:I.offsetY*-1;this.element.style.top=F.Start.top[0]+I.offsetY*H+"px";break;default:this.Morph.prototype.updateProp.call(this,D,H,C,G)}}};y5.extend(s,a,"Morph");for(var B in b){j[B]=(function(C){return function(D,E,F){return new b[C](D,E,F)}})(B)}y5.loaded("Fx")});y5.require("Dom","Template",function(){y5.Widget={widgets:{},widgetsQuery:{},make:function(a,b,f){var g=this.getId(a);var d=this.getById(g);if(d){d.make(f)}else{if(this.widgetsQuery[g]){return a}this.widgetsQuery[g]=true;var c=[];if(y5.Types.element(a)){c=y5.Dom.children(a);y5.Dom.clearNode(a)}this.add(a,c,b,f)}return a},kill:function(a){var b=this.get(a);if(b){b.kill()}else{y5.Console.warn("Unknown widget: "+a,["y5.Widget"])}return this},get:function(a){return this.getById(this.getId(a))},getId:function(a){return y5.Types.string(a)?a:y5.Id.get(a)},getById:function(a){return this.widgets[a]||null},add:function(a,c,b,d){var g=this.getId(a),f=this;y5.require(b,function(){f.widgets[g]=new (y5.module(b).object)(a,c,d)})}};y5.Widget.Templates={templates:{},add:function(b,a,c){if(!this.templates[b]){this.templates[b]={}}this.templates[b][a]=c},get:function(b,a){try{return this.templates[b][a]}catch(c){return null}}};y5.Widget.Template=function(b,c,a){a=a||"default";this.frame="";this.body="";this.header="";this.footer="";if(c){c=y5.Widget.Templates.get(c,a);this.frame=c.frame;this.body=c.body;this.header=c.header;this.footer=c.footer}y5.Widget.Templates.add(b,a,this)};y5.Widget.Template.prototype={loadCSSModule:function(a){y5.Load.moduleStyle(a)},setFrame:function(a){this.setPart(a,"frame")},setBody:function(a){this.setPart(a,"body")},setHeader:function(a){this.setPart(a,"header")},setFooter:function(a){this.setPart(a,"footer")},setPart:function(a,b){if(y5.Types.element(a)){a=a.innerHTML}this[b]=a},getHTML:function(){return new y5.Template(this.frame).evaluate({content:this.header+this.body+this.footer})}};y5.loaded("Widget")});y5.require("Widget",function(){y5.Widget.Template.prototype.loadCSSModule=function(){}});y5.require(["Classes","Convert","cssQuery","Dom","Element","ObjectMove","Template","Widget"],function(){var h=function(){},n=y5.UNDEF,d=y5.Types,l=y5.Browser,i=y5.Dom,o=y5.Classes,b=y5.Element,j=y5.Widget,a="Widget.Window",c='<div class="y5-w-fakeframe"><iframe src="javascript:\'<body style=\\\'background:none\\\'>\'" frameborder="0"></iframe></div>';j.Window=function(p,q,r){this.init(p,q,r)};j.Window.prototype={classContainer:"y5-w-content",defaultParams:{text:null,modal:false,event:null,element:"y5:viewport",halign:"center",valign:"middle",relative:false,fixed:false,saveState:false,savePosition:false,className:null,template:"default"},toString:function(){return a},init:function(q,r,s){this.element=q;this.content=r;this.params={};this.window=null;this.events={};this.callbacks={};this.shortcuts={};this.isActive=false;var p;g.init();if(s.callbackContext){p=s.callbackContext;delete s.callbackContext}this.initParams=y5.copy(s);this.initParams.callbackContext=s.callbackContext=p;this.makeParams(s);this.create();this.make(s)},initOnce:function(){this.event("init");this.initOnce=h},box:function(q){var p=y5.Widget.Templates.get(this.toString(),this.params.template);return new y5.Template(p.getHTML()).evaluate(q)},create:function(){var q=this.params;var p="y5-w-window"+(this.className?" "+this.className:"")+(q.className?" "+q.className:"")+(q.modal?" y5-w-window-modal":"");this.window=b.create("div",{style:"position:absolute;left:-999em;",className:p});this.window.innerHTML=this.box();this.dragWindowInitOnce()},getContainerOnce:function(){this.container=y5.$$("."+this.classContainer,this.window)[0];this.getContainerOnce=h},getFooterOnce:function(){this.footer=y5.$$(".y5-w-buttons",this.window)[0];this.getFooterOnce=h},fillContainer:function(p){this.container.appendChild(this.params.saveState?p:p.cloneNode(true))},refreshContent:function(){if(this.params.text){this.container.innerHTML=y5.String.nl2br(y5.String.escapeHTML(this.params.text))}else{if(this.params.html){this.container.innerHTML=this.params.html}else{i.clearNode(this.container);this.content.forEach(this.fillContainer,this)}}},setContent:function(){this.getContainerOnce();try{this.refreshContent()}catch(p){y5.Console.error("Find container",[a])}},convertPosition:function(s,q,t,r){var p=0;if(s.indexOf("%")!=-1){p+=(t-r)*(parseFloat(s)/100)}else{if(s.indexOf("em")!=-1){p+=y5.Convert.unit(parseFloat(s)+"em","px",q)}else{p+=parseFloat(s)}}return parseInt(p,10)},getScrollX:function(){return(this.params.fixed?b.scroll(document.body).left:0)},getScrollY:function(){return(this.params.fixed?b.scroll(document.body).top:0)},getPosition:function(){var s=this.params;var r;var t,q;if(s.element=="y5:viewport"||s.element.tagName.toLowerCase()=="html"||s.element.tagName.toLowerCase()=="body"){r=document.body;var p=i.viewport();t=p.width;q=p.height}else{r=s.element;t=r.clientWidth||r.offsetWidth;q=r.clientHeight||r.offsetHeight}var u=b.offset(r),v=[u.left,u.top];v[0]+=this.convertPosition(s.halign,r,t,(s.relative?this.window.clientWidth:0));v[1]+=this.convertPosition(s.valign,r,q,(s.relative?this.window.clientHeight:0));return v},dragWindowInitOnce:function(){this.caption=y5.$$(".y5-w-titlebar",this.window)[0];if(this.caption){new y5.ObjectMove(this.caption,this.window,document);y5.on("y5:down",function(){o.add(this.window,"y5-w-window-moved")},this.caption,this);y5.on("y5:move",function(v,s,q){if(q.left<0){q.left=0}if(q.top<0){q.top=0}var p=i.viewport(),r=b.size(s),u=p.width-r.width,t=p.height-r.height;if(q.left>u){q.left=u}if(q.top>t){q.top=t}if(q.left!=this.X||q.top!=this.Y){this.X=q.left;this.Y=q.top;b.css(s,q)}},this.caption);y5.on("y5:up",function(){o.remove(this.window,"y5-w-window-moved")},this.caption,this)}this.dragWindowInitOnce=h},initPosition:function(){var w=this.getMoveTo(this.X,this.Y);var v=w[0];var u=w[1];var t=b.scroll(document.body).left;var r=b.scroll(document.body).top;if(v<t||u<r){var p=i.viewport();var s=Math.floor(v-p[0]*0.07);var q=Math.floor(u-p[1]*0.07);window.scrollTo(s,q)}this.moveTo(w,true)},setPosition:function(){this.moveTo(this.getMoveTo(this.X,this.Y),true)},getMoveTo:function(p,s){var q=this.params;if(typeof p!=n&&typeof s!=n){}else{if(q.event){p=q.event.pageX;s=q.event.pageY}else{var r=this.getPosition();p=r[0];s=r[1]}}return[p,s]},moveTo:function(s,p){var r=(s[0]+(p?this.getScrollX():0));var q=(s[1]+(p?this.getScrollY():0));this.window.style.left=r+"px";this.window.style.top=q+"px"},setZIndex:function(p){this.window.style.zIndex=p},setEventsOnce:function(){this.events.scroll=y5.on("scroll",this.setPosition,window,this,{add:false});var p=this.setPosition;if(y5.Browser.ie){p=(function(q){return function(){var r=document.documentElement,t=r.clientHeight*r.clientWidth,s=arguments.callee;if(s.area!=t){window.setTimeout(function(){q.setPosition()},10);s.area=t}}})(this)}this.events.resize=y5.on("resize",p,window,this,{add:false});this.setEventsOnce=h},enableEvents:function(){this.setEventsOnce();for(var p in this.events){this.events[p].enable()}},disableEvents:function(){for(var p in this.events){this.events[p].disable()}},event:function(r){var t=this.params,q="on"+r,p=t.callbackContext||this,s=t.callbackObject;if(d.func(t[q])){t[q].call(p,this)}if(s&&d.func(s[q])){s[q](this)}return y5.fire("y5:"+r,this.element,this)},action:function(q,p){q.stopPropagation();q.preventDefault();if(this.event(p)){this.kill()}},setCallBacksOnce:function(){this.callbacks.killAllWidgets=y5.on("y5:killAllWindows",this.kill,j,this);this.setCallBacksOnce=h},enableCallBacks:function(){this.setCallBacksOnce();for(var p in this.callbacks){this.callbacks[p].enable()}},disableCallBacks:function(){for(var p in this.callbacks){this.callbacks[p].disable()}},setShortcutsOnce:function(){this.setShortcutsOnce=h},enableShortcuts:function(){this.setShortcutsOnce();for(var p in this.shortcuts){this.shortcuts[p].enable()}},disableShortcuts:function(){for(var p in this.shortcuts){this.shortcuts[p].disable()}},makeParams:function(q){var p;if(q){p=q.callbackContext;q.callbackContext=null}this.params=y5.merge({},this.defaultParams,q);if(d.object(p)){this.params.callbackContext=p;q.callbackContext=p}this.normalizeParams()},normalizeParams:function(){var p=this.params;switch(p.halign){case"left":p.halign="0";break;case"center":p.halign="50%";break;case"right":p.halign="100%";break;default:p.halign=p.halign.toString();break}switch(p.valign){case"top":p.valign="0";break;case"middle":p.valign="50%";break;case"bottom":p.valign="100%";break;default:p.valign=p.valign.toString();break}},make:function(p){if(!this.isActive){this.makeParams(p);this.setContent();this.getFooterOnce();g.show(this,this.params.modal);this.initPosition();o.add(this.window,"y5-w-visible");this.enableEvents();this.enableShortcuts();this.enableCallBacks();this.initOnce();this.isActive=true;this.event("make")}this.event("activate")},kill:function(){o.remove(this.window,"y5-w-visible");g.hide(this,this.params.modal);this.disableEvents();this.disableShortcuts();this.disableCallBacks();this.isActive=false;this.event("kill");if(!this.params.savePosition){delete this.X;delete this.Y}},cleanup:function(){this.kill();this.element=null;this.content=null;this.window=null;this.events=null;this.callbacks=null;this.shortcuts=null}};if(l.gecko&&l.version<1.9){var m=j.Window.prototype;m.createOld=m.create;m.create=function(){this.createOld();this.window.style.cssText="position:fixed"};m.getScrollX=function(){return(this.params.fixed?0:-b.scroll(document.body).left)};m.getScrollY=function(){return(this.params.fixed?0:-b.scroll(document.body).top)}}var g={containerView:null,modalLayer:null,opens:[],init:function(){this.initOnce()},initOnce:function(){this.html=document.documentElement;this.body=document.body;this.box=y5.$("y5-w-window-box")||this.body;this.containerView=b.create("div",{className:"y5-w-window-view",style:"visibility:visible; position:absolute; left:0; top:0; width:100%; height:0; z-index:999999"});this.box.insertBefore(this.containerView,this.box.firstChild);this.initOnce=h},showBase:function(q,p){if(p){this.createModalLayerOnce(q,p);this.containerView.appendChild(this.modalLayer);this.modalLayer.style.display=""}},show:function(q,p){q.window.style.display="";this.showBase(q,p);this.addOpen(q);this.containerView.appendChild(q.window)},hideBase:function(){for(var p=this.opens.length-1;p>-1;p--){if(this.opens[p].params.modal){this.containerView.insertBefore(this.modalLayer,this.opens[p].window);return}}if(this.modalLayer){this.modalLayer.style.display="none"}},hide:function(p){p.window.style.left="-999em";this.removeOpen(p);this.hideBase(p)},createModalLayerElement:function(p){this.modalLayer=b.create("div",{className:"y5-w-modal",style:p});y5.on("click",function(q){q.stopPropagation()},this.modalLayer);if((l.ie&&l.version<7)||(l.os=="linux"&&l.gecko)){this.modalLayer.appendChild(b.create(c))}this.containerView.appendChild(this.modalLayer)},createModalLayerOnce:function(){this.createModalLayerElement("position:fixed; display:none; left:0; top:0; width:100%; height:100%");this.createModalLayerOnce=h},addOpen:function(p){var q=0;this.opens.forEach(function(r){r.setZIndex(q++);r.disableShortcuts()});this.opens.push(p);if(p.params.modal){this.modalLayer.style.zIndex=q++}p.setZIndex(q)},removeOpen:function(s){var t=this.opens;var r=t.lastIndexOf(s);t.splice(r,1);var p=t.length;if(p){t[p-1].enableShortcuts()}var v=0;t.forEach(function(w){w.setZIndex(v++)});if(s.params.modal){var u=false;for(var q=t.length-1;q>=0;q--){if(t[q].params.modal){t[q].setZIndex(q+1);this.modalLayer.style.zIndex=q;u=true;break}}if(!u){this.modalLayer.style.zIndex=-1}}}};if(l.ie){g.createModalLayerOnce=function(){this.createModalLayerElement("position:absolute; display:none");this.createModalLayerOnce=h}}if(!j.Templates.get(a,"default")){var k=new j.Template(a,null,"default");k.loadCSSModule(a);var f='<div class="y5-w-frame">${content}</div>';if(!(l.opera&&y5.Browser.version<9)){f+='<div class="y5-w-shadow"></div><div class="y5-w-shadow y5-w-shadow2"></div>'}if((l.ie&&l.version<7)||(l.os=="linux"&&l.gecko)){f+=c}k.setFrame(f);k.setBody('<div class="y5-w-content"></div>')}y5.loaded("Widget.Window")});y5.require(["Dom","Shortcut","Template","Widget.Window"],function(){var b="Widget.Popup";y5.Widget.Popup=function(c,d,f){this.Window(c,d,f)};y5.Widget.Popup.prototype={className:"y5-w-popup",defaultParams:{halign:"left",valign:"bottom",showCaption:false,title:""},toString:function(){return b},cancel:function(c){this.action(c,"cancel")},setEventsOnce:function(){this.button_close=y5.$$(".y5-w-closebutton",this.window)[0];if(this.button_close){this.events.close=y5.on("click",this.cancel,this.button_close,this,{add:false})}this.events.hide_click=new y5.on("mousedown",this.hide_click,document,this,{add:false});this.Window.prototype.setEventsOnce.apply(this)},hide_click:function(d){var c=d.target;while(c){if(c===this.window){return}c=c.parentNode}this.kill()},setShortcutsOnce:function(){this.shortcuts.esc=y5.Shortcut.down([{key:y5.Shortcut.ESC}],this.esc,document,this,{checkTarget:false});this.Window.prototype.setShortcutsOnce.apply(this)},esc:function(c){this.action(c,"esc")}};y5.extend(y5.Widget.Popup,y5.Widget.Window,"Window");if(!y5.Widget.Templates.get(b,"default")){var a=new y5.Widget.Template(b,"Widget.Window","default");a.loadCSSModule(b)}y5.loaded(b)});y5.require(["Classes","Dom","Element","Shortcut","Widget.Popup"],function(){var f=y5.Dom,c=y5.Classes,a=y5.Shortcut,b=y5.Element,g="Widget.Menu";y5.Widget.Menu=function(h,i,j){this.initMenu(h,[],j)};y5.Widget.Menu.prototype={className:"y5-w-menu",classNameItem:"y5-w-menu-item",defaultParams:{saveState:true,overrideTabs:true},toString:function(){return g},initMenu:function(h,i,j){this.uid=y5.Id.generate();this.ids={};this.elements={};this.clear();this.MenuBase(h,i,j)},make:function(h){this.MenuBase.prototype.make.apply(this,[h]);this.refresh()},clear:function(){var h;this.items=[];this.content=[];this.counter=0;this.activeItem=null;this.activeLast=null;for(h in this.elements){delete this.elements[h]}for(h in this.ids){delete this.ids[h]}if(this.eventsOver){this.eventsOver.forEach(function(i){i.disable()})}this.eventsOver=[];if(this.container){f.clearNode(this.container)}},refresh:function(){var h;if(this.activeLast){h=this.getElement(this.activeLast);if(h){c.remove(h,"y5-w-menu-item-active")}}if(this.activeItem){h=this.getElement(this.activeItem);c.add(h,"y5-w-menu-item-active")}},getUid:function(){return this.uid+"_"+this.counter++},setActiveItem:function(i){this.activeLast=this.activeItem;var h=this.getItem(i);if(!h||h.disabled){this.activeItem=this.getNextId(i)}else{this.activeItem=i}y5.fire("y5:activeItem",this.element,this)},getFirstId:function(){for(var j=0,h=this.items.length;j<h;j++){if(!this.items[j].disabled){return this.items[j].id}}return null},getLastId:function(){for(var h=this.items.length-1;h>=0;h--){if(!this.items[h].disabled){return this.items[h].id}}return null},getPrevId:function(k){var h,j=false;for(h=this.items.length-1;h>=0;h--){if(j){if(!this.items[h].disabled){return this.items[h].id}continue}if(this.items[h].id==k){j=true}}if(!j){return null}for(h=this.items.length-1;h>=0;h--){if(!this.items[h].disabled){return this.items[h].id}}return null},getNextId:function(m){if(m==null){return this.getFirstId()}var j,h,k=false;for(j=0,h=this.items.length;j<h;j++){if(k){if(!this.items[j].disabled){return this.items[j].id}continue}if(this.items[j].id==m){k=true}}if(!k){return null}for(j=0,h=this.items.length;j<h;j++){if(!this.items[j].disabled){return this.items[j].id}}return null},getItem:function(h){return this.items[this.elements[h]]},getElement:function(i){var h=this.getItem(i);if(h){return y5.$(h.uid)}return null},newItem:function(k){var h=this.getUid();k.uid=h;var m=k.id||h;k.id=m;if(y5.Types.def(this.elements[m])){return null}var l=b.create("div",{id:h,className:this.classNameItem});if(k.className){c.add(l,k.className)}var j=b.create("a",{href:k.href||""});if(k.html){j.innerHTML=k.html}else{j.appendChild(document.createTextNode(k.label))}l.appendChild(j);var i=this.items.push(k);this.elements[m]=i-1;this.ids[h]=m;if(k.disabled){c.add(l,"y5-w-menu-item-disabled")}return l},newSeparator:function(j){var h=this.getUid();var i=b.create("div",{id:h,className:"y5-w-menu-separator"});this.elements[j||h]=0;return i},setItemContent:function(j,i){if(j){var h=this.container.appendChild(j);this.content.push(h);if(i){this.eventsOver.push(y5.on("mouseover",function(k){k.preventDefault();this.selectItem(this.ids[j.id])},h,this))}}},setItems:function(h){this.clear();h.map(function(i){return this.newItem(i)},this).forEach(function(i){this.setItemContent(i,true)},this)},addItem:function(h){this.setItemContent(this.newItem(h),true)},addSeparator:function(h){this.setItemContent(this.newSeparator(h))},actionItem:function(n,m){for(var j=0,h=this.items.length;j<h;j++){var k=this.items[j];if(k.id==n){m.apply(this,[k,j]);break}}this.refresh()},removeItem:function(j){function i(l,k){if(this.activeItem==l.id){this.setActiveItem(this.getNextId(l.id))}this.items.splice(k,1);this.content.splice(k,1);for(var m in this.elements){if(this.elements[m]>k){this.elements[m]--}}}this.container.removeChild(this.getElement(j));var h=this.elements[j];delete this.ids[h];delete this.elements[j];this.actionItem(j,i)},disableItem:function(i){function h(j){if(this.activeItem==j.id){this.setActiveItem(this.getNextId(j.id))}c.add(this.getElement(j.id),"y5-w-menu-item-disabled");j.disabled=true}this.actionItem(i,h)},enableItem:function(i){function h(j){c.remove(this.getElement(j.id),"y5-w-menu-item-disabled");j.disabled=false}this.actionItem(i,h)},selectItem:function(h){this.setActiveItem(h);this.refresh()},selectFirstItem:function(){this.selectItem(this.getFirstId())},setCallBacksOnce:function(){["addItem","addSeparator","removeItem","disableItem","enableItem","selectItem","setItems","selectFirstItem","clear"].forEach(function(h){this.callbacks[h]=y5.on("y5:"+h,this[h],this.element,this)},this);this.Window.prototype.setCallBacksOnce.apply(this)},setEventsOnce:function(){this.events.click=y5.on("click",this.clickItem,this.window,this);this.MenuBase.prototype.setEventsOnce.apply(this)},clickItem:function(h){h.stopPropagation();h.preventDefault();this.goItem(h,this.findIdByElement(h.target))},goItem:function(j,k){var h=this.getItem(k);if(h){var i=h.listener;if(i){if(i(this,j)){this.kill()}}else{this.kill();window.location.href=h.href}}},findIdByElement:function(h){var i=f.parent(h,"*",this.classNameItem);if(i){return this.ids[i.id]}return null},setShortcutsOnce:function(){var h=document,i={checkTarget:false};this.shortcuts.enter=a.down("enter",this.keyItemEnter,h,this,i);this.shortcuts.home=a.down("home",this.keyItemHome,h,this,i);this.shortcuts.end=a.down("end",this.keyItemEnd,h,this,i);this.shortcuts.down=a.press("down",this.keyItemDown,h,this,i);this.shortcuts.up=a.press("up",this.keyItemUp,h,this,i);if(this.params.overrideTabs){this.shortcuts.tabdown=a.press("tab",this.keyItemDown,h,this,i);this.shortcuts.tabup=a.press("shift+tab",this.keyItemUp,h,this,i)}else{this.shortcuts.tab=a.press(["shift+tab","tab"],this.keyItemTab,h,this,i)}this.MenuBase.prototype.setShortcutsOnce.apply(this)},keyItem:function(h,i){h.preventDefault();h.stopPropagation();this.selectItem(i)},keyItemEnter:function(h){h.stopPropagation();h.preventDefault();this.goItem(h,this.activeItem)},keyItemTab:function(h){if(!this.activeItem){this.kill()}else{this.goItem(h,this.activeItem)}},keyItemDown:function(h){this.keyItem(h,this.getNextId(this.activeItem))},keyItemUp:function(h){this.keyItem(h,this.getPrevId(this.activeItem))},keyItemHome:function(h){try{this.keyItem(h,this.getFirstId())}catch(h){}},keyItemEnd:function(h){try{this.keyItem(h,this.getLastId())}catch(h){}}};y5.extend(y5.Widget.Menu,y5.Widget.Popup,"MenuBase");if(!y5.Widget.Templates.get(g,"default")){var d=new y5.Widget.Template(g,"Widget.Window","default");d.loadCSSModule(g)}y5.loaded(g)});y5.require("Element","Input","Shortcut","String","Widget.Menu",function(){var a=y5.Element,c=y5.Types,b=y5.Widget;y5.Suggest=function(d,f,g){g=c.object(g)?g:{};this.widgetParams=g;this.widgetParams.element=d;this.widgetParams.saveState=false;this.input=d;a.attributes(d,"autocomplete","off");this.defaultSelect=g.defaultSelect?g.defaultSelect:false;this.CI=c.def(g.ci)?g.ci:true;this.finder=f;this.popup=y5.Id.generate();this.result=null;this.menuListener=(function(h){return function(){h.processSelect.apply(h,arguments);return true}})(this);this.enterListener=y5.Shortcut.press("ENTER",function(h){h.preventDefault()},d,this,{add:false,checkTarget:false});this.inputObserver=new y5.Input(d,true);y5.on("y5:valueChanged",this.onInputChange,d,this);y5.on("y5:Suggest:onData",this.onData,d,this);y5.on("y5:esc",this.esc,this.popup,this);y5.on("y5:activate",this.activate,this.popup,this);y5.on("y5:make",function(h){this.selectProcessed=false;a.css(h.container,"width",d.offsetWidth)},this.popup,this);y5.on("y5:kill",function(){window.setTimeout((function(h){return function(){h.enterListener.disable()}})(this),10);if(!this.blockSelectActiveItem&&this.defaultSelect&&!this.selectProcessed&&this.activeItem){this.selectActiveItem()}this.activeItem=null;y5.fire("y5:Suggest:close",this.input)},this.popup,this);y5.on("y5:activeItem",function(h){this.activeItem=h.activeItem},this.popup,this)};y5.Suggest.prototype={selectActiveItem:function(){var h=this.result.elements,d,f=h.length,g=0;for(;g<f;g++){d=h[g];if(d.id==this.activeItem){this.select(d);break}}},onInputChange:function(){this.result=this.finder.process(this.input.value);if(this.result){this.show()}},onData:function(f){var d=this.input.value;if(this.CI){d=d.toLowerCase()}if(d==f.query){this.result=f;this.show()}},show:function(){if(this.result.elements.length>0){this.enterListener.enable();b.make(this.popup,"Widget.Menu",this.widgetParams);y5.fire("y5:Suggest:open",this.input)}else{this.closeWidget();y5.fire("y5:Suggest:noresult",this.input)}},esc:function(){this.blockSelectActiveItem=true;this.closeWidget();this.blockSelectActiveItem=false},closeWidget:function(){b.kill(this.popup)},processSelect:function(){this.selectProcessed=true;this.selectActiveItem()},select:function(f,h){var d=f.value||f.html||f.label,g=f.id;this.input.value=d;this.inputObserver.saveState();y5.fire("y5:Suggest:select",this.input,g,d,h,f)},activate:function(){var h=this.result.elements;if(h.length==1&&y5.String.compare(h[0].value,this.input.value,this.CI)===0){this.selectProcessed=true;this.select(this.result.elements[0],true);this.closeWidget()}else{var f=[],k,j=h.length,g=0,l=this.result.tokens,d=false;if(c.def(l)){if(c.string(l)){l=new RegExp(y5.String.escapeRegexp(l),"gi")}else{if(c.array(l)){l=new RegExp(l.join("|"),"gi")}else{if(!c.regexp(l)){l=null}}}}d=c.regexp(l);for(;g<j;g++){k=h[g];if(d&&!k.html){k.html=k.value.replace(l,"<strong>$&</strong>")}else{if(!k.label&&!k.html){k.label=k.value}}k.listener=this.menuListener;f[g]=k}y5.fire("y5:setItems",this.popup,f);if(this.defaultSelect){y5.fire("y5:selectFirstItem",this.popup)}}this.input.focus()},enable:function(){this.inputObserver.enable();return this},disable:function(){this.inputObserver.disable();return this}};y5.loaded("Suggest")});y5.require(["cssQuery","ObjectMove"],function(){var a=y5.$$;y5.Components.Slider=function(b,c){this.slider=b;this.isVertical=(c.orientation!="horizontal");this.scrollSize=parseInt(c.scrollSize);if(isNaN(this.scrollSize)){this.scrollSize=1}this.startIndex=0;this.index=null;this.coefficient=1;this.values=this.getValuesFromParams(c);this.button=a(".y5-Slider-Button",this.slider)[0]||null;this.scale=a(".y5-Slider-Scale",this.slider)[0];this.grab=a(".y5-Slider-Grab",this.slider)[0];this.hidden=a(".y5-Slider-Hidden",this.slider)[0];this.plus=a(".y5-Slider-Plus",this.slider)[0]||null;this.minus=a(".y5-Slider-Minus",this.slider)[0]||null;this.cachePlusMinus();this.setMouseListeners();function d(f){this.setIndex(this.getIndexFromValue(f))}y5.on("y5:Slider:set",d,this.slider,this);this.setIndex(this.getIndexFromValue(c.value));this.grab.style.visibility="visible"};y5.Components.Slider.prototype=new function(){this.getValuesFromParams=function(f){if(f.values){return f.values}if(f.range){var d=f.step||1;while(Math.abs(d)<1){this.coefficient*=10;d*=10}var c=f.range[0]*this.coefficient;var b=f.range[1]*this.coefficient;var g=[];while(c<b){g[g.length]=c;c+=d}g[g.length]=b;return g}return null};this.cachePlusMinus=function(){if(this.plus==null||this.minus==null){return}this.processPlusMinusIcons("plus");this.processPlusMinusIcons("minus")};this.processPlusMinusIcons=function(c){y5.on("error",function(f,d){d.src=this[c+"Src"]},this[c],this);this[c+"Src"]=this[c].src;this[c+"SrcDisabled"]=this[c].src.replace(/\.([a-zA-Z]*)$/,"-disabled.$1");var b=document.createElement("img");y5.on("error",function(){this[c+"SrcDisabled"]=this[c+"Src"]},b,this);b.src=this[c+"SrcDisabled"]};this.countSliderParams=function(){this.scaleOffset=y5.Element.offset(this.scale);if(this.isVertical){this.grabSize=this.grab.offsetHeight;this.scaleSize=this.scale.offsetHeight;this.scaleOffset=this.scaleOffset.top}else{this.grabSize=this.grab.offsetWidth;this.scaleSize=this.scale.offsetWidth;this.scaleOffset=this.scaleOffset.left}this.maxIndex=this.values?this.values.length-1:this.scaleSize;this.step=this.scaleSize/this.maxIndex};this.setMouseListeners=function(){new y5.ObjectMove(this.grab,this.grab,this.scale);y5.on("y5:down",this.start,this.grab,this);y5.on("y5:move",function(d,c,b){this.move(b)},this.grab,this);y5.on("y5:up",this.stop,this.grab,this);this.clickListener=y5.on("click",this.click,this.scale,this);if(this.plus){y5.on("click",function(b){b.preventDefault();this.setIndex(this.index+1)},this.plus,this)}if(this.minus){y5.on("click",function(b){b.preventDefault();this.setIndex(this.index-1)},this.minus,this)}y5.on("DOMMouseScroll",this.scroll,this.scale,this)};this.cropIndex=function(b){return Math.max(0,Math.min(this.maxIndex,b))};this.getValueFromIndex=function(b){return this.values?this.values[b]/this.coefficient:b};this.saveValueToHidden=function(b){if(this.hidden){this.hidden.value=this.getValueFromIndex(b)}};this.getIndexFromValue=function(c){if(typeof(c)==y5.UNDEF||c===null){c=this.hidden.value}c*=this.coefficient;var b=this.values?this.values.indexOf(c):c;return b!=-1?b:0};this.setValueFromIndex=function(b){b=this.cropIndex(b);if(this.index==b){return false}this.enableDisableIMG("plus",(b==this.maxIndex));this.enableDisableIMG("minus",(b==0));if(this.isVertical){this.grab.style.top=(this.scaleSize-this.grabSize)-this.getOffsetFromIndex(b)+"px"}else{this.grab.style.left=this.getOffsetFromIndex(b)+"px"}this.index=b;this.saveValueToHidden(this.index);return true};this.getOffsetFromIndex=function(b){return((b!=this.maxIndex?Math.round(b*this.step):this.scaleSize)-this.grabSize/2)};this.countIndexFromOffset=function(b){return Math.round(b/this.step)};this.moveToIndex=function(b){if(this.setValueFromIndex(b)){y5.fire("y5:Slider:move",this.slider,this.getValueFromIndex(this.index))}};this.setIndex=function(b){this.start();this.moveToIndex(b);this.stop()};this.move=function(b){b.top=b.top+this.grabSize/2;b.left=b.left+this.grabSize/2;var c=this.countIndexFromOffset(this.isVertical?this.scaleSize-b.top:b.left);this.moveToIndex(c)};this.start=function(){this.clickListener.disable();this.countSliderParams();this.startIndex=this.index};this.stop=function(){if(this.startIndex!=this.index){y5.fire("y5:Slider:change",this.slider,this.getValueFromIndex(this.index));this.startIndex=this.index}window.setTimeout(function(b){return function(){b.clickListener.enable()}}(this),10)};this.click=function(b){this.move({left:b.pageX-this.scaleOffset-this.grabSize/2,top:b.pageY-this.scaleOffset-this.grabSize/2});this.stop()};this.scroll=function(b){if(b.scrollDetail==0){return}b.preventDefault();if(this.scrollSize==0){this.setIndex(this.index-b.scrollDetail)}else{if(b.scrollDetail<0){this.setIndex(this.index+this.scrollSize)}else{this.setIndex(this.index-this.scrollSize)}}};this.enableDisableIMG=function(c,b){if(!this[c]){return}this[c].src=b?this[c+"SrcDisabled"]:this[c+"Src"]}};y5.loaded("Components.Slider")});