try{undefined}catch(e){window.undefined=void 0}try{if(!document.getElementsByTagName("head")[0]){document.getElementsByTagName("html")[0].appendChild(document.createElement("head"))}}catch(e){}(function(){var F=Function.prototype;if(!F.apply){var ac=0;F.apply=function(c,a){var n="__y5_apply__"+(ac++)+"__",r;c=c||window;c[n]=this;switch((a||[]).length){case 0:r=c[n]();break;case 1:r=c[n](a[0]);break;case 2:r=c[n](a[0],a[1]);break;case 3:r=c[n](a[0],a[1],a[2]);break;default:var af=[];if(a){var l=a.length;af=new Array(l);for(var i=0;i=u;w--){this[w+x]=this[w]}for(w=0,u=x;w2){var u;var s=this.slice(z);this.length=z;for(w=2,u=v.length;w>>0;var u=Number(arguments[1])||0;u=(u<0)?Math.ceil(u):Math.floor(u);if(u<0){u+=s}for(;u=s){u=s-1}}}for(;u>-1;u--){if(u in this&&this[u]===t){return u}}return -1},every:function(t){var s=this.length>>>0;if(typeof t!="function"){throw new TypeError()}var v=arguments[1];for(var u=0;u>>0;if(typeof t!="function"){throw new TypeError()}var w=new Array();var v=arguments[1];for(var u=0;u>>0;if(typeof t!="function"){throw new TypeError()}var v=arguments[1];for(var u=0;u>>0;if(typeof t!="function"){throw new TypeError()}var w=new Array(s);var v=arguments[1];for(var u=0;u>>0;if(typeof t!="function"){throw new TypeError()}var u=arguments[1];for(;v>>0;if(typeof t!="function"){throw new TypeError()}if(s==0&&arguments.length==1){throw new TypeError()}var u=0;if(arguments.length>=2){var v=arguments[1]}else{do{if(u in this){v=this[u++];break}if(++u>=s){throw new TypeError()}}while(true)}for(;u>>0;if(typeof t!="function"){throw new TypeError()}if(s==0&&arguments.length==1){throw new TypeError()}var u=s-1;if(arguments.length>=2){var v=arguments[1]}else{do{if(u in this){v=this[u--];break}if(--u<0){throw new TypeError()}}while(true)}for(;u>=0;u--){if(u in this){v=t.call(null,v,this[u],u,this)}}return v}};for(var b in i){if(!h[b]){h[b]=i[b]}}(function(){var s=function(v,t,u){var w=t[u];if(typeof w!="function"&&v[u]){return false}v[u]=function(){return w.call.apply(w,arguments)};return v[u]};["every","filter","forEach","indexOf","lastIndexOf","map","reduce","reduceRight","some"].forEach(function(t){s(Array,Array.prototype,t)})})();var d=String.prototype,q="";if(q.indexOf(q)!=0){d.indexOfBug=d.indexOf;d.indexOf=function(s){if(this.toString()==q&&s===q){return 0}return this.indexOfBug(s)};d.lastIndexOfBug=d.lastIndexOf;d.lastIndexOf=function(s){var t=this.lastIndexOfBug(s);if(s===q){t++}return t}}if(q.replace(/^/,String)){var p=/(g|gi)$/,c=d.replace;d.replace=function(y,v){if(typeof v=="function"){var x,w,u,t=this,s=q;if(y&&y.constructor==RegExp){x=y;w=x.global;if(w==null){w=p.test(x)}if(w){x=new RegExp(x.source)}}else{x=new RegExp(rescape(y))}while(t&&(u=x.exec(t))){s+=t.slice(0,u.index)+v.apply(this,u);t=t.slice(u.index+u[0].length);if(!w){break}}return s+t}return c.apply(this,arguments)}}var r=String.fromCharCode;if(!d.charCodeAt){d.charCodeAt=function(A){var w=0,y=escape(this).match(/(%[\da-fA-F]{2}|%u[\da-fA-F]{4}|.)/g);for(var z=0,v=y.length;z1){B=(x+u)>>1;s=r(B);if(s>t){x=B}else{if(s>4]+k[s&15]}function g(t,u){t=t.toString().replace(/\r\n/g,"\n");var v="",y,x=0,w=t.length,s="!'()*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~";if(u){s+="#$&+,-/:;=?@"}for(;x127)&&(y<2048)){v+=escape(r((y>>6)|192)+r((y&63)|128))}else{v+=escape(r((y>>12)|224)+r(((y>>6)&63)|128)+r((y&63)|128))}}}return v}window.encodeURIComponent=g;window.encodeURI=function(s){return g(s,true)}}if(!window.decodeURIComponent){var n=6,m=2,j=14,a="malformed URI sequence";function l(y){y=unescape(y.toString());var t="",A=y.length,v=0,x,z=0,w=0,u=0;while(v191)&&(z<224)){w=y.charCodeAt(v+1);if(!((z>>5)==n&&(w>>6)==m)){throw a}x=r(((z&31)<<6)|(w&63));v+=2}else{w=y.charCodeAt(v+1);u=y.charCodeAt(v+2);if(!((z>>4)==j&&(w>>6)==m&&(u>>6)==m)){throw a}x=r(((z&15)<<12)|((w&63)<<6)|(u&63));v+=3}}t+=x}return t}window.decodeURIComponent=window.decodeURI=l}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(t,s){Node[t+"_NODE"]=s+1})}})();var y5=(function(){var o={},c=[],E={},i=/^(\{([^\}]+)\}\.|([^:]+):)?(.+)$/,D={},k="y5",u=[],B=document.getElementsByTagName("script"),y,g,w;function F(I){if(typeof I=="function"){I()}}function b(I){return !!o[I]}function d(I){return !o[I]}function m(I){return I.every(b)}function A(K){for(var J=0,I=c.length;J=0){var N={path:O.substring(0,O.lastIndexOf("/")+1),charset:P||J.getAttribute("charset")||"utf-8"};var M=O.lastIndexOf("?");if(M>=0){N.query=O.substring(M,O.length)}return N}}return null}function z(I,J,K){if(typeof J=="string"){J={path:J,charset:K}}if(J.path.lastIndexOf("/")!=J.path.length-1){J.path+="/"}if(!J.charset){J.charset="utf-8"}if(!J.query){J.query=""}t(I,J)}function n(J,I){try{return D[J][I]}catch(K){return null}}var r={version:1.5,domloaded:false,require:function(){var L=arguments,K=[],O=y5.VOID,N=y5.Types;for(var M=0,J=L.length;M4.9;a.is_ie55up=a.ie_ver>5.4;a.is_ie6up=a.ie_ver>5.9;a.is_ie7up=a.ie_ver>6.9;a.is_ie6down=a.is_ie&&a.ie_ver<6;a.is_ie7down=a.is_ie&&a.ie_ver<7;a.is_ie8down=a.is_ie&&a.ie_ver<8;a.is_ie8=a.is_ie&&a.ie_ver==8;a.cookieEnabled=d.cookieEnabled;return a}};(function(){var b;var a=y5.Browser.get(window.navigator);for(b in a){y5.Vars[b]=a[b]}for(b in y5.Vars){y5[b]=y5.Vars[b]}})();y5.Loader=(function(){function b(i,h){for(var j in h){var k=h[j];if(k){i.setAttribute(j,k)}}}function g(h,i){h.insertBefore(i,h.firstChild)}var d;if(y5.is_opera&&y5.opera_ver<8){d=function(i,h){if(!document.body){return null}var k=document.createElement("span");k.style.display="none";k.innerHTML="<"+i+">";var j=k.getElementsByTagName(i).item(0);b(j,h);g(document.body,k);return j}}else{var c=document.getElementsByTagName("head")[0];d=function(i,h){var j=document.createElement(i);b(j,h);g(c,j);return j}}function a(i,l){var j=10,k=null;function h(){if(!--j){window.clearTimeout(k);return false}var m=d("script",i);if(m){if(typeof l=="function"){l(m)}window.clearTimeout(k);return true}return false}if(!h()){k=window.setInterval(h,10)}}return{loadScript:function(h,k,j,i){a({src:h,charset:k,type:"text/javascript",id:i},j)},loadObject:d}})();y5.Scripts={createScript:function(a,c,b){y5.Loader.loadScript(a,c,b)}};(function(){var a=y5.VOID;y5.Console={log:a,info:a,warn:a,error:a,trace:a,dir:a,dirxml:a,group:a,groupEnd:a}})();y5.Exception=function(c,g,b){if(!y5.DEBUG){return true}var a="y5."+b+"."+g+": "+c;var d=new Error(a);if(d.stack){d.message+="\nStack:\t"+d.stack.replace(/\n/ig,"\n\t")}return d};y5.Exception.prototype=new Error();(function(){var b=y5.UNDEF;function a(d,c){return(d&&d.nodeType&&d.nodeType==c)||false}y5.Types={UNDEF:1<<0,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(d){var c=this.TYPES[typeof d];if(d===null){return this.NULL}if(c==this.OBJECT){if(d.nodeName||this.document(d)){return this.NODE}}if(c==this.OBJECT||c==this.FUNCTION){switch(d.constructor){case Array:return this.ARRAY;case RegExp:return this.REGEXP;case Date:return this.DATE}}if(this.event(d)){return this.EVENT}return c},test:function(d,c){return !!(this.type(d)&c)},def:function(c){return typeof c!=b},undef:function(c){return typeof c==b},object:function(c){return typeof c=="object"},func:function(c){return typeof c=="function"},number:function(c){return typeof c=="number"},string:function(c){return typeof c=="string"},bool:function(c){return typeof c=="boolean"},nul:function(c){return c===null},array:function(c){return c instanceof Array},regexp:function(c){return c instanceof RegExp},date:function(c){return c instanceof Date},event:function(c){return c&&typeof c.type!=b&&typeof(c.stopPropagation||c.cancelBubble)!=b},element:function(c){return a(c,Node.ELEMENT_NODE)},attribute:function(c){return a(c,Node.ATTRIBUTE_NODE)},text:function(c){return a(c,Node.TEXT_NODE)},document:function(c){return(c&&typeof c.documentElement!=b)||false},comment:function(c){return a(c,Node.COMMENT_NODE)},node:function(c){return(c&&typeof c.nodeType!=b)}}})();y5.GC={data:[],collect:function(a){this.data.push(a);return a},remove:function(b){var a=this.data.indexOf(b);if(a!=-1){this.destruct(a);this.data.splice(a,1)}},destruct:function(a){var b=this.data[a];if(b){if(typeof b.cleanup=="function"){b.cleanup()}else{if(typeof b.destruct=="function"){b.destruct()}}}this.data[a]=null},cleanup:function(){for(var a=this.data.length-1;a>=0;a--){this.destruct(a)}this.data.length=0;if(y5.is_ie&&CollectGarbage){CollectGarbage()}}};(function(){var t=y5.Types,r=y5.UNDEF,s=y5.GC;function q(A,z,C,B){return(z?A.call(z,C,B):A(C,B))}var v="DOMAttrModified",d="propertychange",i="DOMMouseScroll",u="mousewheel",a={};if(document.attachEvent){a[v]=d}else{a[d]=v}if(y5.is_ie||y5.is_opera||y5.is_safari){a[i]=u}else{a[u]=i}function n(z){return a[z]||z}var x,w={L:[0,65535],M:[1],R:[2]};if(y5.is_ie){function o(){this.returnValue=false}function h(){this.cancelBubble=true}x=function(B){B.timeStamp=new Date().getTime();B.charCode=B.type=="keypress"?B.keyCode:0;B.isChar=B.charCode>0;B.target=B.srcElement;B.metaKey=B.altKey;B.attrName=B.propertyName=="className"?"class":B.propertyName;B.preventDefault=o;B.stopPropagation=h;var A=document.documentElement,z=document.body;B.pageX=B.clientX+(A.scrollLeft||z.scrollLeft);B.pageY=B.clientY+(A.scrollTop||z.scrollTop);switch(B.type){case"mouseout":B.relatedTarget=B.toElement;break;case"mouseover":B.relatedTarget=B.fromElement;break}B.scrollDetail=0;if(B.wheelDelta){B.scrollDetail=-B.wheelDelta/40}}}else{if(y5.is_safari){w={L:[0,65535,1],M:[2],R:[3]};x=function(z){if(!t.func(z.preventDefault)){z.preventDefault=y5.NULL}if(!t.func(z.stopPropagation)){z.stopPropagation=y5.NULL}if(z.target&&(z.target.nodeType==3||z.target.nodeType==4)){z.target=z.target.parentNode}if(z.wheelDelta){z.scrollDetail=-z.wheelDelta/400}}}else{if(y5.is_opera){x=function(z){z.scrollDetail=0;if(z.wheelDelta){z.scrollDetail=z.wheelDelta/40}if(y5.opera_ver>=9.2){z.scrollDetail*=-1}};if(y5.opera_ver<8){w={L:[1],M:[2],R:[3]}}}else{x=function(z){try{z.scrollDetail=z.detail}catch(z){}}}}}if(y5.is_ie||y5.is_konq){w={L:[1],M:[4],R:[2]}}function k(A){var z;try{z=A.button}catch(A){}if(typeof z!=r){A.buttonL=w.L.indexOf(z)!=-1;A.buttonM=w.M.indexOf(z)!=-1;A.buttonR=w.R.indexOf(z)!=-1}else{A.buttonL=A.buttonM=A.buttonR=false}x(A);return A}y5.AEventListener=function(C,D,B,E,A,z){this.type=n(C);this.element=B||document;this.blocked=false;this.added=false;this.runOnce=z||false;var F=this;this.listener=function(G){var H=typeof G!=r?k(G):{};if(F.blocked){H.stopPropagation();H.preventDefault();return}q(D,A,H,F.element);if(F.runOnce){F.cleanup()}};if(E){this.add()}s.collect(this)};y5.AEventListener.prototype={add:function(){if(this.added){return}this._add();this.added=true},_add:function(){this.element.addEventListener(this.type,this.listener,false)},remove:function(){if(!this.added){return}this._remove();this.added=false},_remove:function(){this.element.removeEventListener(this.type,this.listener,false)},block:function(){this.blocked=true},unblock:function(){this.blocked=false},cleanup:function(){this.remove();this.element=null;this.listener=null}};var p=y5.AEventListener;if(document.attachEvent){p.prototype._add=function(){this.element.attachEvent("on"+this.type,this.listener)};p.prototype._remove=function(){this.element.detachEvent("on"+this.type,this.listener)}}var j={Mouse:/^mouse|click/,Key:/^key/,Mutation:/^DOM/,HTML:/./},g=[0,1,2];if(y5.is_safari){g=[0,2,3]}if(y5.is_safari||y5.is_opera){delete j.Key}y5.Event=function(B,A,z,C){this.type=n(B||"click");this.element=A||document;this.params=C||{};this.init();if(typeof z==r){z=true}if(z){this.dispatch()}s.collect(this)};y5.Event.prototype={init:function(){for(var z in j){if(j[z].test(this.type)){this.eventType=z;break}}},dispatch:function(C,B,z){if(typeof C==r){C=this.params}B=B||true;z=z||true;var A=document.createEvent(this.eventType+"Events");switch(this.eventType){case"Mouse":A.initMouseEvent(this.type,B,z,document.defaultView,C.detail||0,C.screenX||0,C.screenY||0,C.clientX||0,C.clientY||0,C.ctrlKey||false,C.altKey||false,C.shiftKey||false,C.metaKey||false,g[C.button||0],null);break;case"Key":A.initKeyEvent(this.type,B,z,document.defaultView,C.ctrlKey||false,C.altKey||false,C.shiftKey||false,C.metaKey||false,C.keyCode||0,C.charCode||0);break;default:A.initEvent(this.type,B,z);break}return this.element.dispatchEvent(A)},cleanup:function(){this.element=null}};var y=y5.Event;if(document.createEventObject){g=[1,4,2];function b(A,D){for(var z in D){try{var B;switch(z){case"button":B=g[D.button||0];break;default:B=D[z];break}A[z]=B}catch(C){}}return A}y.prototype.init=y5.NULL;y.prototype.dispatch=function(A){if(typeof A==r){A=this.params}var z=b(document.createEventObject(),A);return this.element.fireEvent("on"+this.type,z)}}else{if(!document.createEvent){y.prototype.init=y5.NULL;y.prototype.dispatch=function(A){try{return this.element[this.type](A)}catch(z){y5.Console.warn("Browser is too old",["Event"]);return false}}}}y.prototype.dispatchEvent=y.prototype.dispatch;(function(){var A={notifiers:{},observers:{},dispatchNotify:function(B,E,C){var J=true,G=this.observers[B];if(G){var I=[].concat(G),F=0,D=I.length;for(;F');this.frame=document.createElement('';m.Window=function(r,s,t){this.init(r,s,t)};m.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 b},init:function(r,s,t){this.element=r;this.content=s;this.params={};this.window=null;this.events={};this.callbacks={};this.shortcuts={};this.isActive=false;h.init();this.initParams=k.objectCopy(t);this.makeParams(t);this.create();this.make(t)},initOnce:function(){this.event("init");this.initOnce=i},box:function(s){var r=y5.Widget.Templates.get(this.toString(),this.params.template);return y5.T(r.getHTML(),s)},create:function(){var s=this.params;var r="y5-w-window"+(this.className?" "+this.className:"")+(s.className?" "+s.className:"")+(s.modal?" y5-w-window-modal":"");this.window=a.create("div",{style:"position:absolute;left:-999em;","class":r});this.window.innerHTML=this.box();this.dragWindowInitOnce()},getContainerOnce:function(){this.container=j.getElementByClass(this.classContainer,this.window);this.getContainerOnce=i},getFooterOnce:function(){this.footer=j.getElementByClass("y5-w-buttons",this.window);this.getFooterOnce=i},fillContainer:function(r){this.container.appendChild(this.params.saveState?r:r.cloneNode(true))},refreshContent:function(){if(this.params.text){this.container.innerHTML=y5.Strings.text2html(this.params.text)}else{if(this.params.html){this.container.innerHTML=this.params.html}else{j.clearNode(this.container);this.content.forEach(this.fillContainer,this)}}},setContent:function(){this.getContainerOnce();try{this.refreshContent()}catch(r){y5.Console.error("Find container",[b])}},convertPosition:function(u,s,v,t){var r=0;if(u.indexOf("%")!=-1){r+=(v-t)*(parseFloat(u)/100)}else{if(u.indexOf("em")!=-1){r+=j.em2px(parseFloat(u),s)}else{r+=parseFloat(u)}}return parseInt(r,10)},getScrollX:function(){return(this.params.fixed?j.getPageScrollX():0)},getScrollY:function(){return(this.params.fixed?j.getPageScrollY():0)},getPosition:function(){var u=this.params;var t;var v,s;if(u.element=="y5:viewport"||j.testTagName(u.element,["html","body"])){t=j.getBody();var r=j.viewPort();v=r[0];s=r[1]}else{t=u.element;v=t.clientWidth||t.offsetWidth;s=t.clientHeight||t.offsetHeight}var w=j.getOffset(t);w[0]+=this.convertPosition(u.halign,t,v,(u.relative?this.window.clientWidth:0));w[1]+=this.convertPosition(u.valign,t,s,(u.relative?this.window.clientHeight:0));return w},dragWindowInitOnce:function(){this.caption=j.getElementByClass("y5-w-titlebar",this.window);if(this.caption){var x=this;var u;function w(){u=j.getOffset(x.window)}function t(B,A,y,z){y=[y[0]+(u[0]-z[0]),y[1]+(u[1]-z[1])];x.dragWindowMove(A,y)}function v(){x.dragWindowStart()}function s(){x.dragWindowUp()}var r=new y5.ObjectMove(this.caption,document,{down:w,start:v,move:t,up:s});r.disableEvents=r.enableEvents=y5.VOID}this.dragWindowInitOnce=i},dragWindowStart:function(){q.add(this.window,"y5-w-window-moved")},dragWindowUp:function(){q.remove(this.window,"y5-w-window-moved")},dragWindowMove:function(v,t){if(v.clientX<0){t[0]-=v.clientX}if(v.clientY<0){t[1]-=v.clientY}var s=j.viewPort();var u=v.clientX-s[0];if(u>0){t[0]-=u}var r=v.clientY-s[1];if(r>0){t[1]-=r}this.moveTo(this.getMoveTo(this.X=t[0],this.Y=t[1]))},initPosition:function(){var y=this.getMoveTo(this.X,this.Y);var x=y[0];var w=y[1];var r=j.viewPort();var v=Math.floor(x-r[0]*0.07);var t=Math.floor(w-r[1]*0.07);var u=j.getPageScrollX();var s=j.getPageScrollY();if(x-1;r--){if(this.opens[r].params.modal){this.containerView.insertBefore(this.modalLayer,this.opens[r].window);return}}if(this.modalLayer){this.modalLayer.style.display="none"}},hide:function(r){r.window.style.left="-999em";this.removeOpen(r);this.hideBase(r)},createModalLayerElement:function(s){var r=(y5.is_opera&&y5.opera_ver<9)?"y5-w-modal-opera":"y5-w-modal";this.modalLayer=a.create("div",{"class":r,style:s});new l("click",function(t){t.stopPropagation()},this.modalLayer,true);if(y5.is_ie7down||(y5.is_linux&&y5.is_gecko)){this.modalLayer.appendChild(a.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=i},addOpen:function(r){var s=0;this.opens.forEach(function(t){t.setZIndex(s++);t.disableShortcuts()});this.opens.push(r);if(r.params.modal){this.modalLayer.style.zIndex=s++}r.setZIndex(s)},removeOpen:function(u){var v=this.opens;var t=v.lastIndexOf(u);v.splice(t,1);var r=v.length;if(r){v[r-1].enableShortcuts()}var x=0;v.forEach(function(y){y.setZIndex(x++)});if(u.params.modal){var w=false;for(var s=v.length-1;s>=0;s--){if(v[s].params.modal){v[s].setZIndex(s+1);this.modalLayer.style.zIndex=s;w=true;break}}if(!w){this.modalLayer.style.zIndex=-1}}}};if(y5.is_ie){h.createModalLayerOnce=function(){this.createModalLayerElement("position:absolute; display:none");this.createModalLayerOnce=i}}if(!m.Templates.get(b,"default")){var n=new m.Template(b,null,"default");n.loadCSSModule(b);var g='
${content}
';if(!y5.is_opera||y5.opera_ver>=9){g+='
'}if(y5.is_ie7down||(y5.is_linux&&y5.is_gecko)){g+=c}n.setFrame(g);n.setBody('
')}y5.loaded("Widget.Window")});y5.require("Dom",function(){var i=y5.Dom,h=["a","input","textarea","select","button"],g=[h[1],h[2],h[3]],j=["submit","button","reset"];function a(k){if(k&&k.focus){k.focus();return k}return null}function d(k){if(k&&k.select){k.select();return k}return null}function c(k){return i.getDescendants(k,h)}function b(k){return(k.disabled||!k.offsetHeight||i.getAncestorsOrSelf(k).some(function(l){return y5.Elements.css(l,"visibility")=="hidden"}))}y5.Form={focusFirstElement:function(k,l){return a(this.getFirstElement(k,l))},focusLastElement:function(k,l){return a(this.getLastElement(k,l))},activateFirstElement:function(k){return d(this.focusFirstElement(k,true))},getFirstElement:function(m,q){var p=c(m);for(var n=0,k=p.length;n=0;l--){var m=n[l];if(this.checkElement(m,o)){return m}}return null},checkElement:function(m,o){if(b(m)){return false}var k=m.tagName.toLowerCase(),n=m.type;if(k=="input"&&n=="file"){return false}if(o){var l=g.indexOf(k)!=-1;if(l){l=j.indexOf(n)==-1}return l}return h.indexOf(k)!=-1},checkElementHasTabIndex:function(k){if(b(k)){return false}return(y5.Types.def(k.tabIndex)&&k.tabIndex)>=0}};y5.loaded("Form")});y5.require(["Utils","Dom","Form","Events","ShortCuts","Widget.Window"],function(){var d="Widget.Dialog",g=y5.ShortCut,a=y5.Form,c=y5.Dom,h=y5.AEventListener;y5.Widget.Dialog=function(i,j,k){this.Window(i,j,k)};y5.Widget.Dialog.prototype={className:"y5-w-dialog y5-w-dialog",defaultParams:{modal:true,relative:true,title:"",okButton:{title:" Ok "},cancelButton:{title:"\u041E\u0442\u043C\u0435\u043D\u0430"},noButton:{title:" \u041D\u0435\u0442 "}},box:function(){var i=this.params;return this.Window.prototype.box.call(this,{title:i.title,okButton:i.okButton.title,noButton:i.noButton.title,cancelButton:i.cancelButton.title})},toString:function(){return d},setEventsOnce:function(){var i=this.events;this.button_close=c.getElementByClass("y5-w-closebutton",this.window);if(this.button_close){i.close=new h("click",this.cancel,this.button_close,false,this)}this.button_ok=c.getElementByClass("y5-w-okbutton",this.footer);if(this.button_ok){i.ok=new h("click",this.ok,this.button_ok,false,this)}this.button_no=c.getElementByClass("y5-w-nobutton",this.footer);if(this.button_no){i.no=new h("click",this.no,this.button_no,false,this)}this.button_cancel=c.getElementByClass("y5-w-cancelbutton",this.footer);if(this.button_cancel){i.cancel=new h("click",this.cancel,this.button_cancel,false,this)}this.blurTarget=c.getBody();i.body_onblur=new h("blur",function(j){this.blurTarget=j.target},c.getBody(),false,this);this.Window.prototype.setEventsOnce.apply(this)},ok:function(i){this.action(i,"ok")},no:function(i){this.action(i,"no")},cancel:function(i){this.action(i,"cancel")},setCallBacksOnce:function(){["fireOk","fireNo","fireCancel","setTitle"].forEach(function(i){this.callbacks[i]=new y5.Observer("y5:"+i,this[i],this.element,true,this)},this);this.Window.prototype.setCallBacksOnce.apply(this)},fireOk:function(){new y5.Event("click",this.button_ok)},fireNo:function(){new y5.Event("click",this.button_no)},fireCancel:function(){this.kill()},setTitle:function(j){var i=c.getElementByClass("y5-w-title",this.window);i.innerHTML=y5.T("#{title}",{title:j})},setShortcutsOnce:function(){var i=this.shortcuts;i.esc=g.down([{key:g.ESC}],this.esc,document,{checkTarget:false,context:this});i.ctrlEnter=g.down([{ctrl:true,key:g.ENTER}],this.fireOk,this.window,{checkTarget:false,context:this});if(this.params.modal){i.shiftTab=g.press([{key:g.TAB,shift:true}],function(j){if(this.getFirstElement()==j.target){this.getLastElement().focus();j.preventDefault()}},this.window,{checkTarget:false,context:this,preventDefault:false});i.tab=g.press([{key:g.TAB}],function(j){if(this.getLastElement()==j.target){this.getFirstElement().focus();j.preventDefault()}},this.window,{checkTarget:false,context:this,preventDefault:false})}this.Window.prototype.setShortcutsOnce.apply(this)},getFirstElement:function(){var i=a.getFirstElement(this.container);if(!i){i=a.getFirstElement(this.footer)}return i},getLastElement:function(){var i=a.getLastElement(this.footer);if(!i){i=a.getLastElement(this.container)}return i},esc:function(i){this.action(i,"esc")},make:function(i){this.Window.prototype.make.apply(this,[i]);this.setTitle(this.params.title);if(!a.activateFirstElement(this.window)&&!(y5.is_opera&&y5.opera_ver>=9.5)){a.focusFirstElement(this.window)}},kill:function(){this.Window.prototype.kill.apply(this);try{if(this.blurTarget!=c.getBody()){this.blurTarget.focus()}}catch(i){}}};y5.Utils.objectExtends(y5.Widget.Dialog,y5.Widget.Window,"Window");if(!y5.Widget.Templates.get(d,"default")){var b=new y5.Widget.Template(d,"Widget.Window","default");b.loadCSSModule(d);b.setHeader('
#{title}
');b.setFooter('
 
')}y5.loaded(d)});y5.require(["Utils","Template","Widget.Dialog"],function(){var a="Widget.Dialog.Standard";y5.Widget.Dialog.Standard=function(b,c,d){this.Dialog(b,c,d)};y5.Widget.Dialog.Standard.prototype={className:"y5-w-dialog y5-w-dialog-standard",toString:function(){return a}};y5.Utils.objectExtends(y5.Widget.Dialog.Standard,y5.Widget.Dialog,"Dialog");if(!y5.Widget.Templates.get(a,"default")){new y5.Widget.Template(a,"Widget.Dialog","default")}y5.loaded(a)});y5.require(["Utils","Dom","Events","ShortCuts","Template","Widget.Window"],function(){var b="Widget.Popup";y5.Widget.Popup=function(c,d,g){this.Window(c,d,g)};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.Dom.getElementByClass("y5-w-closebutton",this.window);if(this.button_close){this.events.close=new y5.AEventListener("click",this.cancel,this.button_close,false,this)}this.events.hide_click=new y5.AEventListener("mousedown",this.hide_click,document,false,this);this.Window.prototype.setEventsOnce.apply(this)},hide_click:function(c){if(!y5.Dom.isChild(c.target,this.window)){this.kill()}},setShortcutsOnce:function(){this.shortcuts.esc=y5.ShortCut.down([{key:y5.ShortCut.ESC}],this.esc,document,{checkTarget:false,context:this});this.Window.prototype.setShortcutsOnce.apply(this)},esc:function(c){this.action(c,"esc")}};y5.Utils.objectExtends(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)});