var am=40,c=[],q=document,U=Math.random,ae=50,S,e,I,Q=0,T=0,u=0,p=0,O=
0,R=0,L,r=-1;var X='';var aI={lores:[[5,5,'b'],[71,22,'c'],[71,22,'d'
],[7,14,'m'],[30,13,'t'],[71,14,'m'],[5,5,'g']],hires:[[5,5,'b'],[71,
22,'c'],[71,22,'d'],[38,50,'m'],[54,13,'t'],[71,14,'l'],[5,5,'g']]};
function W(a,l){a.af=l;var b=aI[X][l];a.h.width=b[0];a.h.height=b[1];l
=b[2];a.h.src=X+'/'+l+'.gif';}function B(a,l){a.id=r;for(var b in c)if
(c[b]==r){a.id=b;break;}if(a.id==r)if(c.length<am)a.id=c.length;else
return 0;a.h=q.getElementById('img.'+a.id);W(a,l);a.G=0;return 1;}
function al(a,j,o,x,y){var J=o*o-(j-o)*(j-o);var f=a.h;f.width=J*x;f.
height=J*y;f.style.top=a.y-(f.height/2)+'px';f.style.left=a.x-(f.width
/2)+'px';m(a,1);return a.h.height;}function m(a,ai){if(!a)a=this;a.h.
style.visibility=ai?'visible':'hidden';if(!ai)c[a.id]=r;}function aH()
{var a=this;var K=(e-a.w)/(a.aA-a.w);if(K>1)K=1;a.x=(a.aa-a.k)*K+a.k;a
.y=(a.ab-a.n)*K+a.n;var f=a.h;f.style.left=a.x-(f.width/2)+'px';f.
style.top=a.y-(f.height/2)+'px';m(a,1);if(K>=1)a.A=a.ad;}function M(a,
k,n,aa,ab,aF,ad){a.x=k;a.y=n;a.k=k;a.n=n;a.aa=aa;a.ab=ab;a.w=e;a.aA=e+
aF;a.A=aH;a.ad=ad;}function aK(){}function au(){var a=this;if(!a.G){a.
G=1;W(a,2);if(--O<1){new aB();}else{if(a.d)a.d.g=a.g;if(a.g)a.g.d=a.d;
if(p==a)p=a.d;}if(a.V&&!S){m(a,0);S=1;}}}function aD(){Q=1;this.A=aK;}
function F(x,y,V){var a=this;a.P=au;M(a,x,0,x,y,20,aD);a.V=V;a.d=p;a.g
=0;if(p)p.g=a;p=a;if(a.V)B(a,5);else B(a,1);this.A();m(a,1);c[a.id]=a;
O++;}function as(){var a=this;m(a,0);new ag(a.x,a.y);I+=O;if(a.d)a.d.g
=a.g;if(a.g)a.g.d=a.d;if(u==a)u=a.d;}function aw(){var a=this;a.P=as;
if(B(a,4)&&O>0){var aj=U()*O;var b=p;for(;aj>=1;b=b.d)--aj;M(a,U()*600
,0,b.x,b.y,U()*80+60-e*.05,as);a.d=u;a.g=0;if(u)u.g=a;u=a;c[a.id]=a;}}
function ap(){m(this,0);new ag(this.x,this.y);}function ah(x,y){var a=
this;a.P=ap;if(Q&&!S&&B(a,3)){var k=340;var n=427;M(a,k,n,x,y,Math.
sqrt((k-x)*(k-x)+(n-y)*(n-y))*.05,ap);c[a.id]=a;I--;}}function aJ(){
var a=this;var j=e-a.w;var o=13;var J=al(a,j,o,.5,.5);var C,H,b;var ao
=J*J/4;for(b=u;b;b=b.d){C=b.x-a.x;H=b.y-a.y;if(C*C+H*H<ao)b.P();}if(!a
.aq&&j>=o){a.aq=1;for(b=p;b;b=b.d){C=b.x-a.x;H=b.y-a.y;if(C*C+H*H<ao)b
.P();}}if(j>o*2)m(a,0);}function ag(x,y){var a=this;a.A=aJ;if(B(a,0)){
a.x=x;a.y=y;a.w=e;a.aq=0;c[a.id]=a;}}function aG(){var a=this;var j=e-
a.w;var ac=20;if(j>ac)j=ac;al(a,j,ac,1.4,.2);}function aB(){var a=this
;a.A=aG;if(B(a,6)){a.w=e;a.G=1;a.x=350;a.y=200;c[a.id]=a;}}function aL
(){if(this.an.value!=I)this.an.value=I;}function av(){var a=this;a.h=q
.getElementById("sform");a.h.width=300;a.h.height=50;a.an=q.
getElementById("sbox");M(a,300,0,300,500,20,aL);a.G=1;a.af=0;a.id=0;c[
a.id]=a;m(a,1);}var Y=0,ar=0,synchB=0;var ak=0;function idle(){if(!R)
return;ar=e-ae/50;if(ar>synchB){Y=1;}if(!Y)setTimeout('idle()',ae);if
(!T){var at=0;L=0;for(var b in c)if(c[b]!=r){++L;at+=c[b].G;c[b].A();}
if(at>=L){if(!L){R=0;return;}Q=0;for(var z in c)if(c[z]!=r){c[z].G=0;M
(c[z],c[z].x,c[z].y,c[z].x,-20,50,m);}}if(Q&&e>=ak){new aw();ak=e+(U
()*30);}e+=ae/50;}if(Y)setTimeout('idle()',60);else setTimeout(
'synchB='+e,5);}function aE(E){if(!T){if(E)new ah(E.clientX,E.clientY
);else new ah(event.x,event.y);}}function N(a){X=a?'hires':'lores';for
(var b in c)if(c[b]!=r&&c[b].af)W(c[b],c[b].af);}var v='';function ax(
E){var D=E?E.which:event.keyCode;D=String.fromCharCode(D);if(L){if(D==
'P')T=!T;if(D=='H')N(1);if(D=='L')N(0);}else{v+=D;v=v.substring(v.
length-6);if(v=='KILLEM'){N(0);Z();}if(v=='MATROX'){N(1);Z();}}}
function Z(){S=0;I=0;e=0;q.onmousedown=aE;new av();new F(80,450,0);new
F(210,450,0);new F(340,450,0);new F(340,427,1);new F(470,450,0);new F(
600,450,0);if(!R){R=1;idle();}}function afterload(ay,aC){q.onkeydown=
ax;if(ay){N(aC||0);Z();}}function az(){var l=
' style="position:absolute;visibility:hidden"';for(var b=0;b<am;++b){q
.write('<img id="img.'+b+'"'+l+' />');}q.write('<form id="sform"'+l+
'>Score: <input id="sbox" size="10"></form>');}az();