text: /*
   * D2JS
   * Copyright (C) SatisKia. All rights reserved.
   */
  (function(n){function uu(){return!!r.createElement(yr).getContext}function no(){u=[];u[0]=8;u[1]=9;u[2]=13;u[3]=16;u[4]=17;u[5]=32;u[6]=37;u[7]=38;u[8]=39;u[9]=40;u[10]=48;u[11]=49;u[12]=50;u[13]=51;u[14]=52;u[15]=53;u[16]=54;u[17]=55;u[18]=56;u[19]=57;u[20]=67;u[21]=88;u[22]=90;init();_USE_EXCANVAS||uu()?(_USE_LAYOUTMOUSE&&(tt=!0,_USE_MOUSE=!0),_USE_LAYOUTTOUCH&&(tt=!0,_USE_TOUCH=!0),_USE_KEY&&(e(r,cf,ko),e(r,lf,go)),_USE_TOUCH&&(e(r,ci,ls),e(r,li,as),e(r,ai,vs)),a=r.createElement(pr),a.style.cssText=fu,r.body.appendChild(a),start()&&eu()):error()}function to(){processEvent(13,n.orientation)}function io(){processEvent(14,0)}function eu(){dt=!1;v()}function ro(){dt=!0}function ou(){if(_USE_DRAWSTRINGEX&&(o=0),t.clearRect(0,0,gi(),nr()),t.save(),paint(ni),t.restore(),_USE_DRAWSTRINGEX)for(var n=o;n<h.length;n++)h[n].innerHTML=""}function su(){y=frameTime()-(ot-gt);y<0&&(y=0);y>frameTime()&&(y=frameTime())}function lt(){while(ot>gt&&ot-gt<frameTime())ot=it()}function v(){if(dt){dt=!1;return}gt=it();ou();ot=it();_USE_REQUESTANIMATIONFRAME?n.requestAnimationFrame?(lt(),n.requestAnimationFrame(v)):n.webkitRequestAnimationFrame?(lt(),n.webkitRequestAnimationFrame(v)):n.mozRequestAnimationFrame?(lt(),n.mozRequestAnimationFrame(v)):n.oRequestAnimationFrame?(lt(),n.oRequestAnimationFrame(v)):n.msRequestAnimationFrame?(lt(),n.msRequestAnimationFrame(v)):(su(),n.setTimeout(v,y)):(su(),n.setTimeout(v,y))}function e(n,t,i){n.addEventListener?n.addEventListener(t,i,!1):n.attachEvent?n.attachEvent(yt+t,i):n[yt+t]=i}function g(n,t,i){n.removeEventListener?n.removeEventListener(t,i,!1):n.detachEvent?n.detachEvent(yt+t,i):n[yt+t]=null}function uo(n){f=r.getElementById(n);t=f.getContext(wr);st=!1;t.textAlign=vi;t.textBaseline=yi;_USE_MOUSE&&(e(f,pt,lu),e(f,br,au),e(f,pi,os),e(f,wi,ss),e(f,wt,vu));ni=new ar}function fo(n){ni=n}function eo(){return f}function oo(){return t}function so(){return ni}function ho(n,i){f.width=n;f.height=i;t.textAlign=vi;t.textBaseline=yi}function gi(){return parseInt(f.width)}function nr(){return parseInt(f.height)}function ui(n){for(var t=0;n;)t+=n.offsetLeft,n=n.offsetParent;return t}function fi(n){for(var t=0;n;)t+=n.offsetTop,n=n.offsetParent;return t}function co(){if(!!r.documentElement&&r.documentElement.clientWidth>0)return r.documentElement.clientWidth;if(!r.body){if(!!n.innerWidth)return n.innerWidth}else return r.body.clientWidth;return 0}function lo(){if(!!r.documentElement&&r.documentElement.clientHeight>0)return r.documentElement.clientHeight;if(!r.body){if(!!n.innerHeight)return n.innerHeight}else return r.body.clientHeight;return 0}function ao(){return n.orientation}function hu(n,t){var u="",i=n.indexOf(af+t+bi),r;return i<0&&(i=n.indexOf("&"+t+bi)),i>=0&&(i+=t.length+2,r=n.indexOf("&",i),r<0&&(r=n.length),u=n.substring(i,r)),decodeURIComponent(u)}function vo(n){for(var i,r=n.split("&"),u=[],t=0;t<r.length;t++)i=r[t].split(bi),u[i[0]]=decodeURIComponent(i[1]);return u}function yo(n){return hu(vr.href,n)}function po(n){return r.getElementById(n)}function wo(n){var t=r.getElementById(n).innerHTML;return t=t.replace(new RegExp("&lt;",nt),"<"),t.replace(new RegExp("&gt;",nt),">")}function it(){return(new Date).getTime()}function bo(n){var i=n.length,t;for(u=[],t=0;t<i;t++)u[t]=n[t]}function tr(n){for(var i=u.length,t=0;t<i;t++)if(u[t]==n)return 1<<t;return 0}function ko(n){var t=tr(n.keyCode);(ht&t)==0&&(ht+=t);processEvent(4,n.keyCode)}function go(n){var t=tr(n.keyCode);(ht&t)!=0&&(ht-=t);processEvent(5,n.keyCode)}function ns(){return ht}function ts(n,t,i,r,u){this.x=n;this.y=t;this.width=i;this.height=r;this.id=u;this.shape=null;this.coords=null}function is(){i=[]}function cu(n,t,r,u,f){i[i.length]=new ts(n,t,r,u,f)}function rs(n,r,u,f,e,o,s){var c,h;if(cu(n,r,u,f,e),!!t.isPointInPath)for(i[i.length-1].shape=o,c=s.split(ut),i[i.length-1].coords=new Array(c.length),h=0;h<c.length;h++)i[i.length-1].coords[h]=parseInt(c[h])}function us(n){if(i.length>0)for(var t=0;t<i.length;t++)if(i[t].id==n)return i[t];return null}function rt(n,r){var u,f;if(i.length>0)for(u=0;u<i.length;u++)if(i[u].shape==null){if(n>=i[u].x&&n<i[u].x+i[u].width&&r>=i[u].y&&r<i[u].y+i[u].height)return i[u].id}else{if(t.beginPath(),i[u].shape==vf)t.arc(i[u].x+i[u].coords[0],i[u].y+i[u].coords[1],i[u].coords[2],0,Math.PI*2,!1);else if(i[u].shape==yf){for(t.moveTo(i[u].x+i[u].coords[0],i[u].y+i[u].coords[1]),f=2;f<i[u].coords.length-1;f+=2)t.lineTo(i[u].x+i[u].coords[f],i[u].y+i[u].coords[f+1]);t.closePath()}else i[u].shape==pf&&(t.moveTo(i[u].x+i[u].coords[0],i[u].y+i[u].coords[1]),t.lineTo(i[u].x+i[u].coords[2],i[u].y+i[u].coords[1]),t.lineTo(i[u].x+i[u].coords[2],i[u].y+i[u].coords[3]),t.lineTo(i[u].x+i[u].coords[0],i[u].y+i[u].coords[3]),t.closePath());if(t.isPointInPath(n,r))return i[u].id}return-1}function fs(){for(var i=0,t,n=0;n<c.length;n++)t=rt(c[n],p[n]),t>=0&&(i|=1<<t);return i}function es(n){return 1<<n}function at(n){ti=n.clientX+r.body.scrollLeft+r.documentElement.scrollLeft-ui(f);ii=n.clientY+r.body.scrollTop+r.documentElement.scrollTop-fi(f)}function lu(n){if(at(n),tt&&i.length>0){var t=rt(ti,ii);if(t>=0){processEvent(6,t);return}}processEvent(8,0)}function au(n){at(n);processEvent(9,0)}function os(n){at(n);processEvent(10,0)}function ss(n){at(n);processEvent(11,0)}function vu(n){if(at(n),tt&&i.length>0){var t=rt(ti,ii);if(t>=0){processEvent(7,t);return}}processEvent(12,0)}function hs(){return ti}function cs(){return ii}function ir(n){c=[];p=[];for(var t=0;t<n.touches.length;t++)c[t]=n.touches[t].pageX-ui(f),p[t]=n.touches[t].pageY-fi(f)}function ls(n){if(ir(n),w=c[0],b=p[0],w>=0&&w<gi()&&b>=0&&b<nr()){if(ri=!0,tt&&i.length>0){var t=rt(w,b);if(t>=0){processEvent(6,t);n.preventDefault();return}}processEvent(15,0);n.preventDefault()}}function as(n){ri&&(ir(n),w=c[0],b=p[0],processEvent(16,0),n.preventDefault())}function vs(n){if(ri){if(ri=!1,ir(n),tt&&i.length>0){var t=rt(w,b);if(t>=0){processEvent(7,t);n.preventDefault();return}}processEvent(17,0);n.preventDefault()}}function ys(){return c.length}function ps(n){return n<c.length?c[n]:w}function ws(n){return n<p.length?p[n]:b}function bs(n){vr.replace(n)}function rr(n,t){d=n;ct=t.indexOf(wf)>=0?ft+t+ft:t;a.style.cssText=fu+kr+d+bt+ct}function ur(n){a.innerHTML=ft;var t=a.offsetWidth;return n=n.replace(new RegExp("<",nt),"&lt;"),n=n.replace(new RegExp(">",nt),"&gt;"),a.innerHTML=ft+n+ft,a.offsetWidth-t*2}function fr(){return d}function yu(n,t,i){st||(o>=h.length&&(h[o]=r.createElement(pr),h[o].style.cssText=bf,r.body.appendChild(h[o]),_USE_MOUSE&&(e(h[o],pt,lu),e(h[o],br,au),e(h[o],wt,vu))),h[o].style.cssText=dr+(ui(f)+t)+gr+(fi(f)+i-d)+kf+k+kr+d+bt+ct,n=n.replace(new RegExp("<",nt),"&lt;"),n=n.replace(new RegExp(">",nt),"&gt;"),h[o].innerHTML=n,o++)}function pu(){return!!r.createElement(kt).canPlayType}function ks(n){var t=r.createElement(kt);return!t.canPlayType?!1:t.canPlayType(n).replace(new RegExp(df),"")!=""}function er(){this.element=null;this.state=0;this.volume=100;this.id=it()}function ds(){this.element=null;this.src=null;this.tag=null}function s(){return _USE_AUDIOEX&&!pu()?!0:!1}function gs(n){if(s())return or(n);try{var t=new er;return t.element=new Audio(""),t.element.autoplay=!1,t.element.src=n,t.element.load(),t}catch(i){}return null}function or(n){var t=new ds;return t.src=n,t}function nh(n,t){if(s())return wu(n,t,audioExElement());try{var i=new er;return i.element=new Audio(""),i.element.autoplay=!1,i.element.src=n,i.element.loop=t,i.element.play(),i.state=1,i}catch(r){}return null}function wu(n,t,i){var r=or(n);return sr(r,t,i),r}function th(n){if(s())return!0;if(n!=null)try{if(n.element.readyState>=4)return!0}catch(t){}return!1}function bu(n){if(s()){ku(n);return}if(n!=null&&n.state!=0){try{n.state==2?n.element.currentTime=0:n.state!=1||n.element.ended||(n.element.pause(),n.element.currentTime=0)}catch(t){}n.state=0}}function ku(n){n!=null&&n.element!=null&&(n.element.setAttribute(ki,""),r.body.removeChild(n.element),n.element=null)}function ih(n){if((bu(n),!s())&&n!=null)try{n.element.load()}catch(t){}}function rh(n,t){if(s()){sr(n,t,audioExElement());return}if(n!=null){if(n.state==1)try{n.element.ended||(n.element.pause(),n.element.currentTime=0)}catch(i){}try{n.element.loop=t;n.element.play();n.state=1}catch(i){}}}function sr(n,t,i){n!=null&&(n.element!=null&&(n.element.setAttribute(ki,""),r.body.removeChild(n.element)),n.tag=i,n.element=r.createElement(n.tag),n.element.setAttribute(ki,n.src),n.tag==kt?(n.element.setAttribute(gf,et),t&&n.element.setAttribute(di,et)):n.tag==ne?t&&n.element.setAttribute(di,te):n.tag==ie&&(n.element.setAttribute(re,et),n.element.setAttribute(ue,fe),n.element.setAttribute(ee,nu),n.element.setAttribute(oe,nu),t&&(n.element.setAttribute(di,et),n.element.setAttribute(se,et))),r.body.appendChild(n.element))}function uh(n){if(s())return du(n);if(n!=null&&n.state==1){try{return!n.element.ended}catch(t){}return!0}return!1}function du(n){if(n!=null&&n.element!=null){if(n.tag==kt)try{return!n.element.ended}catch(t){}return!0}return!1}function gu(n){if(!s()&&n!=null&&n.state==1)try{n.element.ended||(n.element.pause(),n.state=2)}catch(t){}}function fh(n){if(!s()&&n!=null&&n.state==2)try{n.element.play();n.state=1}catch(t){}}function eh(n,t){if(!s()&&n!=null){n.volume=t;try{n.element.volume=n.volume/100}catch(i){}}}function oh(n){return s()?0:n!=null?n.volume:0}function sh(n){if(s())return 0;if(n!=null)try{return Math.floor(n.element.currentTime*1e3)}catch(t){}return 0}function hh(n,t,i,r){n!=null&&n.id==t&&n.state==1&&hr(n,i,r,!0)}function ch(n,t){n!=null&&n.id==t&&n.state==1&&gu(n)}function lh(n,t,i,r){try{var u=new er;return u.element=new Audio(""),u.element.autoplay=!1,u.element.src=n,hr(u,t,i,r),u}catch(f){}return null}function hr(n,t,i,r){var u,f,e;if(n!=null)try{if(u=it(),n.id=u,f=t/1e3,e=!1,n.state!=0)try{n.state==2?(n.element.currentTime=f,e=!0):n.state!=1||n.element.ended||(n.element.pause(),n.element.currentTime=f,e=!0)}catch(o){}if(n.element.loop=!1,n.element.play(),n.state=1,!e)try{n.element.currentTime=f}catch(o){}r?setTimeout(function(n,t,i,r){hh(n,t,i,r)},i,n,u,t,i):setTimeout(function(n,t){ch(n,t)},i,n,u)}catch(o){}}function vt(n){return n.e}function ah(n){return n.x}function vh(n){return n.y}function yh(n){return n.width}function ph(n){return n.height}function cr(n,t){n.e.src=t}function l(n){n.e.style.cssText=dr+(ui(n.p)+n.x)+gr+(fi(n.p)+n.y)+he+n.width+ce+n.height+le}function wh(n,t){n.x=t;l(n)}function bh(n,t){n.y=t;l(n)}function kh(n,t,i){n.x=t;n.y=i;l(n)}function dh(n,t){n.width=t;l(n)}function gh(n,t){n.height=t;l(n)}function nc(n,t,i){n.width=t;n.height=i;l(n)}function nf(n,t,i,r,u){n.x=t;n.y=i;n.width=r;n.height=u;l(n)}function tf(n,t,i){n.a!=null&&(n.a.setAttribute(ae,t),n.a.setAttribute(ve,i))}function ei(n,t,i,r,u,f,e){this.p=n;this.e=t;this.c=i;this.m=null;this.a=null;nf(this,r,u,f,e)}function oi(n,t){n.onButtonDown=function(){processEvent(0,n.e)};n.onButtonOut=function(){processEvent(1,n.e)};n.onButtonOver=function(){processEvent(2,n.e)};n.onButtonUp=function(){processEvent(3,n.e)};var i=t?n.a:n.e;_USE_MOUSE&&(e(i,pt,n.onButtonDown),e(i,pi,n.onButtonOut),e(i,wi,n.onButtonOver),e(i,wt,n.onButtonUp));_USE_TOUCH&&(e(i,ci,n.onButtonDown),e(i,li,n.onButtonOver),e(i,ai,n.onButtonUp))}function lr(n,t,i,u,f,e){var o=new ei(n,r.createElement(tu),!0,i,u,f,e);return cr(o,t),r.body.appendChild(o.e),oi(o,!1),o}function tc(n,t,i,u,f,e,o,s,h){var c=new ei(n,r.createElement(tu),!0,i,u,f,e);return cr(c,t),c.e.setAttribute(ye,pe+o),c.e.setAttribute(we,be),r.body.appendChild(c.e),c.m=r.createElement(ke),c.m.setAttribute(de,o),r.body.appendChild(c.m),c.a=r.createElement(ge),tf(c,s,h),c.m.appendChild(c.a),oi(c,!0),c}function ic(n,t,i,u,f,e){var o=new ei(n,r.getElementById(t),!1,i,u,f,e);return oi(o,!1),o}function rc(n,t,i,u,f,e,o){var s=new ei(n,r.getElementById(t),!1,i,u,f,e);return s.a=r.getElementById(o),oi(s,!0),s}function rf(n){if(n.c){var t=n.a!=null?n.a:n.e;_USE_MOUSE&&(g(t,pt,n.onButtonDown),g(t,pi,n.onButtonOut),g(t,wi,n.onButtonOver),g(t,wt,n.onButtonUp));_USE_TOUCH&&(g(t,ci,n.onButtonDown),g(t,li,n.onButtonOver),g(t,ai,n.onButtonUp));r.body.removeChild(n.e)}}function ar(){this.f=0}function uf(){this.f=0;this.s=1}function uc(n){si++;var t=new Image;return t.onload=function(){si--},t.src=n,t}function fc(){return si>0}function ff(n,t){this.image=new Image;this.canvas=r.createElement(yr);this.context=this.canvas.getContext(wr);this.canvas.width=n;this.canvas.height=t;this.context.textAlign=vi;this.context.textBaseline=yi}function ef(n){this.s=n;this.o=[];this.id=-1}function ec(n,t){return hi.div(n,t)}function oc(n,t){return hi.mod(n,t)}function of(){}function hf(n){this.o=new Array(n);this.n=0}var r=n.document,vr=n.location,sc=n.navigator,yr="canvas",cf="keydown",lf="keyup",ci="touchstart",li="touchmove",ai="touchend",pr="span",yt="on",wr="2d",vi="left",yi="bottom",pt="mousedown",br="mousemove",pi="mouseout",wi="mouseover",wt="mouseup",af="?",bi="=",nt="igm",ut=",",vf="circle",yf="poly",pf="rect",wf=" ",ft="'",kr=";font:",bt="px ",bf="position:absolute",dr="position:absolute;left:",gr="px;top:",kf="px;color:",kt="audio",df="no",ki="src",gf="autoplay",et="true",di="loop",ne="bgsound",te="infinite",ie="embed",re="autostart",ue="hidden",fe="false",ee="width",nu="1",oe="height",se="repeat",he="px;width:",ce="px;height:",le="px",ae="shape",ve="coords",tu="img",ye="usemap",pe="#",we="border",be="0",ke="map",de="name",ge="area",iu="rgb(",ru=")",si,hi,sf;n._USE_AUDIOEX=!1;n._USE_DRAWSTRINGEX=!1;n._USE_EXCANVAS=!1;n._USE_KEY=!1;n._USE_MOUSE=!1;n._USE_TOUCH=!1;n._USE_LAYOUTMOUSE=!1;n._USE_LAYOUTTOUCH=!1;n._USE_REQUESTANIMATIONFRAME=!1;var dt=!1,gt,ot,y,f,t,st,ni,ht=0,u,tt=!1,i=[],ti,ii,ri=!1,c=[],p=[],w,b,k,d,ct,h=[],o,a,fu="visibility:hidden;position:absolute;left:0;top:0";ar.prototype={canUseClip:function(){return!!t.clip},canUseText:function(){return!!t.fillText},getColorOfRGB:function(n,t,i){return iu+n+ut+t+ut+i+ru},setStrokeWidth:function(n){t.lineWidth=n},setColor:function(n){k=n;t.fillStyle=k;t.strokeStyle=k},setAlpha:function(n){t.globalAlpha=n/255},setROP:function(n){t.globalCompositeOperation=n},setFont:function(n,i){rr(n,i);t.font=""+d+bt+ct},stringWidth:function(n){return ur(n)},fontHeight:function(){return fr()},clearClip:function(){t.restore();t.save()},setClip:function(n,i,r,u){!t.clip||(t.restore(),t.save(),t.beginPath(),t.moveTo(n,i),t.lineTo(n+r,i),t.lineTo(n+r,i+u),t.lineTo(n,i+u),t.closePath(),t.clip())},drawLine:function(n,i,r,u){t.beginPath();t.moveTo(n+.5,i+.5);t.lineTo(r+.5,u+.5);t.stroke();t.closePath()},drawRect:function(n,i,r,u){t.strokeRect(n+.5,i+.5,r,u)},fillRect:function(n,i,r,u){t.fillRect(n,i,r,u)},drawCircle:function(n,i,r){t.beginPath();t.arc(n,i,r,0,Math.PI*2,!1);t.stroke()},drawString:function(n,i,r){t.fillText?t.fillText(n,i,r):_USE_DRAWSTRINGEX&&yu(n,i,r)},setFlipMode:function(n){this.f=n},drawScaledImage:function(n,i,r,u,f,e,o,s,h){if(this.f==0)try{t.drawImage(n,e,o,s,h,i,r,u,f)}catch(c){}else{t.save();t.setTransform(1,0,0,1,0,0);switch(this.f){case 1:t.translate(i+u,r);t.scale(-1,1);break;case 2:t.translate(i,r+f);t.scale(1,-1);break;case 3:t.translate(i+u,r+f);t.scale(-1,-1)}try{t.drawImage(n,e,o,s,h,0,0,u,f)}catch(c){}t.restore()}},drawImage:function(n,t,i){this.drawScaledImage(n,t,i,n.width,n.height,0,0,n.width,n.height)},drawTransImage:function(n,i,r,u,f,e,o,s,h,c,l,a){t.save();t.setTransform(1,0,0,1,0,0);t.translate(i,r);t.rotate(Math.PI*c/180);t.scale(l/128,a/128);t.translate(-s,-h);try{t.drawImage(n,u,f,e,o,0,0,e,o)}catch(v){}t.restore()}};uf.prototype={canUseClip:function(){return!!t.clip},canUseText:function(){return!!t.fillText},setScale:function(n){this.s=n},scale:function(){return this.s},getColorOfRGB:function(n,t,i){return iu+n+ut+t+ut+i+ru},setStrokeWidth:function(n){t.lineWidth=n*this.s},setColor:function(n){k=n;t.fillStyle=k;t.strokeStyle=k},setAlpha:function(n){t.globalAlpha=n/255},setROP:function(n){t.globalCompositeOperation=n},setFont:function(n,i){rr(Math.floor(n*this.s),i);t.font=""+d+bt+ct},stringWidth:function(n){return this.s==0?0:ur(n)/this.s},fontHeight:function(){return this.s==0?0:fr()/this.s},clearClip:function(){t.restore();t.save()},setClip:function(n,i,r,u){!t.clip||(t.restore(),t.save(),t.beginPath(),t.moveTo(n*this.s,i*this.s),t.lineTo(n*this.s+r*this.s,i*this.s),t.lineTo(n*this.s+r*this.s,i*this.s+u*this.s),t.lineTo(n*this.s,i*this.s+u*this.s),t.closePath(),t.clip())},drawLine:function(n,i,r,u){t.beginPath();t.moveTo((n+.5)*this.s,(i+.5)*this.s);t.lineTo((r+.5)*this.s,(u+.5)*this.s);t.stroke();t.closePath()},drawRect:function(n,i,r,u){t.strokeRect((n+.5)*this.s,(i+.5)*this.s,r*this.s,u*this.s)},fillRect:function(n,i,r,u){t.fillRect(n*this.s,i*this.s,r*this.s,u*this.s)},drawCircle:function(n,i,r){t.beginPath();t.arc(n*this.s,i*this.s,r*this.s,0,Math.PI*2,!1);t.stroke()},drawString:function(n,i,r){t.fillText?t.fillText(n,i*this.s,r*this.s):_USE_DRAWSTRINGEX&&yu(n,i*this.s,r*this.s)},setFlipMode:function(n){this.f=n},drawScaledImage:function(n,i,r,u,f,e,o,s,h){if(this.f==0)try{t.drawImage(n,e,o,s,h,i*this.s,r*this.s,u*this.s,f*this.s)}catch(c){}else{t.save();t.setTransform(1,0,0,1,0,0);switch(this.f){case 1:t.translate((i+u)*this.s,r*this.s);t.scale(-this.s,this.s);break;case 2:t.translate(i*this.s,(r+f)*this.s);t.scale(this.s,-this.s);break;case 3:t.translate((i+u)*this.s,(r+f)*this.s);t.scale(-this.s,-this.s)}try{t.drawImage(n,e,o,s,h,0,0,u,f)}catch(c){}t.restore()}},drawImage:function(n,t,i){this.drawScaledImage(n,t,i,n.width,n.height,0,0,n.width,n.height)},drawTransImage:function(n,i,r,u,f,e,o,s,h,c,l,a){t.save();t.setTransform(1,0,0,1,0,0);t.translate(i*this.s,r*this.s);t.rotate(Math.PI*c/180);t.scale(l*this.s/128,a*this.s/128);t.translate(-s,-h);try{t.drawImage(n,u,f,e,o,0,0,e,o)}catch(v){}t.restore()}};si=0;ff.prototype={lock:function(){this.sav_canvas=f;this.sav_context=t;this.sav_lock=st;f=this.canvas;t=this.context;st=!0;t.clearRect(0,0,f.width,f.height);t.save()},unlock:function(){t.restore();f=this.sav_canvas;t=this.sav_context;st=this.sav_lock;this.image.src=this.canvas.toDataURL()},getWidth:function(){return this.canvas.width},getHeight:function(){return this.canvas.height},getImage:function(){return this.image}};ef.prototype={clear:function(){for(var n=0;n<this.o.length;n++)rf(this.o[n]);this.o=[]},add:function(n,t,i,r,u){this.o[this.o.length]=lr(f,this.s,n,t,i,r);this.o[this.o.length-1].id=u},addArea:function(n,t,i,r,u,e,o,s){this.o[this.o.length]=lr(f,this.s,n,t,i,r,e,o,s);this.o[this.o.length-1].id=u},get:function(n){for(var t=0;t<this.o.length;t++)if(this.o[t].id==n)return this.o[t];return null},check:function(){return this.id},handleEvent:function(n,t){var i;switch(n){case 0:for(i=0;i<this.o.length;i++)if(t==vt(this.o[i])){processEvent(6,this.o[i].id);break}break;case 1:for(i=0;i<this.o.length;i++)if(t==vt(this.o[i])){this.id=-1;break}break;case 2:for(i=0;i<this.o.length;i++)if(t==vt(this.o[i])){this.id=this.o[i].id;break}break;case 3:for(i=0;i<this.o.length;i++)if(t==vt(this.o[i])){processEvent(7,this.o[i].id);break}break;case 14:for(i=0;i<this.o.length;i++)l(this.o[i])}}};hi={div:function(n,t){return n<0?Math.ceil(n/t):Math.floor(n/t)},mod:function(n,t){return n<0?(n=-n,-(n-Math.floor(n/t)*t)):n-Math.floor(n/t)*t}};of.prototype={next:function(n){return Math.random()<.5?-Math.floor(Math.random()*n):Math.floor(Math.random()*n)},nextInt:function(){return Math.random()<.5?-Math.floor(Math.random()*2147483648):Math.floor(Math.random()*2147483648)}};sf={arraycopy:function(n,t,i,r,u){for(var f=0;f<u;f++)i[r+f]=n[t+f]}};hf.prototype={size:function(){return this.n},isEmpty:function(){return this.n==0},elementAt:function(n){return this.o[n]},firstElement:function(){return this.o[0]},lastElement:function(){return this.o[this.n-1]},setElementAt:function(n,t){t>=0&&t<this.n&&(this.o[t]=n)},removeElementAt:function(n){if(n>=0&&n<this.n){for(this.i=n;this.i<this.n-1;this.i++)this.o[this.i]=this.o[this.i+1];this.n--}},insertElementAt:function(n,t){if(t>=0&&t<this.n){for(this.i=this.n-1;this.i>=t;this.i--)this.o[this.i+1]=this.o[this.i];this.o[t]=n;this.n++}},addElement:function(n){this.o[this.n]=n;this.n++},removeAllElements:function(){this.n=0}};n.canUseCanvas=uu;n.d2js_onload=no;n.d2js_onorientationchange=to;n.d2js_onresize=io;n.setTimer=eu;n.killTimer=ro;n.repaint=ou;n.setCurrent=uo;n.setGraphics=fo;n.getCurrent=eo;n.getCurrentContext=oo;n.getGraphics=so;n.setCanvasSize=ho;n.getWidth=gi;n.getHeight=nr;n.getBrowserWidth=co;n.getBrowserHeight=lo;n.getOrientation=ao;n.readParameter=hu;n.readParameters=vo;n.getParameter=yo;n.getResImage=po;n.getResString=wo;n.currentTimeMillis=it;n.setKeyArray=bo;n.keyBit=tr;n.getKeypadState=ns;n.clearLayout=is;n.addLayout=cu;n.addLayoutArea=rs;n.getLayout=us;n.checkLayout=rt;n.getLayoutState=fs;n.layoutBit=es;n.getMouseX=hs;n.getMouseY=cs;n.touchNum=ys;n.getTouchX=ps;n.getTouchY=ws;n.launch=bs;n.setFont=rr;n.stringWidth=ur;n.fontHeight=fr;n.canUseAudio=pu;n.canPlayType=ks;n.loadAudio=gs;n.loadAudioEx=or;n.loadAndPlayAudio=nh;n.loadAndPlayAudioEx=wu;n.isLoaded=th;n.stopAudio=bu;n.stopAudioEx=ku;n.reloadAudio=ih;n.playAudio=rh;n.playAudioEx=sr;n.isPlaying=uh;n.isPlayingEx=du;n.pauseAudio=gu;n.restartAudio=fh;n.setVolume=eh;n.getVolume=oh;n.getCurrentTime=sh;n.loadAndPlayAudioSprite=lh;n.playAudioSprite=hr;n.buttonElement=vt;n.buttonX=ah;n.buttonY=vh;n.buttonWidth=yh;n.buttonHeight=ph;n.setButtonSrc=cr;n.updateButtonPos=l;n.setButtonX=wh;n.setButtonY=bh;n.setButtonPos=kh;n.setButtonWidth=dh;n.setButtonHeight=gh;n.setButtonSize=nc;n.setButtonPosSize=nf;n.setButtonArea=tf;n.createButton=lr;n.createButtonArea=tc;n.attachButton=ic;n.attachButtonArea=rc;n.removeButton=rf;n._Graphics=ar;n._ScalableGraphics=uf;n.loadImage=uc;n.isImageBusy=fc;n._Image=ff;n._Layout=ef;n._Math=hi;n._DIV=ec;n._MOD=oc;n._Random=of;n._System=sf;n._Vector=hf;n._KEY_BACKSPACE=8;n._KEY_TAB=9;n._KEY_ENTER=13;n._KEY_SELECT=n._KEY_ENTER;n._KEY_SHIFT=16;n._KEY_CTRL=17;n._KEY_SPACE=32;n._KEY_LEFT=37;n._KEY_UP=38;n._KEY_RIGHT=39;n._KEY_DOWN=40;n._KEY_0=48;n._KEY_1=49;n._KEY_2=50;n._KEY_3=51;n._KEY_4=52;n._KEY_5=53;n._KEY_6=54;n._KEY_7=55;n._KEY_8=56;n._KEY_9=57;n._KEY_A=65;n._KEY_B=66;n._KEY_C=67;n._KEY_D=68;n._KEY_E=69;n._KEY_F=70;n._KEY_G=71;n._KEY_H=72;n._KEY_I=73;n._KEY_J=74;n._KEY_K=75;n._KEY_L=76;n._KEY_M=77;n._KEY_N=78;n._KEY_O=79;n._KEY_P=80;n._KEY_Q=81;n._KEY_R=82;n._KEY_S=83;n._KEY_T=84;n._KEY_U=85;n._KEY_V=86;n._KEY_W=87;n._KEY_X=88;n._KEY_Y=89;n._KEY_Z=90;n._ROP_COPY="source-over";n._ROP_ADD="lighter";n._FLIP_NONE=0;n._FLIP_HORIZONTAL=1;n._FLIP_VERTICAL=2;n._FLIP_ROTATE=3;n._BUTTON_DOWN_EVENT=0;n._BUTTON_OUT_EVENT=1;n._BUTTON_OVER_EVENT=2;n._BUTTON_UP_EVENT=3;n._KEY_PRESSED_EVENT=4;n._KEY_RELEASED_EVENT=5;n._LAYOUT_DOWN_EVENT=6;n._LAYOUT_UP_EVENT=7;n._MOUSE_DOWN_EVENT=8;n._MOUSE_MOVE_EVENT=9;n._MOUSE_OUT_EVENT=10;n._MOUSE_OVER_EVENT=11;n._MOUSE_UP_EVENT=12;n._ORIENTATIONCHANGE_EVENT=13;n._RESIZE_EVENT=14;n._TOUCH_START_EVENT=15;n._TOUCH_MOVE_EVENT=16;n._TOUCH_END_EVENT=17})(window)