var n = navigator.userAgent.toLowerCase(), o = typeof window.ontouchstart != "undefined", q = getViewportDimensions().w <= 320 || getViewportDimensions().h <= 320;
o = n.indexOf("iphone") > -1 || n.indexOf("ipad") > -1;
var r = ["gray", "black", "#707070", "#b9b9b9", "#ac6e96", "#728096", "#5e8057", "#d7e28d", "#e6969a", "#4ca1c7", "#f2c9a6", "#e46900", "#00532b", "#620041", "#7d4e00", "#da69af", "#2d5d8c", "#af9b5d", "#3c6467", "#3cb796", "#c3716e", "#ffc800", "#dadc55", "#c6008f", "#6cc84b", "#9e8c28", "#9e8cad", "#df78ad", "#5578b9", "#e6eb00", "#46765a", "#dc2d53"], s = o ? 1 : 2, t = [75, 240, 400], v = [184, 160], z = [168, 35];
if(n.indexOf("webkit") < 0 && n.indexOf("gecko") < 0) {
  window.location.href = "./sorry.html"
}
var A = null, B = Math.floor, C = Math.abs;
function D(a) {
  return-Math.pow(2, -10 * a) + 1
}
function E(a) {
  return a
}
var G = 0, H = B((new Date).getTime() * 30 / 1E3), I, K, L;
function M(a, d, b, e) {
  this.from = a;
  this.to = d;
  this.duration = B(b * 30 / 1E3);
  this.Za = e;
  this.start = G
}
M.prototype = {from:0, to:0, duration:0, Za:null, start:0, Q:false, value:function() {
  var a = (G - this.start) / this.duration;
  if(this.Q = !(a < 1)) {
    return this.to
  }else {
    a = this.Za(a);
    return a * this.to + this.from * (1 - a)
  }
}};
function N(a, d, b, e) {
  this.type = b;
  this.x = a;
  this.p = a + e.x;
  this.y = d;
  this.xb = a;
  this.yb = d;
  this.pa = e;
  this.qb()
}
N.prototype = {type:0, x:0, p:0, y:0, xb:0, yb:0, pa:null, B:0, j:0, Ba:0, T:0, V:false, qb:function() {
  this.bc = 0.25 * (Math.random() - 0.5) * 2
}};
function O(a, d) {
  this.ab = a;
  this.bb = d
}
O.prototype = {length:0, ab:null, bb:null};
function P(a, d, b, e) {
  this.name = a;
  this.index = d;
  this.type = b;
  this.width = this.Ca[0];
  this.c = (this.direction = d % 2 ? 1 : 0) ? 800 : -800;
  if(this.type == 1) {
    this.ya = new Image;
    this.ya.src = "./img2/" + this.name + "_title.gif";
    this.ha = new Image;
    connect(this.ha, "onload", this, this.ec);
    this.ha.src = "./img2/" + this.name + "_s.png";
    if(e) {
      this.ga = new Image;
      connect(this.ga, "onload", this, this.cc);
      this.ga.src = "./img2/" + this.name + "_sub.gif"
    }
  }else {
    this.Qb = d == 0
  }
}
P.prototype = {name:null, index:0, type:0, Ra:[-33, -25], Ca:t, width:0, ja:null, rows:null, direction:0, status:0, hb:0, x:0, ia:0, Aa:0, c:0, m:null, z:0, ya:null, Ua:false, k:0, i:0, U:0, d:-1, n:[320, 480], ha:null, pb:false, cb:false, ga:null, ob:false, Qb:0, ec:function() {
  this.pb = true;
  Q.G = true
}, Rb:function() {
  this.cb = true;
  Q.fb = true
}, cc:function() {
  this.ob = true;
  Q.fb = true
}, kb:function(a, d) {
  if(this.z) {
    if(this.z.type == 1 && a == null && !d) {
      this.z.la = (this.z.la + 1) % this.z.Wa;
      return
    }else {
      this.z.lb(false)
    }
    this.c += (this.n[1] - v[1]) / 2
  }
  if(this.z = a) {
    var b = this.n[1];
    a.t(false);
    if(Q.d > -1) {
      Q.rows[Q.d].t(false);
      Q.d = -1
    }
    if(a.type == 2 || a.type == 4) {
      b = v[1];
      this.m = this.z = null;
      this.J(1);
      Q.Tb(a.o, "movie", a.type)
    }else {
      if(a.type == 3) {
        this.m = this.z = null;
        this.J(1);
        window.open(a.o, "_blank")
      }else {
        a.lb(true);
        this.J(2);
        this.c -= (this.n[1] - v[1]) / 2
      }
    }
    var e = a.index * (95 + v[1]), c = !this.direction ? 45 : 0;
    if(this.c + e - c < -Q.h / 2) {
      this.m = new M(this.c, this.c - (this.c + e - c + Q.h / 2) + 75 + 5, 1E3, D)
    }
    c = this.direction ? 95 : 40;
    if(this.c + e + b + c > Q.h / 2) {
      this.m = new M(this.c, this.c - (this.c + e + b + c - Q.h / 2) - 15 - 5, 1E3, D)
    }
  }else {
    if(!d) {
      this.J(1);
      this.m = null
    }
  }
}, La:function(a, d) {
  if(d < this.c) {
    return null
  }
  for(var b = 0;b < this.C;b++) {
    var e = this.rows[b];
    if(d < this.c + e.y + e.h) {
      if(d < this.c + e.y) {
        return null
      }
      b = e.state || e.ac ? this.Ea : this.aa;
      if(a < b || a > b + e.w) {
        return null
      }
      return e
    }
  }
  return null
}, J:function(a) {
  if(this.type == 1) {
    var d = this.Ca[a];
    if(a == 0) {
      Q.W()
    }else {
      if(!this.da) {
        this.da = new Image;
        connect(this.da, "onload", this, this.Rb);
        this.da.src = "./img2/" + this.name + "_l.png"
      }
      if(this.status == 0) {
        this.hb++;
        this.m = this.direction ? new M(Q.h / 2 - 25, -50, 500, D) : new M(-(Q.h / 2 + this.K + 25), -this.K + 100, 500, D)
      }
    }
    this.status = a;
    this.ja = new M(this.width, d, 1E3, D)
  }else {
    this.status = a;
    Q.G = true;
    if(this.index == 0 && (a || !this.Pa)) {
      this.ja = new M(0, 25, 8E3, E)
    }
  }
}, Lb:function() {
  if(this.index >= Q.D && this.index <= Q.S) {
    this.m = this.c + this.K / 2 < this.U ? new M(this.c, -(Q.h / 2 + this.K), 500, D) : new M(this.c, Q.h / 2, 500, D)
  }else {
    this.J(0)
  }
}, Ma:function(a) {
  return C(this.U - a) < 100
}};
function R(a, d, b) {
  this.id = a;
  this.Fa = b;
  this.index = d
}
R.prototype = {y:0, state:false, id:0, Fa:0, w:v[0], h:v[1], x:B((t[1] - v[0]) / 2), scale:0, o:0, xa:0, la:0, Wa:0, ac:null, H:0, va:null, index:0, t:o ? function() {
} : function(a) {
  if(a) {
    this.va = new M(this.H, 0.4 * (Math.random() > 0.5 ? 1 : -1), 500, D)
  }else {
    if(this.H) {
      this.va = new M(this.H, 0, 1E3, D)
    }
  }
}, lb:function(a) {
  if(a) {
    this.w = this.Fa[0];
    this.h = this.Fa[1]
  }else {
    this.w = v[0];
    this.h = v[1]
  }
  this.state = a
}};
var S = 0, T = 0, U = 0;
function V() {
  this.mb = this.Z = false
}
V.prototype = {setup:function(a, d, b) {
  if(!getElement("the_canvas").getContext) {
    window.location.href = "./sorry.html"
  }
  G = B((new Date).getTime() * 30 / 1E3) - H;
  this.db = this.Na = this.h = this.w = 0;
  this.gb = this.G = true;
  this.ic = this.ta = G;
  this.d = -1;
  this.zoom = 1;
  this.Ta = false;
  this.Da = null;
  this.na = 0.15;
  var e = r[B(Math.random() * r.length)];
  document.body.style.background = this.oa = e;
  e = new Date;
  var c = MochiKit.DateTime._padTwo;
  I = "" + e.getFullYear();
  K = "" + c(e.getMonth() + 1);
  L = "" + c(e.getDate());
  this.fc = null;
  this.F = 0;
  this.Sb = this.e = 660;
  this.Y = null;
  this.ca = 0;
  this.Nb = [getElement("head"), getElement("head2"), getElement("head3")];
  this.hc = this.gc = this.Ka = 0;
  this.$a = getElement("foot");
  this.Pb = getElement("tail");
  this.O = getElement("typo");
  this.Ob = getElement("head_bubble");
  this.Mb = getElement("copyright");
  this.q = new P("head", 0, 0, false);
  this.q.width = 500;
  this.q.Pa = 0;
  this.u = new P("tail", DATA.length + 1, 0, false);
  this.body = [];
  var h = 0;
  this.rows = [];
  for(e = 0;e < DATA.length;e++) {
    var f = DATA[e], g = new P(f.name, 1 + e, 1, f.no_subs ? false : true);
    g.rows = [];
    if(f.special_size) {
      g.n = f.special_size
    }
    if(f.special_width_set) {
      g.Ca = f.special_width_set;
      g.width = g.Ca[0]
    }
    if(f.title_offset) {
      g.Ra = f.title_offset
    }
    g.direction || f.rows.reverse();
    for(c = 0;c < f.rows.length;c++) {
      var j = f.rows[c], k = new R(h, c, g.n);
      k.xa = j[0];
      if(j[1] == "img") {
        k.o = j[2]
      }else {
        if(j[1] == "anim") {
          k.type = 1;
          k.o = j[2];
          k.Wa = j[3]
        }else {
          if(j[1] == "embed") {
            if(q) {
              if(j.length < 4) {
                log("no alternative link for small screen devices, ignored: " + j[2]);
                continue
              }
              k.o = j[3];
              k.type = 3
            }else {
              k.o = j[2];
              k.type = 2
            }
          }else {
            if(j[1] == "embed2") {
              if(q) {
                if(j.length < 4) {
                  log("no alternative embed for small screen devices, ignored: " + j[2]);
                  continue
                }
                k.o = j[3]
              }else {
                k.o = j[2]
              }
              k.type = 2
            }else {
              if(j[1] == "link") {
                k.type = 3;
                k.o = j[2]
              }else {
                log("unkown col type: " + j[1]);
                continue
              }
            }
          }
        }
      }
      h++;
      this.rows.push(k);
      g.rows.push(k)
    }
    g.C = g.rows.length;
    g.K = 95 * (g.C - 1) + g.C * v[1];
    if(f.always_title) {
      g.Ua = true
    }
    this.body.push(g)
  }
  this.C = this.rows.length;
  this.all = concat([this.q], this.body, [this.u]);
  this.R = this.all.length;
  this.Oa = this.body.length;
  this.f = [];
  this.f.push(new N(-80, 0, 2, this.body[0]));
  for(e = 0;e < this.Oa;e++) {
    h = this.body[e];
    f = h.width / (1 + s);
    this.f.push(new N(0, 0, 1, h));
    h.k = this.f.length;
    for(c = 0;c < s;c++) {
      this.f.push(new N(f * (c + 1), 0, 0, h))
    }
    h.i = this.f.length - 1
  }
  this.f.push(new N(0, 0, 1, this.u));
  this.f.push(new N(80, 0, 2, this.u));
  this.ea = this.f.length;
  this.q.k = 0;
  this.q.i = 1;
  this.u.k = this.ea - 2;
  this.u.i = this.ea - 1;
  this.Qa = [];
  for(e = 0;e < this.ea - 1;e++) {
    this.Qa.push(new O(this.f[e], this.f[e + 1]))
  }
  this.kc = this.Qa.length;
  this.D = 0;
  this.S = this.R;
  this.canvas = a;
  this.L = this.canvas.getContext("2d");
  this.fa = d;
  this.ib = getElement("the_overlay_background");
  this.ua = b;
  this.X = null;
  MochiKit.Async.doXHR("/cgi-bin/get.cgi", {mimeType:"text/plain", headers:[["Accept", "application/json"]], method:"POST", sendContent:"type=girl"}).addCallbacks(function(l) {
    l = evalJSONRequest(l);
    l.Jb = l.girl_length.replace(/,/g, "");
    l.Kb = l.girl_length_yesterday.replace(/,/g, "");
    l.ub = l.boy_num.replace(/,/g, "");
    l.vb = l.boy_num_yesterday.replace(/,/g, "");
    Q.X = l
  }, function() {
    log("error getting: /cgi-bin/get.cgi")
  });
  connect(window, "onresize", this, this.jb);
  connect(document, "onselectstart", this, this.onselect);
  connect(this.canvas, "onmousedown", this, this.onclick);
  connect(this.canvas, "onmouseup", this, this.W);
  connect(this.canvas, "onmousemove", this, this.onmousemove);
  connect(document, "onmousewheel", this, this.$b);
  connect(this.fa, "onmousedown", this, this.Ub);
  if(o) {
    connect(this.canvas, "ontouchstart", this, this.Xb);
    connect(this.canvas, "ongesturechange", this, this.Vb);
    connect(this.canvas, "ongesturestart", this, this.Wb);
    connect(this.canvas, "ontouchmove", this, this.Zb);
    connect(this.canvas, "ontouchend", this, this.W);
    connect(this.fa, "ontouchstart", this, this.Yb)
  }
  connect(window, "onkeydown", this, this.onkeydown);
  this.qa = "url('img2/hand_01.gif'),move";
  this.wb = "url('img2/hand_02.gif'), -moz-grabbing";
  this.ra = "url('img2/hand_03.gif'), pointer";
  this.canvas.style.display = "block";
  this.wa(0);
  if(o) {
    this.Va();
    this.zoom = this.ka / this.F;
    this.za();
    this.nb = this.zoom;
    this.Sb = this.e = (this.F + 420) / 2
  }
  this.fb = true;
  this.rb();
  try {
    A = _gat._getTracker("UA-3094953-10");
    A._trackPageview()
  }catch(m) {
    log("couldnt start tracking pagevidew")
  }
}, onselect:function() {
  return false
}, cursor:function(a) {
  this.canvas.style.cursor = a
}, rb:function() {
  var a = [];
  a.push(this.ca == 0 ? "\u014d" : "o");
  for(var d = 0;d < this.Oa;d++) {
    d == this.ca - 1 ? a.push("=") : a.push("-")
  }
  a.push(this.ca == this.R - 1 ? "\u014d" : "o");
  this.Z && a.push(" [" + U + "FPS]");
  document.title = a.join("");
  this.gb = false
}, Va:function() {
  G = (new Date).getTime();
  if(this.Z) {
    if(G - S > 500) {
      U = (1E3 * T / (G - S)).toFixed(2);
      T = 1;
      S = G;
      this.gb = true
    }else {
      T++
    }
  }
  G = B(G * 30 / 1E3) - H;
  var a = 0, d = B(this.h / 2), b = this.w, e = B(this.w / 2), c;
  if(c = this.Da) {
    this.zoom = c.value();
    if(c.Q) {
      this.Da = null;
      delete c
    }
    this.za();
    a = 1
  }
  if(c = this.Y) {
    this.e = B(c.value());
    if(c.Q) {
      this.Y = null;
      delete c
    }
    a = 1
  }
  var h = this.e - e;
  if(G % 60 == 0) {
    this.Ka = (this.Ka + 1) % 3;
    a |= true
  }
  if(G % 10 == 0) {
    var f = this.sa(this.e, true), g = f ? f.index : -1;
    if(g != this.ca) {
      this.ca = g;
      this.rb()
    }
  }
  var j = 0;
  for(g = 0;g < this.R;g++) {
    f = this.all[g];
    if(c = f.ja) {
      if(f.type == 1) {
        var k = f.width = B(c.value());
        if(c.Q) {
          f.ja = null;
          delete c
        }
        f.aa = B((k - v[0]) / 2);
        f.Ea = B((k - f.n[0]) / 2);
        f.dc = B((k - z[0]) / 2)
      }else {
        f.Pa = B(c.value());
        if(c.Q) {
          f.ja = null;
          delete c
        }
      }
      a = 1
    }
    f.x = j;
    j += f.width
  }
  for(g = this.D = 0;g < this.R;g++) {
    f = this.all[g];
    if(f.x + f.width > h) {
      this.D = g;
      break
    }
  }
  this.S = this.R - 1;
  for(g = this.D;g < this.R;g++) {
    f = this.all[g];
    if(f.x > h + b) {
      this.S = g;
      break
    }
  }
  this.F = j;
  for(g = this.D;g <= this.S;g++) {
    f = this.all[g];
    if(f.type == 1) {
      if(f.status > 0) {
        if(c = f.m) {
          f.c = B(c.value());
          if(c.Q) {
            f.m = null;
            delete c
          }
          if(g == this.ba) {
            if(k = f.La(this.Na - f.x, this.db)) {
              this.cursor(this.ra);
              if(this.d != k.id && !k.state) {
                this.d > -1 && this.rows[this.d].t(false);
                k.state || k.t(true);
                this.d = k.id
              }
            }else {
              this.d > -1 && this.rows[this.d].t(false);
              this.cursor(this.qa);
              this.d = -1
            }
          }
          a = 1
        }
        h = f.c;
        for(j = b = 0;j < f.C;j++) {
          k = f.rows[j];
          if(c = k.va) {
            k.H = c.value();
            if(c.Q) {
              c.va = null;
              delete c
            }
          }
          k.y = b;
          b += k.h + 95
        }
        f.ia = f.C;
        for(j = 0;j < f.C;j++) {
          k = f.rows[j];
          if(h + k.y + k.h + 95 > -d) {
            f.ia = j;
            break
          }
        }
        f.Aa = f.C - 1;
        for(j = f.ia;j < f.C;j++) {
          k = f.rows[j];
          if(h + k.y > d) {
            f.Aa = j;
            break
          }
        }
        f.K = b;
        if(f.c < -(d + f.K - 75) || f.c > d - 10) {
          f.kb(null, true);
          f.J(0)
        }
      }
    }
  }
  this.k = Math.max(0, (this.D - 1) * (1 + s) - 1);
  this.i = this.ea - 1;
  k = this.k;
  f = this.i - 1;
  c = this.f;
  if(!o) {
    g = G - this.ta > 300;
    if(this.Ta) {
      if(!g) {
        this.Ta = false;
        this.Y = new M(this.e, this.Na, 5E3, D);
        this.Da = new M(this.zoom, 1, 2500, D)
      }
    }else {
      if(g) {
        this.Y = new M(this.e, (this.F + 420) / 2, 2500, D);
        this.Da = new M(this.zoom, this.ka / this.F, 5E3, D);
        this.Ta = true
      }
    }
  }
  if(h = G - this.ta > 90) {
    if(h && G % 60 == 0) {
      for(g = this.k;g <= this.i;g++) {
        c[g].qb()
      }
    }
  }
  for(g = this.k;g <= this.i;g++) {
    b = c[g];
    b.p = b.x + b.pa.x;
    b.B = b.j = 0;
    if(h) {
      b.j += b.bc
    }
  }
  var m, l;
  l = false;
  for(g = k;g <= f;g++) {
    k = this.Qa[g];
    b = k.ab;
    k = k.bb;
    h = b.p - k.p;
    j = b.y - k.y;
    m = Math.sqrt(h * h + j * j);
    l = false;
    if(m > (l ? 5 : 80) || m < 40 && (m *= 3)) {
      h /= m;
      j /= m;
      m = Math.min(m, 400);
      l = k.V ? -0.5 : l ? -(m - 5) * 0.1 : -(m - 80) * 0.06;
      h *= l;
      j *= l;
      b.B += h;
      if(k.V) {
        if(b.pa.status == 0) {
          k.j += -j;
          b.j += j
        }
        if(m < 100) {
          k.V = false
        }
      }else {
        k.B += -h;
        k.j += -j;
        b.j += j;
        if(k.type == 1 && m > 165) {
          k.V = true
        }
      }
    }
  }
  for(m = 1;m < this.R - 1;m++) {
    f = this.all[m];
    f.U = (c[f.k + 1].y + c[f.i - 1].y) / 2;
    k = f.width;
    for(b = f.i;b >= f.k;b--) {
      j = c[b];
      if(j.x < 0) {
        j.B += 1.25
      }else {
        if(j.x > k) {
          j.B += -1.25
        }
      }
    }
    if(f.status) {
      if(this.D <= m && m <= this.S) {
        h = f.c;
        for(g = f.ia;g <= f.Aa;g++) {
          k = f.rows[g];
          for(b = f.i;b >= f.k;b--) {
            j = c[b];
            if(j.y > h + k.y && j.y < h + k.y + k.h && j.x > f.aa && j.x < f.aa + k.h) {
              j.j += j.y > h + k.y + k.h / 2 ? 3 : -3
            }
          }
        }
      }
    }else {
      g = 0.0015 - 0.0020 * f.hb;
      if(g > 0) {
        for(b = f.i + 1;b >= f.k - 1;b--) {
          j = c[b];
          j.j -= j.y * g
        }
      }
    }
  }
  for(g = this.k;g <= this.i;g++) {
    b = c[g];
    b.B += -b.Ba * 0.04;
    b.j += -b.T * 0.04;
    if(Math.abs(b.y) > d) {
      b.j += b.y > 0 ? -0.3 : 0.3
    }
    if(b.type == 2) {
      b.j -= b.y * 0.0075
    }
    b.Ba += b.B;
    b.T += b.j;
    if(C(b.Ba) < 0.0010 && C(b.T) < 0.0010) {
      if(C(b.B) < 0.0010 && C(b.j) < 0.0010) {
        continue
      }
    }
    a = true;
    if(b.type == 0) {
      b.x += b.Ba;
      b.p = b.x + b.pa.x
    }
    b.y += b.T
  }
  if(this.e < -e) {
    this.W();
    this.I(0)
  }else {
    if(this.e > this.F + e) {
      this.W();
      this.I(this.F)
    }
  }
  if(a || this.G) {
    this.Fb();
    this.G = false
  }
}, I:function(a) {
  this.Y = new M(this.e, a, 2500, D)
}, sa:function(a, d) {
  if(a < this.q.width) {
    if(!this.X) {
      return null
    }
    if(a < this.q.width - 140 && !d) {
      return null
    }
    if(a > this.q.width - 20) {
      return null
    }
    return this.q
  }
  for(var b = 0;b < this.Oa;b++) {
    var e = this.body[b];
    if(a < e.x + 20) {
      return null
    }
    if(a < e.x + e.width) {
      return e
    }
  }
  if(a > this.u.x + 140 && !d) {
    return null
  }
  return this.u
}, onclick:function(a) {
  Q.click(a.mouse().page.x, a.mouse().page.y)
}, onmousemove:function(a) {
  this.eb(a.mouse().page.x, a.mouse().page.y)
}, Ub:function(a) {
  if(a.target() == this.ib) {
    a.stop();
    this.wa(0)
  }
}, Xb:function(a) {
  this.ta = G;
  var d = a.event();
  if(d.touches.length == 1) {
    d = d.touches[0];
    this.click(d.pageX, d.pageY)
  }
  a.stop()
}, Yb:function(a) {
  var d = a.event();
  if(a.target() == this.ib) {
    d.touches.length == 1 && this.wa(0);
    a.stop()
  }
}, Zb:function(a) {
  var d = a.event();
  if(d.touches.length == 1) {
    d = d.touches[0];
    this.eb(d.pageX, d.pageY)
  }
  a.stop()
}, Wb:function() {
  this.nb = this.zoom
}, Vb:function(a) {
  a = a.event();
  this.zoom = Math.max(this.ka / this.F, Math.min(1, this.nb * a.scale));
  this.za()
}, onkeydown:function(a) {
  a = a.key();
  if(a.string == "KEY_F") {
    this.Z = !this.Z
  }
  if(a.string == "KEY_B") {
    this.mb = !this.mb
  }
}, $b:function(a) {
  if(!this.mode) {
    var d = a.event();
    d = d.wheelDelta ? d.wheelDelta / 40 : d.detail * -1;
    d *= -40;
    a = this.sa(a.mouse().page.x + (this.e - this.w / 2));
    if(!a || !a.status || a.type == 0) {
      a && a.m || this.I(this.e + d)
    }else {
      a.m = new M(a.c, a.c + d / 2, 1E3, D)
    }
  }
}, click:function(a, d) {
  this.ba = -1;
  a /= this.zoom;
  d /= this.zoom;
  var b = a + (this.e - this.w / 2), e = d - this.h / 2, c = this.sa(b);
  if(c) {
    if(c.type == 0 && c.Ma(e)) {
      if(c.index == 0) {
        c.J(!c.status);
        c.status ? this.I(100) : this.I(420)
      }else {
        for(c = this.oa;c == this.oa;) {
          c = r[B(Math.random() * r.length)]
        }
        document.body.style.background = this.oa = c;
        this.I(this.u.x);
        this.na = this.na > 0 ? 0 : 0.15
      }
      return
    }else {
      if(c.status == 0) {
        if(c.Ma(e)) {
          e = -1;
          e = c.status > 0 ? 0 : 1;
          c.J(e);
          this.Z || this.I(c.x + c.width / 2);
          return
        }
      }else {
        if(b = c.La(b - c.x, e)) {
          c.kb(b.state ? null : b);
          return
        }
        if(C(c.Sa - e) < 20) {
          c.Lb();
          return
        }
      }
    }
  }
  this.W();
  if(c && c.status > 0) {
    c.m = null;
    this.M = c;
    this.Ab = c.c;
    this.Ha = this.Db = d
  }
  this.Xa = true;
  this.Y = null;
  this.Ga = this.Cb = a;
  this.Bb = this.e;
  this.cursor(this.wb)
}, eb:function(a, d) {
  if(!this.mode) {
    var b = this.ba;
    this.ta = G;
    this.ba = -1;
    if(this.Xa) {
      this.zb(a, d)
    }else {
      a = a / this.zoom + (this.e - this.w / 2);
      d = d / this.zoom - this.h / 2;
      this.Na = a;
      this.db = d;
      var e = this.sa(a);
      if(e) {
        if(e.type == 1 && e.status > 0) {
          this.ba = e.index;
          if(b = e.La(a - e.x, d)) {
            this.cursor(this.ra);
            if(this.d != b.id && !b.state) {
              this.d > -1 && this.rows[this.d].t(false);
              b.t(true);
              this.G = true;
              this.d = b.id
            }
            return
          }else {
            if(this.d > -1) {
              this.rows[this.d].t(false);
              this.d = -1
            }
          }
          if(C(d - e.Sa) < 20) {
            this.cursor(this.ra);
            return
          }
          this.cursor(this.qa);
          return
        }else {
          if(this.d > -1) {
            this.rows[this.d].t(false);
            this.d = -1
          }
        }
        if(e.Ma(d)) {
          this.cursor(this.ra);
          this.ba = e.index;
          if(e.index != b) {
            b = 3 * (Math.random() > 0.5 ? 1 : -1);
            this.f[e.k].T += b;
            this.f[e.i].T += -b;
            this.G = true
          }
          return
        }
      }else {
        if(this.d > -1) {
          this.rows[this.d].t(false);
          this.d = -1
        }
      }
      this.cursor(this.qa)
    }
  }
}, zb:function(a, d) {
  a /= this.zoom;
  d /= this.zoom;
  this.Ia = this.Ga;
  this.e = this.Bb + (this.Cb - a);
  this.Ga = a;
  if(this.M) {
    this.Ja = this.Ha;
    this.M.c = this.Ab - (this.Db - d);
    this.Ha = d
  }
  this.G = true
}, W:function(a) {
  a && this.Ia && this.I(B(this.e + (this.Ia - this.Ga) * 10) + 0);
  if(a && this.M && this.Ja) {
    this.M.m = new M(this.M.c, B(this.M.c - (this.Ja - this.Ha) * 10) + 0, 1E3, D)
  }
  this.Xa = false;
  this.Ja = this.Ia = this.jc = null;
  this.cursor(this.qa);
  this.M = null
}, tb:function() {
  Q.Va()
}, wa:function(a) {
  this.mode = a;
  if(a == 0) {
    this.ua.innerHTML = "";
    this.fa.style.display = "none";
    if(!this.ma) {
      this.ma = setInterval(this.tb, 1E3 / 30, null)
    }
  }else {
    this.fa.style.display = this.ua.style.display = "block";
    if(this.ma) {
      clearInterval(this.ma);
      this.ma = null
    }
  }
  this.jb()
}, Tb:function(a) {
  this.ua.innerHTML = a;
  this.wa(1)
}, za:function() {
  this.h = this.sb / this.zoom;
  this.w = this.ka / this.zoom
}, jb:function() {
  var a = this.sb = window.innerHeight, d = this.ka = window.innerWidth;
  this.za();
  if(this.mode == 0) {
    var b = this.canvas;
    b.style.left = 0;
    b.style.top = 0;
    b.style.width = d + "px";
    b.width = d;
    b.style.height = a + "px";
    b.height = a;
    this.G = true
  }else {
    b = this.fa;
    var e = this.ua, c = getElementDimensions(e);
    b.style.left = 0;
    b.style.top = 0;
    b.style.width = d + "px";
    b.style.height = a + "px";
    e.style.left = B((d - c.w) / 2) + "px";
    e.style.top = B((a - c.h) / 2) + "px"
  }
}, Ib:function(a, d) {
  a = this.N(I, a, d);
  this.L.drawImage(this.O, 116, 0, 4, 8, a, d, 4, 8);
  a += 8;
  a = this.N(K, a, d);
  this.L.drawImage(this.O, 116, 0, 4, 8, a, d, 4, 8);
  a += 8;
  this.N(L, a, d)
}, N:function(a, d, b, e, c) {
  var h = a.length, f = this.L;
  c = h - c;
  for(var g = 0;g < h;g++) {
    c > g ? f.drawImage(this.O, B(Math.random() * 10) * 7 + 1, 0, 6, 8, d, b, 6, 8) : f.drawImage(this.O, (a.charCodeAt(g) - 48) * 7 + 1, 0, 6, 8, d, b, 6, 8);
    d += 8;
    if((h - g) % 3 == 1 && e && g + 1 < h) {
      f.drawImage(this.O, 78, 7, 2, 3, d, b + 7, 2, 3);
      d += 4
    }
  }
  if(e) {
    e == 1 ? f.drawImage(this.O, 70, 2, 7, 6, d, b + 2, 7, 6) : f.drawImage(this.O, 82, 0, 21, 8, d, b, 21, 8)
  }
  return d
}, Ya:function(a, d) {
  var b = this.f[d ? 0 : this.ea - 1], e = b.p, c = b.y, h = this.L;
  h.save();
  h.translate(e, c);
  d || h.scale(-1, 1);
  var f = b.T;
  b = Math.min(Math.PI, Math.max(0, 1.75 + f * 0.2 + 0));
  f = Math.min(Math.PI, Math.max(0, 1.75 + f * 0.1 + 0)) - 1;
  h.save();
  h.rotate(b);
  h.drawImage(this.$a, -8, 30);
  h.restore();
  h.save();
  h.rotate(f);
  h.drawImage(this.$a, -8, 30);
  h.restore();
  h.drawImage(d ? this.Nb[this.Ka] : this.Pb, -35, d ? -33 : -33);
  h.restore();
  if(a.status) {
    if(d) {
      x = e - 512 - 60;
      e = c - 245;
      h.drawImage(this.Ob, x, e);
      x += 156;
      this.Ib(x, e + 66);
      h = a.Pa;
      this.N(this.X.Jb, x, e + 136, 1, h);
      this.N(this.X.Kb, x, e + 276, 1, h);
      this.N(this.X.vb, x, e + 346, 2, h);
      this.N(this.X.ub, x, e + 416, 2, h)
    }
  }
}, Gb:function() {
  var a = this.L;
  a.lineJoin = "round";
  a.lineCap = "butt";
  a.lineWidth = 40;
  a.miterLimit = 10;
  a.strokeStyle = "#00ff00";
  var d = this.k, b = this.i;
  if(!(b - d < 2)) {
    var e = this.f, c = e[d].p, h = e[d].y, f = e[d + 1].p, g = e[d + 1].y, j = 0, k = 0, m, l;
    a.beginPath();
    a.moveTo(c, h);
    for(var w, y, F, J, u = d + 1;u < b;u++) {
      m = f;
      l = g;
      f = e[u + 1].p;
      g = e[u + 1].y;
      if(e[u + 1].V) {
        w = m - c;
        y = l - h
      }else {
        w = f - c;
        y = g - h
      }
      F = Math.sqrt(w * w + y * y);
      J = 1 / Math.max(2, F);
      w *= J * F * this.na;
      y *= J * F * this.na;
      if(e[u].V) {
        a.moveTo(m, l);
        y = w = 0
      }else {
        a.bezierCurveTo(c + j, h + k, m - w, l - y, m, l)
      }
      j = w;
      k = y;
      c = m;
      h = l
    }
    a.bezierCurveTo(c + j, h + k, f, g, f, g);
    a.stroke();
    if(this.Z) {
      a.lineWidth = 1;
      a.strokeStyle = "red";
      a.beginPath();
      for(u = d;u <= b;u++) {
        d = this.f[u];
        e = d.p;
        c = d.y;
        if(d.type == 0) {
          a.moveTo(e, c);
          a.lineTo(e + d.B * 100, c)
        }
        a.moveTo(e, c);
        a.lineTo(e, c + d.j * 100 + 10)
      }
      a.stroke()
    }
  }
}, Hb:function(a) {
  var d = this.L;
  d.fillStyle = "rgba(0,0,0,0.05)";
  for(var b = a.dc, e = a.ia;e <= a.Aa;e++) {
    var c = a.rows[e];
    if(c.state) {
      if(a.cb) {
        if(c.H) {
          d.save();
          var h = a.n;
          d.translate(a.x + a.Ea + h[0] / 2, a.c + c.y + h[1] / 2);
          d.rotate(c.H);
          d.drawImage(a.da, 0, a.n[1] * (c.o + c.la), h[0], h[1], -h[0] / 2, -h[1] / 2, c.w, c.h);
          d.restore()
        }else {
          d.drawImage(a.da, 0, a.n[1] * (c.o + c.la), a.n[0], a.n[1], a.x + a.Ea, a.c + c.y, c.w, c.h)
        }
      }else {
        d.fillRect(a.x + a.Ea, a.c + c.y, c.w, c.h)
      }
    }else {
      if(a.pb) {
        if(c.H) {
          d.save();
          d.translate(a.x + a.aa + v[0] / 2, a.c + c.y + v[1] / 2);
          d.rotate(c.H);
          d.drawImage(a.ha, 0, v[1] * c.xa, v[0], v[1], -v[0] / 2, -v[1] / 2, c.w, c.h);
          d.restore()
        }else {
          d.drawImage(a.ha, 0, v[1] * c.xa, v[0], v[1], a.x + a.aa, a.c + c.y, c.w, c.h)
        }
      }else {
        d.fillRect(a.x + a.aa, a.c + c.y, c.w, c.h)
      }
    }
    if(a.ga) {
      a.ob ? d.drawImage(a.ga, 0, z[1] * c.xa, z[0], z[1], a.x + b, a.c + c.y + c.h + 5, z[0], z[1]) : d.fillRect(a.x + b, a.c + c.y + c.h + 5, z[0], z[1])
    }
  }
}, Fb:function() {
  this.Eb(this.w, this.h)
}, Eb:function(a, d) {
  var b = this.h, e = this.L, c = B(this.e - this.w / 2);
  e.save();
  e.scale(this.zoom, this.zoom);
  e.fillStyle = this.oa;
  e.fillRect(0, 0, a, d);
  b = B(b / 2);
  e.translate(-c, b);
  this.Gb();
  for(c = Math.max(1, this.D);c <= this.S - 1;c++) {
    b = this.all[c];
    if(c == this.ba || b.status > 0 || b.Ua) {
      b.Sa = (!b.status ? b.U : b.direction ? Math.min(b.U, b.c - 40) : Math.max(b.U, b.c + b.K - 20)) + b.Ra[1];
      b.ya.complete && e.drawImage(b.ya, B(b.x + b.width / 2 + b.Ra[0]), b.Sa)
    }
    b.status > 0 && this.Hb(b)
  }
  this.D == 0 && this.Ya(this.q, true);
  this.S == this.u.index && this.Ya(this.u, false);
  e.restore();
  e.drawImage(this.Mb, this.ka - 31 - 44, this.sb - 15)
}};
var Q = null;
connect(window, "onload", function() {
  Q = new V;
  Q.setup(getElement("the_canvas"), getElement("the_overlay"), getElement("the_overlay_content"))
});
document.title = "Loading... - WEB WEB BOY";
