summaryrefslogtreecommitdiff
path: root/Pacman
diff options
context:
space:
mode:
authormcd223 <jacob@simplelittledream.com>2019-02-07 19:38:42 -0500
committermcd223 <jacob@simplelittledream.com>2019-02-07 19:38:42 -0500
commit5552ce957b496dd4f0b8447dbfbf8718fbd1f2a7 (patch)
tree50243c695dfb3252fde70254e50087e54044583e /Pacman
redesign 3
Diffstat (limited to 'Pacman')
-rw-r--r--Pacman/Adobe Flash settings manager.url5
-rw-r--r--Pacman/Read Me.txt9
-rw-r--r--Pacman/Read Me.txt~6
-rw-r--r--Pacman/extern_js/google.js2692
-rw-r--r--Pacman/index.html502
-rw-r--r--Pacman/logos/js/pacman10-hp.2.js3162
-rw-r--r--Pacman/logos/pacman10-hp-sprite.pngbin0 -> 7413 bytes
-rw-r--r--Pacman/logos/pacman10-hp.pngbin0 -> 7506 bytes
-rw-r--r--Pacman/logos/swf/pacman10-hp-sound.swfbin0 -> 130937 bytes
9 files changed, 6376 insertions, 0 deletions
diff --git a/Pacman/Adobe Flash settings manager.url b/Pacman/Adobe Flash settings manager.url
new file mode 100644
index 0000000..6e46ce0
--- /dev/null
+++ b/Pacman/Adobe Flash settings manager.url
@@ -0,0 +1,5 @@
+[InternetShortcut]
+URL=http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
+IDList=
+[{000214A0-0000-0000-C000-000000000046}]
+Prop3=19,2
diff --git a/Pacman/Read Me.txt b/Pacman/Read Me.txt
new file mode 100644
index 0000000..c610e4b
--- /dev/null
+++ b/Pacman/Read Me.txt
@@ -0,0 +1,9 @@
+To Play open the "Play GooglePacman.html"
+
+If you get no sound open the adobe link, and add the -
+"*your location* GooglePacman\logos\swf\pacman10-hp-sound.swf"
+to the always trust files in these locations:
+with the flash settings manager
+Regards:
+
+http://openhippo.com
diff --git a/Pacman/Read Me.txt~ b/Pacman/Read Me.txt~
new file mode 100644
index 0000000..75e9e71
--- /dev/null
+++ b/Pacman/Read Me.txt~
@@ -0,0 +1,6 @@
+To Play open the "Play GooglePacman.html"
+
+If you get no sound open the adobe link, and add the -
+"*your location* GooglePacman\logos\swf\pacman10-hp-sound.swf"
+to the always trust files in these locations:
+with the flash settings manager
diff --git a/Pacman/extern_js/google.js b/Pacman/extern_js/google.js
new file mode 100644
index 0000000..3acbca1
--- /dev/null
+++ b/Pacman/extern_js/google.js
@@ -0,0 +1,2692 @@
+(function () {
+if (!google.nocsixjs && google.timers && google.timers.load.t) google.timers.load.t.xjses = (new Date).getTime();
+})();
+(function () {
+ var g = true,
+ i = false;
+ google.browser = {};
+ google.browser.engine = {
+ IE: i,
+ GECKO: i,
+ WEBKIT: i,
+ OPERA: i
+ };
+ google.browser.product = {
+ IE: i,
+ FIREFOX: i,
+ SAFARI: i,
+ CHROME: i,
+ OPERA: i
+ };
+ google.browser.engine.version = "";
+ google.browser.product.version = "";
+ google.browser.init = function (a) {
+ var b = null,
+ c = null;
+ if (window.opera) {
+ google.browser.engine.OPERA = g;
+ google.browser.product.OPERA = g;
+ b = c = /Opera\/(\S+)/
+ } else if (a.indexOf("MSIE") != -1) {
+ google.browser.engine.IE = g;
+ google.browser.product.IE = g;
+ b = c = /MSIE\s+([^\);]+)(\)|;)/
+ } else if (a.indexOf("WebKit") != -1) {
+ google.browser.engine.WEBKIT = g;
+ if (a.indexOf("Chrome") != -1) {
+ google.browser.product.CHROME = g;
+ c = /Chrome\/(\S+)/
+ } else if (a.indexOf("Safari") != -1) {
+ google.browser.product.SAFARI = g;
+ c = /Version\/(\S+)/
+ }
+ b = /WebKit\/(\S+)/
+ } else if (a.indexOf("Gecko") != -1) {
+ google.browser.engine.GECKO = g;
+ if (a.indexOf("Firefox") != -1) {
+ google.browser.product.FIREFOX = g;
+ c = /Firefox\/(\S+)/
+ }
+ b = /rv\:([^\);]+)(\)|;)/
+ }
+ if (b) {
+ b = b.exec(a);
+ google.browser.engine.version = b ? b[1] : ""
+ }
+ if (c) {
+ b = c.exec(a);
+ google.browser.product.version = b ? b[1] : ""
+ }
+ };
+ google.browser.init(window.navigator.userAgent);
+ google.browser.compareVersions = function (a, b) {
+ function c(p, q) {
+ if (p < q) return -1;
+ else if (p > q) return 1;
+ return 0
+ }
+ for (var d = 0, e = a.replace(/^\s+|\s+$/g, "").split("."), f = b.replace(/^\s+|\s+$/g, "").split("."), h = Math.max(e.length, f.length), j = 0; d == 0 && j < h; j++) {
+ var t = e[j] || "",
+ u = f[j] || "",
+ v = new RegExp("(\\d*)(\\D*)", "g"),
+ w = new RegExp("(\\d*)(\\D*)", "g");
+ do {
+ var l = v.exec(t) || ["", "", ""],
+ m = w.exec(u) || ["", "", ""];
+ if (l[0].length == 0 && m[0].length == 0) break;
+ d = l[1].length == 0 ? 0 : parseInt(l[1], 10);
+ var x = m[1].length == 0 ? 0 : parseInt(m[1], 10);
+ d = c(d, x) || c(l[2].length == 0, m[2].length == 0) || c(l[2], m[2])
+ } while (d == 0)
+ }
+ return d
+ };
+ google.browser.isEngineVersion = function (a) {
+ return google.browser.compareVersions(google.browser.engine.version, a) >= 0
+ };
+ google.browser.isProductVersion = function (a) {
+ return google.browser.compareVersions(google.browser.product.version, a) >= 0
+ };
+ google.isOpera = i;
+ google.isIE = i;
+ google.isSafari = i;
+ google.xhr = function () {
+ var a = null;
+ try {
+ a = new XMLHttpRequest
+ } catch (b) {}
+ return a
+ };
+ google.style = {};
+ google.getComputedStyle = function (a, b, c) {
+ return google.style.getComputedStyle(a, b, c)
+ };
+ google.style.getComputedStyle = function (a, b, c) {
+ var d = c ? "" : 0;
+ var e = document.defaultView && document.defaultView.getComputedStyle(a, "");
+ if (!e) return d;
+ try {
+ d = e.getPropertyValue(b);
+ d = c ? d : parseInt(d, 10)
+ } catch (f) {}
+ return d
+ };
+ google.getHeight = function (a) {
+ return google.style.getHeight(a)
+ };
+ google.style.getHeight = function (a) {
+ var b = google.style.getComputedStyle(a, "height");
+ return b
+ };
+ google.getWidth = function (a) {
+ return google.style.getWidth(a)
+ };
+ google.style.getWidth = function (a) {
+ var b = google.style.getComputedStyle(a, "width");
+ return b
+ };
+ google.getPageOffsetTop = function (a) {
+ return google.style.getPageOffsetTop(a)
+ };
+ google.style.getPageOffsetTop = function (a) {
+ return a.offsetTop + (a.offsetParent ? google.style.getPageOffsetTop(a.offsetParent) : 0)
+ };
+ google.getPageOffsetLeft = function (a) {
+ return google.style.getPageOffsetLeft(a)
+ };
+ google.style.getPageOffsetLeft = function (a) {
+ return a.offsetLeft + (a.offsetParent ? google.style.getPageOffsetLeft(a.offsetParent) : 0)
+ };
+ google.getPageOffsetStart = function (a) {
+ return google.style.getPageOffsetStart(a)
+ };
+ google.style.getPageOffsetStart = function (a) {
+ return google.style.getPageOffsetLeft(a)
+ };
+ google.hasClass = function (a, b) {
+ return google.style.hasClass(a, b)
+ };
+ google.style.hasClass = function (a, b) {
+ if (!a) return i;
+ return (new RegExp("(^|\\s)" + b + "($|\\s)")).test(a.className)
+ };
+ google.getColor = function (a) {
+ return google.style.getColor(a)
+ };
+ google.style.getColor = function (a) {
+ return google.style.getComputedStyle(a, "color", g)
+ };
+ google.dom = {};
+ var k = /^(\w+)?(?:\.(.+))?$/;
+ google.append = function (a) {
+ return google.dom.append(a)
+ };
+ google.dom.append = function (a) {
+ return (document.getElementById("xjsc") || document.body).appendChild(a)
+ };
+ google.dom.create = function (a, b) {
+ var c = a.match(k),
+ d = document.createElement(c[1]);
+ if (c[2]) d.className = c[2];
+ if (b) d.innerHTML = b;
+ return d
+ };
+ google.dom.get = function (a, b, c) {
+ var d = a.match(k);
+ a = d[2] && new RegExp("\\b" + d[2]);
+ b = (b || document).getElementsByTagName(d[1] || "*");
+ if (a) {
+ d = 0;
+ var e = b;
+ b = [];
+ for (var f; f = e[d++];) a.test(f.className) && b.push(f)
+ }
+ return b.length > 1 || c ? b : b[0]
+ };
+ google.dom.insert = function (a, b, c) {
+ return b.parentNode.insertBefore(a, c ? b.nextSibling : b)
+ };
+ google.dom.remove = function (a) {
+ return a && a.parentNode && a.parentNode.removeChild(a)
+ };
+ google.dom.set = function (a) {
+ for (var b = 1; b < arguments.length; b += 2) {
+ var c = arguments[b],
+ d = arguments[b + 1],
+ e = a.style;
+ if (e && c in e) e[c] = d;
+ else if (c in a) a[c] = d;
+ }
+ return a
+ };
+ google.rhs = function () {};
+ var n, o = location,
+ r = location.protocol + "//" + location.host;
+ google.nav = function (a, b) {
+ try {
+ if ((new RegExp("^(" + r + ")?/url\\?.*&rct=j(&|$)")).test(a)) if (b) {
+ google.r = 1;
+ b.location.replace(a)
+ } else {
+ if (!n) {
+ n = document.createElement("iframe");
+ n.style.display = "none";
+ google.dom.append(n)
+ }
+ google.r = 1;
+ n.src = a
+ } else o.href = a
+ } catch (c) {
+ o.href = a
+ }
+ };
+ google.getURIPath = function () {
+ return window.location.pathname + window.location.search
+ };
+ google.eventTarget = function (a) {
+ return a.target;
+ };
+ google.srp = {};
+
+ function s(a, b, c) {
+ var d = new RegExp("([?&])" + b + "=.*?(&|$)");
+ a = a.replace(/^(.*)(#|$)/, function (e, f) {
+ return f
+ });
+ if (!a.match(d) && c != "") return a + "&" + b + "=" + c;
+ return a.replace(d, function (e, f, h) {
+ return c ? f + b + "=" + c + h : h ? f : ""
+ })
+ }
+ google.srp.isSerpLink = function (a) {
+ return /(search|images)/.test(a.href)
+ };
+ google.srp.isSerpForm = function (a) {
+ return /\/search$/.test(a.action)
+ };
+ google.srp.updateLinksWithParam = function (a, b, c, d) {
+ var e = document.getElementsByTagName("A");
+ google.base_href = s(google.base_href, a, b);
+ for (var f = 0, h; h = e[f++];) if (c(h)) {
+ h.href = s(h.href, a, b);
+ }
+ for (f = 0; c = document.forms[f++];) if (d(c)) {
+ for (h = e = 0; j = c.elements[h++];) if (j.name == a) {
+ e = 1;
+ if (b != "") j.value = b;
+ else j.parentNode.removeChild(j)
+ }
+ if (!e && b != "") {
+ e = document.createElement("input");
+ e.type = "hidden";
+ e.value = b;
+ e.name = a;
+ c.appendChild(e)
+ }
+ }
+ };
+ google.srp.qs = function (a) {
+ if (a = google.eventTarget(a)) {
+ for (; !google.style.hasClass(a, "qs");) {
+ a = a.parentNode;
+ if (!a || a == document.body) return
+ }
+ var b = document.getElementsByName("q"),
+ c = b && b[0];
+ b = document.getElementById("tsf-oq");
+ if (c && b && window.encodeURIComponent) {
+ c = c.value;
+ var d;
+ d = b.innerText;
+ if (c && c != d) {
+ d = s(a.href, "q", encodeURIComponent(c));
+ a.href = s(d, "prmd", "")
+ }
+ }
+ }
+ };
+ google.util = {};
+ var y = ["&", "&amp;", "<", "&lt;", ">", "&gt;", '"', "&quot;", "'", "&#39;", "{", "&#123;"];
+ google.util.escape = function (a) {
+ for (var b = 0; b < y.length; b += 2) a = a.replace(new RegExp(y[b], "g"), y[b + 1]);
+ return a
+ };
+ google.util.unescape = function (a) {
+ for (var b = 0; b < y.length; b += 2) a = a.replace(new RegExp(y[b + 1], "g"), y[b]);
+ return a
+ };
+ google.bind = function (a, b, c) {
+ google.listen(a, b, c)
+ };
+ google.listen = function (a, b, c) {
+ a.addEventListener ? a.addEventListener(b, c, i) : a.attachEvent("on" + b, c)
+ };
+ google.unbind = function (a, b, c) {
+ google.unlisten(a, b, c)
+ };
+ google.unlisten = function (a, b, c) {
+ a.removeEventListener ? a.removeEventListener(b, c, i) : a.detachEvent("on" + b, c)
+ };
+})();
+(function () {
+ var c = window,
+ f = Object,
+ h = google,
+ i = "push",
+ j = "length",
+ k = "propertyIsEnumerable",
+ l = "prototype",
+ m = "call";
+
+ function n(a) {
+ var b = typeof a;
+ if (b == "object") if (a) {
+ if (a instanceof Array || !(a instanceof f) && f[l].toString[m](a) == "[object Array]" || typeof a[j] == "number" && typeof a.splice != "undefined" && typeof a[k] != "undefined" && !a[k]("splice")) return "array";
+ if (!(a instanceof f) && (f[l].toString[m](a) == "[object Function]" || typeof a[m] != "undefined" && typeof a[k] != "undefined" && !a[k]("call"))) return "function"
+ } else return "null";
+ else if (b == "function" && typeof a[m] == "undefined") return "object";
+ return b
+ }
+
+ function o(a) {
+ return (new p).serialize(a)
+ }
+ function p() {}
+ p[l].serialize = function (a) {
+ var b = [];
+ this.a(a, b);
+ return b.join("")
+ };
+ p[l].a = function (a, b) {
+ switch (typeof a) {
+ case "string":
+ this.b(a, b);
+ break;
+ case "number":
+ this.d(a, b);
+ break;
+ case "boolean":
+ b[i](a);
+ break;
+ case "undefined":
+ b[i]("null");
+ break;
+ case "object":
+ if (a == null) {
+ b[i]("null");
+ break
+ }
+ if (n(a) == "array") {
+ this.c(a, b);
+ break
+ }
+ this.e(a, b);
+ break;
+ case "function":
+ break;
+ default:
+ throw Error("Unknown type: " + typeof a);
+ }
+ };
+ var q = {
+ '"': '\\"',
+ "\\": "\\\\",
+ "/": "\\/",
+ "\u0008": "\\b",
+ "\u000c": "\\f",
+ "\n": "\\n",
+ "\r": "\\r",
+ "\t": "\\t",
+ "\u000b": "\\u000b"
+ },
+ r = /\uffff/.test("\uffff") ? /[\\\"\x00-\x1f\x7f-\uffff]/g : /[\\\"\x00-\x1f\x7f-\xff]/g;
+ p[l].b = function (a, b) {
+ b[i]('"', a.replace(r, function (g) {
+ if (g in q) return q[g];
+ var d = g.charCodeAt(0),
+ e = "\\u";
+ if (d < 16) e += "000";
+ else if (d < 256) e += "00";
+ else if (d < 4096) e += "0";
+ return q[g] = e + d.toString(16)
+ }), '"')
+ };
+ p[l].d = function (a, b) {
+ b[i](isFinite(a) && !isNaN(a) ? a : "null")
+ };
+ p[l].c = function (a, b) {
+ var g = a[j];
+ b[i]("[");
+ for (var d = "", e = 0; e < g; e++) {
+ b[i](d);
+ this.a(a[e], b);
+ d = ","
+ }
+ b[i]("]")
+ };
+ p[l].e = function (a, b) {
+ b[i]("{");
+ var g = "";
+ for (var d in a) if (a.hasOwnProperty(d)) {
+ var e = a[d];
+ if (typeof e != "function") {
+ b[i](g);
+ this.b(d, b);
+ b[i](":");
+ this.a(e, b);
+ g = ","
+ }
+ }
+ b[i]("}")
+ };
+ c.google.stringify = o;
+ if (c.JSON && c.JSON.stringify && navigator.userAgent.indexOf("Chrome") == -1) c.google.stringify = c.JSON.stringify;
+ h.History = {};
+ var s = [],
+ t = "/";
+ h.History.client = function (a) {
+ s[i](a);
+ return s[j] - 1
+ };
+ var u, v;
+
+ function w() {
+ var a = u.value;
+ v = a ? eval("(" + a + ")") : {}
+ }
+ function x(a, b) {
+ w();
+ v[t] || (v[t] = {});
+ v[t][a] = b;
+ u.value = h.stringify(v)
+ }
+ var y = [];
+
+ function z() {
+ for (var a = 0, b; b = y[a++];) b();
+ y = []
+ }
+ h.History.addPostInitCallback = function (a) {
+ y[i](a)
+ };
+ h.History.save = function (a, b) {
+ u && x(a, b)
+ };
+ h.History.initialize = function (a) {
+ t = a;
+ v = null;
+ if (u = document.getElementById("hcache")) {
+ w();
+ for (a = 0; a < s[j]; ++a) v && v[t] && v[t][a] && s[a][m](null, v[t][a]);
+ z()
+ }
+ };
+})();
+(function () {
+ var a, b;
+ google.rhs = function () {
+ if (!google.drhs) if (document.getElementById("mbEnd") && (a || b)) {
+ var d = google.getHeight(document.getElementById("rhsline")),
+ c = a ? google.getHeight(a) : 0;
+ if (b) c += google.getHeight(b) + 18;
+ document.getElementById("rhspad").style.height = c > d ? Math.min(9999, c - d) + "px" : google.isIE ? "" : 0
+ }
+ };
+
+ function e() {
+ a = document.getElementById("tads");
+ b = document.getElementById("3po");
+ google.rhs()
+ }
+ e();
+ google.bind(window, "resize", google.rhs);
+ google.rein.push(e);
+})();
+(function () {
+ var f = 0,
+ g = [];
+ google.fx = {};
+ google.fx.linear = function (a) {
+ return a
+ };
+ google.fx.easeOut = function (a) {
+ return 1 - Math.pow(1 - a, 3)
+ };
+ google.fx.easeInAndOut = function (a) {
+ return (3 - 2 * a) * a * a
+ };
+ google.fx.animate = function (a, d, e) {
+ for (var c = 0, b; b = d[c++];) {
+ b[5] = b[5] == null ? "px" : b[5];
+ b[4] = b[4] || google.fx.linear;
+ h(b[0], b[1], b[2] + b[5])
+ }
+ g.push({
+ b: a,
+ a: e,
+ d: google.time(),
+ c: d
+ });
+ f = f || window.setInterval(i, 15)
+ };
+
+ function i() {
+ for (var a = 0, d; d = g[a++];) j(d) || g.splice(--a, 1);
+ if (!g.length) {
+ window.clearInterval(f);
+ f = 0
+ }
+ }
+
+ function j(a) {
+ var d = google.time() - a.d;
+ if (d >= a.b) {
+ for (var e = 0, c; c = a.c[e++];) h(c[0], c[1], c[3] + c[5]);
+ a.a && a.a();
+ return 0
+ } else {
+ for (e = 0; c = a.c[e++];) {
+ var b = c[2] + (c[3] - c[2]) * c[4](d / a.b);
+ if (c[5] == "px") b = Math.round(b);
+ h(c[0], c[1], b + c[5])
+ }
+ return 1
+ }
+ }
+
+ function h(a) {
+ for (var d = 1; d < arguments.length; d += 2) {
+ var e = arguments[d],
+ c = arguments[d + 1],
+ b = a.style;
+ if (b && e in b) b[e] = c;
+ else if (e in a) a[e] = c;
+ }
+ return a
+ }
+ google.fx.wrap = function (a) {
+ var d = document.createElement("div");
+ a.parentNode.replaceChild(d, a);
+ d.appendChild(a);
+ return d
+ };
+ google.fx.unwrap = function (a) {
+ a.parentNode.parentNode.replaceChild(a, a.parentNode)
+ };
+ google.dstr.push(function () {
+ window.clearInterval(f);
+ f = 0;
+ g = []
+ });
+})();
+(function () {
+ google.event = google.event || {};
+ google.event.back = {};
+ var d = [],
+ f = [],
+ g = {
+ persisted: false
+ };
+ google.event.back.saveHistory = function () {
+ google.History.save(i, g)
+ };
+ var j = google.event.back.saveHistory;
+
+ function k() {
+ for (var b = [], c = 0, a = d.length; c < a; c++) {
+ var e = d[c](g[f[c]]);
+ if (e) {
+ b.length > 0 && b.push(",");
+ b.push(e)
+ }
+ }
+ b.push("&ei=", google.kEI);
+ window.google.log("backbutton", b.join(""))
+ }
+
+ function l(b, c) {
+ return function (a) {
+ a = a || window.event;
+ for (a = a.target || a.srcElement; a.parentNode && a.tagName != "A";) a = a.parentNode;
+ b(a, c ? g[c] : null);
+ c && j()
+ }
+ }
+ function m(b, c, a) {
+ for (var e = document.getElementsByTagName("a"), o = 0, h; h = e[o++];) b(h) && google.bind(h, "click", l(c, a))
+ }
+ function n() {
+ if (!g.persisted) {
+ g.persisted = true;
+ j();
+ if (window.addEventListener) {
+ window.addEventListener("pageshow", p, false);
+ q = false
+ }
+ }
+ }
+ var r = google.j && google.j.en,
+ q;
+
+ function p(b) {
+ if ((b.persisted || q) && !r) k();
+ q = true
+ }
+ var i = google.History.client(function (b) {
+ g = b;
+ g.persisted && k()
+ });
+ google.event.back.register = function (b, c, a, e) {
+ if (e) g[e] = {};
+ m(b, c, e);
+ d.push(a);
+ f.push(e)
+ };
+ google.event.back.init = function () {
+ g = {
+ persisted: false
+ };
+ google.History.addPostInitCallback(n)
+ };
+
+ function s() {
+ d.length = 0;
+ f.length = 0
+ }
+ google.dstr && google.dstr.push(s);
+})();
+(function () {
+ var f = true,
+ i = null,
+ j = false,
+ l = window.google.ac = {},
+ aa = j,
+ m, ba, ca, da, ea, fa, ga, ha, ia, n, o, p, ja, q = "",
+ ka = i,
+ r = i,
+ s = i,
+ u = -1,
+ v, w, x, z, A, la, C, D, E, ma, na, pa, H, qa, ra = {},
+ sa, I = 0,
+ K = 0,
+ ta = j,
+ L = i,
+ M = 0,
+ ua, va;
+ var N;
+ var S;
+
+ function za(a) {
+ return (a = a && a.match(/\D+$/)) ? a[0] : i
+ }
+ var Aa = "hp",
+ Ba = "serp",
+ Ca = "img",
+ Da = {
+ 0: Aa,
+ 1: Ba,
+ 2: Ca
+ },
+ T;
+
+ function Ea(a) {
+ return (document.getElementById("main") || document.getElementById("xjsc") || document.body).appendChild(a)
+ }
+
+ function Fa() {
+ Ga();
+ U();
+ if (v) {
+ E.value = ma.value = na.value = H.value = pa.value = "";
+ window.clearTimeout(ka);
+ q = va = sa = "";
+ ka = r = s = i;
+ u = -1;
+ T = I = K = M = 0;
+ ra = {};
+ N = 0;
+ }
+ }
+ function Ha(a, b) {
+ T = 0;
+ if (a == "i") T = 2;
+ else if (b && b != "") T = 1
+ }
+
+ function Ia(a, b, c, d, e, h) {
+ Ha(c, d);
+ Ja();
+ h && Ka(h);
+ La();
+ v = a;
+ w = b;
+ p = ja = o = w.value;
+ if (!b.init) {
+ ua = document.getElementsByTagName("head")[0];
+ google.bind(v, "submit", Ma);
+ w.setAttribute("autocomplete", "off");
+ google.bind(w, "blur", U);
+ google.bind(w, "keydown", Na);
+ w.onkeyup = Oa;
+ w.setAttribute("spellcheck", j);
+ E = V("aq", "f");
+ ma = V("aqi", "");
+ na = V("aql", "");
+ H = V("oq", p);
+ pa = V("gs_rfai", "");
+ C = A = document.createElement("table");
+ A.cellSpacing = A.cellPadding = "0";
+ D = la = A.style;
+ A.className = "gac_m";
+ if (n) {
+ C = x = document.createElement("div");
+ x.className = "gac_od";
+ D = x.style;
+ Ea(x);
+ if (T == 1) {
+ a = document.createElement("div");
+ a.className = "gac_wd";
+ x.appendChild(a)
+ }
+ z = document.createElement("div");
+ z.cellSpacing =
+ x.cellPadding = "0";
+ z.className = "gac_id";
+ x.appendChild(z);
+ z.appendChild(A)
+ } else v.appendChild(A)
+ }
+ b.init = f;
+ U();
+ Pa();
+ if (!aa) {
+ Qa();
+ aa = f
+ }
+ b = Da[T];
+ b = "&client=" + b;
+ c = c ? "&ds=" + c : "";
+ a = e ? "&tok=" + encodeURIComponent(e) : "";
+ d = ["?hl=", google.kHL, b, Ra(), c, (d ? "&pq=" + encodeURIComponent(d) : ""), a].join("");
+ sa = "/complete/search" + d;
+ va = "/complete/deleteitems" + d;
+ N = Sa(w);
+ Ua();
+ e = ha || e && e.length || "https:" == document.location.protocol;
+ ia = ["http", e ? "s" : "", "://"].join("");
+ (new Image).src = ia + "clients1.google.com/generate_204";
+ }
+
+ function Qa() {
+ function a(d, e) {
+ b.push(d, "{", e, "}")
+ }
+ var b = [];
+ if (n) {
+ var c = "background:white;margin:0;z-index:99;";
+ a(".gac_od", c + "border-top:0;border-left:0;border-right:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;padding:0!important;position:absolute");
+ a(".gac_id", c + "border-top:1px solid #a2bff0;border-left:1px solid #a2bff0;border-right:1px solid #558be3;border-bottom:1px solid #558be3;display:block;position:relative");
+ a(".gac_m", c + "border:0;cursor:default;display:block;font-size:17px;line-height:117%;padding:0;position:relative");
+ if (!document.body.dir || document.body.dir == "ltr") a(".gac_wd", "background:#999;height:1px;position:absolute;right:-1px;top:0;width:1px;z-index:100")
+ } else a(".gac_m", "background:white;border:1px solid #666;cursor:default;font-size:17px;line-height:117%;margin:0;position:absolute;z-index:99");
+ a(".gac_m td", "line-height:22px");
+ a(".gac_n", "padding-top:1px;padding-bottom:1px");
+ a(".gac_b td.gac_c", "background:#d5e2ff");
+ a(".gac_b", "background:#d5e2ff");
+ a(".gac_a td.gac_f", "background:#fff8dd");
+ a(".gac_p", "padding:1px 4px 2px 3px");
+ a(".gac_u", "padding:0 0 1px 0;line-height:117%;text-align:left");
+ a(".gac_t", "width:100%;text-align:left;font-size:17px");
+ a(".gac_za", "position:absolute;bottom:0;right:0;text-align:right;font-size:12px;padding-right:5px");
+ a(".gac_bt", "width:" + (w.offsetWidth - 2) + "px;text-align:center;padding:8px 0 7px;position:relative");
+ a(".gac_sb", "font-size:15px;height:28px;margin:0.2em" + ";-webkit-appearance:button");
+ a(".gac_z", "white-space:nowrap;color:#c00");
+ a(".gac_s", "height:3px;font-size:1px");
+ c = n ? 7 : 3;
+ c = "white-space:nowrap;overflow:hidden;text-align:left;padding-left:" + c + "px;padding-right:3px";
+ a(".gac_c", c);
+ a(".gac_e", "text-align:right;padding:0 3px");
+ a(".gac_d", "font-size:11px");
+ a(".gac_h", "color:green");
+ a(".gac_j", "display:block");
+ a(".gac_l", "line-height:18px");
+ a(".gac_x", "display:block;line-height:16px");
+ a(".gac_y", "font-size:13px");
+ a(".gac_i", "color:#666");
+ a(".gac_w img", "width:40px;height:40px");
+ a(".gac_w", "width:1px");
+ a(".gac_r", "color:red");
+ a(".gac_v", "padding-bottom:5px");
+ c = document.createElement("style");
+ c.setAttribute("type", "text/css");
+ ua.appendChild(c);
+ b = b.join("");
+ c.appendChild(document.createTextNode(b));
+ }
+
+ function Pa() {
+ if (C) {
+ var a = Va(w);
+ D.left = a.B + "px";
+ a = a.D + w.offsetHeight - 1;
+ n && T == 1 && a++;
+ D.top = a + "px";
+ a = w.offsetWidth;
+ if (n) D.minWidth = a + "px";
+ else D.width = a + "px";
+ if (r) {
+ var b = W(0);
+ if (b && a - 12 >= 0) b.firstChild.style.width = a - 12 + "px"
+ }
+ }
+ }
+ function Va(a) {
+ for (var b = 0, c = 0; a;) {
+ b += a.offsetTop;
+ c += a.offsetLeft;
+ a = a.offsetParent
+ }
+ return {
+ D: b,
+ B: c
+ }
+ }
+
+ function V(a, b) {
+ var c = document.createElement("input");
+ c.type = "hidden";
+ c.name = a;
+ c.value = b;
+ return v.appendChild(c)
+ }
+ function Na(a) {
+ var b = a.keyCode;
+ if (b == 27 && Wa()) {
+ U();
+ X(p);
+ a.cancelBubble = f;
+ return a.returnValue = j
+ }
+ if (b == 13) {
+ Xa(j);
+ a.cancelBubble = f;
+ return a.returnValue = j
+ }
+ if (b == 38 || b == 40) {
+ K++;
+ K % 3 == 1 && Ta(b);
+ a.cancelBubble = f;
+ a.returnValue = j;
+ return j
+ }
+ }
+
+ function Xa(a) {
+ if (!a && qa) {
+ v.removeChild(qa);
+ qa = i
+ }
+ if (s && u != -1 && ta && !(a && s.A)) s.onclick(i);
+ else if (w.value == "") U();
+ else {
+ if (a) qa = V("btnI", "1");
+ Ya()
+ }
+ }
+ function Ya() {
+ Ma();
+ v.onsubmit && v.onsubmit() == j || v.submit()
+ }
+ function Oa(a) {
+ a = a.keyCode;
+ if (!K) Ta(a);
+ K = 0;
+ return !(a == 38 || a == 40)
+ }
+
+ function Ta(a) {
+ if (w.value != o) {
+ p = w.value;
+ N = Sa(w);
+ H.value = p
+ }
+ if (a == 40 || a == 38) {
+ Za(a == 40);
+ ta = Wa()
+ }
+ Pa();
+ if (q != p && !L) L = window.setTimeout(U, 500);
+ o = w.value
+ }
+
+ function $a() {
+ ta = j;
+ if (!M) {
+ if (s) s.className = "gac_a";
+ s = this;
+ for (var a = 0, b; b = W(a); a++) b == s && (u = a);
+ s.className = "gac_b"
+ }
+ }
+ function ab(a, b) {
+ return function (c) {
+ bb(cb(a), b);
+ db(c);
+ return j
+ }
+ }
+ function cb(a) {
+ return [a, "&aq=", s.m, "&oq=", H.value, Z("aqi", ma), Z("aql", na), Z("gs_rfai", pa)].join("")
+ }
+
+ function Z(a, b) {
+ if (b && b.value.length && a.length) return ["&", a, "=", b.value].join("");
+ return ""
+ }
+ function bb(a, b) {
+ var c = window.frames.wgjf;
+ if (c && !b) {
+ google.r = 1;
+ c.location.replace(a)
+ } else window.location = a
+ }
+
+ function eb() {
+ X(this.j);
+ Ya();
+ }
+
+ function Za(a) {
+ if (!(p != q || !r || !r.length)) if (Wa()) {
+ if (s) s.className = "gac_a";
+ for (var b = r.length, c = (u + 1 + (a ? 1 : b)) % (b + 1) - 1; c != -1 && W(c).t;) c = (c + 1 + (a ? 1 : b)) % (b + 1) - 1;
+ u = c;
+ if (u == -1) fb();
+ else {
+ s = W(c);
+ s.className = "gac_b";
+ X(s.j);
+ E.value = s.m
+ }
+ } else gb()
+ }
+ function fb() {
+ w.focus();
+ X(p);
+ s = i;
+ E.value = "f"
+ }
+ function U() {
+ if (L) {
+ window.clearTimeout(L);
+ L = i
+ }
+ D && (D.visibility = "hidden");
+ }
+
+ function gb() {
+ D && (D.visibility = "visible");
+ Pa();
+ M = 1
+ }
+ function Wa() {
+ return !!D && D.visibility == "visible"
+ }
+ function Ga() {
+ if (A) {
+ A.innerHTML = "";
+ }
+ }
+
+ function hb(a, b, c) {
+ a.onclick = b ? ab(b, c) : eb;
+ a.A = !b;
+ a.onmousedown = ib;
+ a.onmouseover = $a;
+ a.onmousemove = function () {
+ if (M) {
+ M = 0;
+ $a.call(this)
+ }
+ }
+ }
+ function jb(a, b) {
+ db(a);
+ a = 0;
+ for (var c; c = W(a++);) if (c.m == b) {
+ kb(va, "delq", c.j, lb);
+ break
+ }
+ return j
+ }
+ function lb(a) {
+ for (var b = 0, c; c = W(b++);) if (za(c.m) == "p" && c.j == a[0]) {
+ c.t = 1;
+ c.onclick = c.onmouseover = i;
+ if (c == s) {
+ c.className = "gac_a";
+ u = -1;
+ fb()
+ }
+ c.v.className = "gac_c gac_i fl";
+ c.v.innerHTML = "This search was removed from your \x3ca href\x3d\x22/history\x22\x3eWeb History\x3c/a\x3e"
+ }
+ }
+
+ function mb(a) {
+ function b(oa, Y) {
+ Y = Y ? za(Y[2]) : i;
+ oa = oa + (Y ? "-" + Y : "");
+ if (oa != e) {
+ if (h) d += e + h;
+ h = 0;
+ e = oa
+ }
+ h++
+ }
+ var c = a[0];
+ I > 0 && I--;
+ if (!(!A || c != p)) {
+ if (L) {
+ window.clearTimeout(L);
+ L = i
+ }
+ q = a[0];
+ Ga();
+ var d = "",
+ e, h = 0;
+ c = a[1];
+ for (var g = c.length - 1, k = 0, t, F, G, y, J, B; k <= g; k++) if (B = c[k]) if (y = ra[B[1]]) {
+ y.w && y.w(k, g) && nb();
+ t = B[2];
+ F = B[3];
+ G = y.k ? y.k(B, F) : i;
+ J = A.insertRow(-1);
+ hb(J, G, y.z);
+ J.m = t;
+ J.className = "gac_a";
+ G = J.v = document.createElement("td");
+ G.className = "gac_c";
+ y.e(G, t, B, F);
+ t = y.q;
+ J.j = t ? t(B, F, q) : B[0];
+ J.appendChild(G);
+ b(y.b, B);
+ k < g && y.C && nb()
+ }
+ na.value = a[3] || "";
+ pa.value = a[4] || "";
+ if ((r = A.rows) && r.length > 0) {
+ if (T == 0) pb();
+ else if (T == 1 && ga) {
+ a = nb();
+ c = a.style;
+ c.textAlign = "right";
+ c.fontSize = "12px";
+ c.paddingRight = "5px";
+ a.innerHTML = qb()
+ }
+ gb()
+ } else U();
+ b("");
+ ma.value = d;
+ u = -1
+ }
+ }
+ function W(a) {
+ b = r.item(a);
+ return b
+ }
+
+ function rb(a) {
+ var b = a ? "I\x26#39;m Feeling Lucky" : "Google Search",
+ c = "gac_sb",
+ d = "",
+ e = "";
+ if (n) {
+ c = "lsb";
+ d = "<span class=ds><span class=lsbb>";
+ e = "</span></span>"
+ }
+ return [d, '<input type=button value="', b, '" class=', c, ' onclick="google.ac.rd(', a, ')">', e].join("")
+ }
+
+ function pb() {
+ var a = A.insertRow(-1);
+ a.t = 1;
+ a.onmousedown = ib;
+ var b = "";
+ if (ga) b = "<div class=gac_za>" + qb() + "</div>";
+ a = a.insertCell(0);
+ a.innerHTML = ['<div style="position:relative"><div class=gac_bt>', rb(j), rb(f), "</div>", b, "</div>"].join("")
+ }
+ function qb() {
+ return '<a href="http://www.google.com/support/websearch/bin/answer.py?hl=fr&answer=106230">En savoir plus</a>'
+ }
+
+ function $(a, b) {
+ return ['href="', a, '" onmousedown="google.ac.r(event, this, \'', b, '\')" onclick="return google.ac.c(event)"'].join("")
+ }
+ function sb(a, b, c) {
+ m = j;
+ if (a.which) m = a.which == 2;
+ else if (a.button) m = a.button == 4;
+ b.href = cb(c)
+ }
+ function tb(a) {
+ if (m) {
+ db(a);
+ return f
+ }
+ return j
+ }
+
+ function db(a) {
+ if (a) {
+ a.stopPropagation();
+ a.cancelBubble = a.cancel = a.returnValue = f
+ }
+ }
+
+ function nb() {
+ var a = A.insertRow(-1);
+ a.t = 1;
+ a.onmousedown = ib;
+ a = a.insertCell(0);
+ a.className = "gac_s";
+ return a
+ }
+ function Ma() {
+ U();
+ if (r && W(u) && H.value != w.value) E.value = W(u).m;
+ else {
+ H.value = "";
+ E.value = "f";
+ if (I >= 10) E.value = "o"
+ }
+ }
+ function Ua() {
+ if (p && ja != p) {
+ I++;
+ kb(sa, "q", p, mb);
+ w.focus()
+ }
+ ja = p;
+ for (var a = 100, b = 1; b <= (I - 2) / 2; b++) a *= 2;
+ a += 50;
+ ka = window.setTimeout(Ua, a)
+ }
+
+ function kb(a, b, c, d) {
+ S && ua.removeChild(S);
+ S = document.createElement("script");
+ S.src = [ia, "clients1.google.com", a, "&", b, "=", encodeURIComponent(c), "&cp=" + N].join("");
+ ua.appendChild(S);
+ }
+ function X(a) {
+ if (w) w.value = o = a
+ }
+ function ob(a, b) {
+ a.appendChild(document.createTextNode(b))
+ }
+
+ function ib(a) {
+ a.stopPropagation();
+ return j
+ }
+
+ function Sa(a) {
+ var b = 0,
+ c = 0;
+ if (xb(a)) {
+ b = a.selectionStart;
+ c = a.selectionEnd
+ }
+ return b && c && b == c ? b : 0
+ }
+ function xb(a) {
+ try {
+ return typeof a.selectionStart == "number"
+ } catch (b) {
+ return j
+ }
+ }
+
+ function Ja() {
+ ba = f;
+ ca = j;
+ da = f;
+ ea = j;
+ fa = f;
+ n = ga = ha = j
+ }
+ function Ka(a) {
+ if ("a" in a) ba = a.a;
+ if ("f" in a) ga = a.f;
+ if ("l" in a) ca = a.l;
+ if ("n" in a) da = a.n;
+ if ("o" in a) ea = a.o;
+ if (T == 2) fa = j;
+ else if ("p" in a) fa = a.p;
+ if ("s" in a) ha = a.s;
+ if ("sw" in a) n = a.sw
+ }
+ function La() {
+ var a = [yb];
+ ba && a.push(zb);
+ ca && a.push(Ab);
+ da && a.push(Bb);
+ ea && a.push(Cb, Db, Eb, Fb, Gb, Hb, Ib, Jb, Kb, Lb);
+ Mb(a)
+ }
+ function Mb(a) {
+ for (var b = 0, c; c = a[b++];) ra[c.g] = c
+ }
+ var zb = {
+ g: 8,
+ b: "a",
+ C: f,
+ q: function (a, b, c) {
+ return c
+ },
+ k: function (a, b) {
+ return b[1] + Ra()
+ },
+ w: function (a, b) {
+ return a == b
+ },
+ e: function (a, b, c, d) {
+ b = d[0];
+ var e = d[1] + Ra();
+ c = d[2];
+ var h = d[3];
+ d = d[4];
+ a.className = "gac_f gac_p";
+ var g = b.replace(/<\/?[b|em]>/gi, "");
+ e = $("http://" + g, e);
+ a.innerHTML = ['<table cellpadding=0 cellspacing=0 border=0 class=gac_t><tr><td><table cellpadding=0 cellspacing=0 border=0 class=gac_t><tr><td style="line-height:117%;vertical-align:bottom"><a class=q ', e, ">", c, '</a><td class="gac_e gac_d gac_i">Sponsored Link</table><tr><td class="gac_u gac_x gac_y" style="line-height:16px;padding-bottom:8px"><span class=gac_h', ">", b, "</span>&nbsp; &nbsp;", h, d ? " " + d : "", "</table>"].join("")
+ }
+ },
+ Hb = {
+ g: 11,
+ b: "b",
+ z: f,
+ k: function (a, b) {
+ return b[0]
+ },
+ e: function (a, b, c, d) {
+ b = d[0];
+ c = d[1];
+ var e = d[2],
+ h = d[3],
+ g = d[4],
+ k = d[5],
+ t = d[6];
+ d = d[7];
+ var F = b.match(/^([^&]*)/)[1];
+ a.innerHTML = ['<span class="gac_j gac_l"><a class=q ', $(F, b), "><b>", c, "</b> - ", e, " (", h, ")</a><br><b>", g, "</b> <span class=gac_y><span class=gac_", k >= 0 ? "h" : "r", ">", k, " (", t, "%)</span> ", d, ' - </span><a href=/help/stock_disclaimer.html class="gac_d fl" onclick="google.ac.p(event);return true">Disclaimer</a></span>'].join("")
+ }
+ },
+ Ib = {
+ g: 12,
+ b: "c",
+ k: function (a, b) {
+ return b[0]
+ },
+ e: function (a, b, c, d) {
+ b = d[0];
+ c = d[1];
+ d = d[2];
+ for (var e = "", h = d.length - 1, g = 0, k; g < h; g++) {
+ k = d[g];
+ e += [k[0], '<div class="gac_v">', k[1], "</div>"].join("")
+ }
+ k = d[h];
+ e += [k[0], "<br>", k[1]].join("");
+ Nb(1, a, c, b, "www.flightstats.com", e)
+ }
+ },
+ Jb = {
+ g: 15,
+ b: "d",
+ e: function (a, b, c, d) {
+ b = d[0];
+ c = d[1];
+ var e = d[2];
+ d = d[3];
+ a.innerHTML = ["<b>", b, "</b> ", e, " (", c, ") in <b>", d, "</b>"].join("")
+ }
+ },
+ Kb = {
+ g: 13,
+ b: "e",
+ k: function (a, b) {
+ return b[0]
+ },
+ e: function (a, b, c, d) {
+ b = d[0];
+ c = d[1];
+ d = d[2];
+ Nb(1, a, c, b, d)
+ }
+ },
+ Db = {
+ g: 14,
+ b: "f",
+ k: function (a, b) {
+ return b[0]
+ },
+ e: function (a, b, c, d) {
+ b = d[0];
+ c = d[1];
+ var e = d[2];
+ d = d[3];
+ Nb(1, a, c, b, d, e)
+ }
+ },
+ yb = {
+ g: 0,
+ b: "g",
+ q: function (a) {
+ return a.j
+ },
+ e: function (a, b, c) {
+ var d = c[0];
+ a.innerHTML = d;
+ c.j = Ob(a);
+ if (fa && za(b) == "p") {
+ a.className = "";
+ a.innerHTML = ["<table cellpadding=0 cellspacing=0 border=0 class=gac_t><tr><td class=gac_c>", d, '<td class="gac_d gac_e fl"><a href=# onclick="return google.ac.dc(event,\'', b, "')\">Remove</a></table>"].join("");
+ }
+ }
+ },
+ Eb = {
+ g: 19,
+ b: "h",
+ e: function (a, b, c, d) {
+ b = d[0];
+ d = d[1];
+ a.innerHTML = ["<b>", b, " = ", d, "</b>"].join("")
+ }
+ },
+ Cb = {
+ g: 17,
+ b: "i",
+ k: function (a, b) {
+ return b[3]
+ },
+ e: function (a, b, c, d) {
+ b = d[0];
+ c = d[1];
+ var e = d[2];
+ d = d[3];
+ var h = d.match(/url=([^&]*)/)[1];
+ a.innerHTML = ['<span class="gac_j gac_l"><a ', $(h, d), ">", b, " &#151; ", c, ": ", e, '</a><span class=gac_y style="line-height:16px"><br>According to <span class=gac_h>', h, "</span></span></span>"].join("")
+ }
+ },
+ Lb = {
+ g: 10,
+ b: "j",
+ e: function (a, b, c, d) {
+ b = d[0];
+ c = d[1];
+ var e = d[4];
+ d = d[5];
+ var h = function (g) {
+ var k = g[0],
+ t = g[1],
+ F = g[2],
+ G = g[3];
+ g = g[4];
+ return ['<td class=gac_w><img src="', k, '" alt="', t, '" title="', t, '"><td class="gac_c" style="line-height:112%;vertical-align:top">', g, "<br>", F, "&deg; | ", G, "&deg;"].join("")
+ };
+ a.innerHTML = ["<b>Weather:</b> ", e, "&deg;", c, " in ", b, "<br><table class=gac_t><tr>", h(d[0]), h(d[1]), h(d[2]), h(d[3]), "</table>"].join("")
+ }
+ },
+ Fb = {
+ g: 20,
+ b: "k",
+ e: function (a, b, c, d) {
+ b = d[0];
+ d = d[1];
+ a.innerHTML = ["<b>", b, " = ", d, '</b> - <a href=/intl/en/help/currency_disclaimer.html class="gac_d fl" onclick="google.ac.p(event);return true">Disclaimer</a>'].join("")
+ }
+ },
+ Gb = {
+ g: 16,
+ b: "l",
+ q: function (a, b) {
+ return "define: " + b[0]
+ },
+ e: function (a, b, c, d) {
+ b = d[0];
+ c = d[1];
+ d = d[2];
+ Nb(1, a, "Web definitions for <b>" + b + "</b>", "/search?q=define:" + b.replace(" ", "+"), "www.google.com", [c, " - <span class=gac_i>", d, "</span>"].join(""))
+ }
+ },
+ Ab = {
+ g: 30,
+ b: "m",
+ q: function (a) {
+ return a.j
+ },
+ e: function (a, b, c) {
+ b = c[0];
+ var d = document.createElement("div");
+ d.innerHTML = b;
+ c.j = Ob(d);
+ a.innerHTML = ["<span class=gac_z>Did you mean: </span>", b].join("")
+ }
+ };
+
+ function Ob(a) {
+ var b;
+ b = a.textContent;
+ return b
+ }
+ var Bb = {
+ g: 5,
+ b: "n",
+ q: function (a, b, c) {
+ return c
+ },
+ k: function (a, b) {
+ return b[0]
+ },
+ e: function (a, b, c, d) {
+ b = d[0];
+ d = d[1];
+ a.className = "gac_c gac_n";
+ a.style.lineHeight = "117%";
+ var e = c[0];
+ c = e.replace(/HTTPS?:\/\//gi, "");
+ e = e.replace(/<\/?[b|em]>/gi, "");
+ /^HTTPS?:\/\//i.test(e) || (e = (b.indexOf("/url?url=https:") > 0 ? "https" : "http") + "://" + e);
+ b = $(e, b);
+ a.innerHTML = ["<span class=gac_x><a ", b, ">", d, '</a><br><span class="gac_h gac_y"', ">", c, "</span></span>"].join("");
+ }
+ };
+
+ function Nb(a, b, c, d, e, h, g) {
+ var k = d.indexOf("/url") ? d : d.match(/url=([^&]*)/)[1];
+ b.style.lineHeight = "112%";
+ b.innerHTML = ["<a class=q ", $(k, d), ">", c, '</a><span class="gac_y' + (a ? " gac_x" : "") + '">', h ? h + "<br>" : "", g ? g + "<br>" : "", e ? "<span class=gac_h>" + e + "</span></span>" : ""].join("")
+ }
+ function Ra() {
+ if (google.kEXPI) return "&expIds=" + google.kEXPI;
+ return ""
+ }
+ l.c = tb;
+ l.d = lb;
+ l.dc = jb;
+ l.h = mb;
+ l.i = Ia;
+ l.p = db;
+ l.r = sb;
+ l.rd = Xa;
+ l.u = X;
+ google.bind(window, "resize", Pa);
+ google.dstr && google.dstr.push && google.dstr.push(Fa);
+})();
+(function () {
+ window.ManyBox = {};
+ var d, g, i = 1,
+ l = google.History.client(j);
+
+ function m(a) {
+ for (var b in d) if (d[b].c && a(d[b])) return
+ }
+ function n(a, b, c, e, f) {
+ this.c = a;
+ this.j = b;
+ this.B = e;
+ this.o = f;
+ this.q = "/mbd?" + (b ? "docid=" + b : "") + "&resnum=" + a.replace(/[^0-9]/, "") + "&mbtype=" + e + "&usg=" + c + "&hl=" + (google.kHL || "");
+ this.e = {};
+ this.m = "";
+ g[a] = {
+ r: 0,
+ D: this.e,
+ j: this.j,
+ i: 0
+ };
+ this.n = 0
+ }
+ n.prototype.append = function (a) {
+ this.m += "&" + a.join("&")
+ };
+
+ function o(a, b) {
+ a.g.style.paddingTop = b + "px";
+ a.g.style.display = a.g.innerHTML ? "" : "none";
+ if (b > a.n) a.n = b;
+ a.h.style.fontSize = b + "px";
+ a.h.style.fontSize = null
+ }
+
+ function q(a) {
+ if (!a.A) {
+ a.A = 1;
+ a.d = document.getElementById("mbb" + a.c);
+ a.k = 0;
+ a.a = document.getElementById("mbl" + a.c);
+ a.h = a.a.getElementsByTagName("DIV")[0];
+ a.p = a.a.getElementsByTagName("A")[0];
+ a.z = a.p.innerHTML;
+ a.o = a.o || a.z;
+ a.h.title = "Click for more information";
+ a.a.F = function (b, c) {
+ var e = google.getPageOffsetStart(a.a),
+ f = google.getPageOffsetTop(a.a);
+ return b > e - 5 && b < e + google.getWidth(a.a) + 5 && c > f - 5 && c < f + google.getHeight(a.a) + 5
+ };
+ a.g = document.getElementById("mbf" + a.c);
+ o(a, 0);
+ a.a.onmousedown = r(a);
+ a.a.onclick = s(a);
+ a.a.go =
+
+ function () {
+ a.a.onmousedown();
+ a.a.onclick()
+ }
+ }
+ }
+ function t(a) {
+ google.log("manybox", [a.k ? "close" : "open", "&id=", a.c, "&docid=", a.j, "&mbtype=", a.B, a.m].join(""))
+ }
+
+ function r(a) {
+ return function () {
+ if (g[a.c].i) a.I++ < 3 && t(a);
+ else {
+ if (a.e.l) t(a);
+ else {
+ var b = google.xhr();
+ if (b) {
+ b.open("GET", a.q + a.m + "&zx=" + google.time());
+ a.t = 0;
+ b.onreadystatechange = function () {
+ if (b.readyState == 4) {
+ var c = 0;
+ if (b.status == 200) try {
+ eval(b.responseText);
+ c = 1
+ } catch (e) {}
+ if (!c && !a.C) {
+ g[a.c].i = 0;
+ a.C = 1;
+ a.q += "&cad=retry";
+ a.a.onmousedown()
+ } else {
+ a.u && u(a);
+ a.t = 0
+ }
+ }
+ };
+ a.t = 1;
+ b.send(null)
+ }
+ }
+ g[a.c].i = a.I = 1
+ }
+ }
+ }
+ function s(a) {
+ return function () {
+ g[a.c].i || a.a.onmousedown();
+ (a.u = a.t) || u(a)
+ }
+ }
+
+ function v(a) {
+ if (!a.e.l) {
+ a.e.l = "\x3cfont color\x3dred\x3eError:\x3c/font\x3e The server could not complete your request. Try again in 30 seconds.";
+ a.G = a.a.onclick;
+ a.a.onclick = function () {
+ i = 0;
+ u(a);
+ i = 1;
+ a.b.parentNode.removeChild(a.b);
+ g[a.c].i = a.e.l = a.v = 0;
+ a.a.onclick = a.G
+ }
+ }
+ if (!a.v) {
+ a.v = 1;
+ var b = document.getElementById("res");
+ a.H = b && google.getPageOffsetStart(a.d) > google.getPageOffsetStart(b) + google.getWidth(b);
+ a.b = document.createElement("div");
+ o(a, 0);
+ a.b.style.position = "absolute";
+ a.b.style.paddingTop = a.b.style.paddingBottom = "6px";
+ a.b.style.display = "none";
+ a.b.className = "med";
+ b = document.createElement("div");
+ a.b.appendChild(b);
+ b.className = "std";
+ b.innerHTML = a.e.l;
+ a.g.parentNode.insertBefore(a.b, a.g)
+ }
+ }
+ function j(a) {
+ i = 0;
+ ManyBox.init();
+ m(function (b) {
+ if (b.j == a[b.c].j) {
+ b.e = a[b.c].D;
+ a[b.c].r != b.k && u(b)
+ } else a[b.c].i = 0
+ });
+ g = a;
+ i = 1;
+ google.History.save(l, g)
+ }
+ ManyBox.create = function (a, b, c, e, f) {
+ return new n(a, b, c, e, f)
+ };
+ ManyBox.register = function (a, b, c, e, f) {
+ return d[a] = ManyBox.create(a, b, c, e, f)
+ };
+ google.bind(document, "click", function (a) {
+ a = a || window.event;
+ for (var b = a.target || a.srcElement; b.parentNode;) {
+ if (b.tagName == "A" || b.onclick) return;
+ b = b.parentNode
+ }
+ m(function (c) {
+ if (c.a.F(a.clientX, a.clientY)) {
+ c.a.go();
+ return 1
+ }
+ })
+ });
+
+ function w() {
+ d = {};
+ g = {};
+ history.navigationMode = history.navigationMode && "fast"
+ }
+ w();
+ ManyBox.init = function () {
+ m(q)
+ };
+
+ function x(a, b) {
+ a.b.style.clip = "rect(0px," + (a.d.width || "34em") + "," + (b || 1) + "px,0px)"
+ }
+ n.prototype.insert = function (a) {
+ this.e.l = a
+ };
+
+ function y(a) {
+ a.f = document.getElementById("mbcb" + a.c);
+ var b = a.f && a.f.getAttribute("mbopen");
+ if (b) {
+ eval(b);
+ a.onopen(a.f)
+ }
+ }
+ function z(a) {
+ a.b.style.display = "none";
+ a.h.style.backgroundPosition = "-153px -70px";
+ a.p.innerHTML = a.z;
+ a.k = g[a.c].r = 0;
+ google.History.save(l, g)
+ }
+
+ function A(a, b, c, e, f) {
+ var k = c > 0 ? 150 : 75,
+ h = google.time() - f;
+ k = h < k && i ? h / k * c : e > 1 ? c - 10 : c;
+ h = Math.max(a.s, b + k);
+ var p = h - a.s;
+ x(a, p);
+ a.d.style.height = h < 0 ? 0 : p ? h + "px" : "";
+ o(a, Math.max(0, p - 5));
+ google.rhs();
+ Math.abs(k) < Math.abs(c) ? window.setTimeout(function () {
+ A(a, b, c, e - 1, f)
+ }, 30) : window.setTimeout(function () {
+ c < 0 ? z(a) : y(a);
+ if (!google.isIE && a.H) a.b.style.width = "100px";
+ a.b.style.position = a.d.style.height = "";
+ o(a, 0);
+ google.rhs();
+ a.d.w = 0
+ }, 0)
+ }
+
+ function u(a) {
+ a.u = 0;
+ if (!a.d.w) {
+ a.d.w = 1;
+ var b;
+ if (a.k) {
+ if (b = a.f && a.f.getAttribute("mbclose")) {
+ eval(b);
+ a.onclose(a.f)
+ }
+ b = a.s - google.getHeight(a.d);
+ a.g.style.display = "none";
+ o(a, a.n);
+ a.b.style.position = "absolute"
+ } else {
+ a.s = google.getHeight(a.d);
+ v(a);
+ o(a, 0);
+ a.n = 0;
+ m(function (c) {
+ c.h.title = ""
+ });
+ a.h.style.backgroundPosition = "-153px -84px";
+ a.p.innerHTML = a.o;
+ x(a, 1);
+ a.b.style.position = "absolute";
+ a.b.style.display = "";
+ a.k = g[a.c].r = 1;
+ google.History.save(l, g);
+ b = a.b.offsetHeight
+ }
+ A(a, google.getHeight(a.d), b, google.isSafari ? 2 : 1, google.time())
+ }
+ }
+ google.dstr && google.dstr.push(w);
+})();
+(function () {
+ var j, k;
+ var l;
+
+ function o() {
+ j = document.createElement("style");
+ document.getElementsByTagName("head")[0].appendChild(j);
+ k = j.sheet;
+ if (!k) {
+ l = document.createTextNode("");
+ j.appendChild(l)
+ }
+ }
+ google.addCSSRule = function (a, b) {
+ j || o();
+ c = a + "{" + b + "}";
+ if (!k) {
+ l.data += c;
+ return
+ }
+ k.insertRule(c, k.cssRules.length);
+ };
+ google.acrs = function (a) {
+ a = a.split(/{|}/);
+ for (var b = 1; b < a.length; b += 2) google.addCSSRule(a[b - 1], a[b])
+ };
+ google.Toolbelt.ascrs = function () {};
+ var p, q;
+
+ function r() {
+ google.nav(document.getElementById("tbpi").href)
+ }
+ function t(a) {
+ google.srp.updateLinksWithParam("tbo", a ? "1" : "", google.srp.isSerpLink, google.srp.isSerpForm)
+ }
+
+ function u() {
+ mbtb1.insert = function (b) {
+ try {
+ v(eval(b))
+ } catch (c) {
+ r()
+ }
+ };
+ var a = google.xhr();
+ if (a) {
+ a.open("GET", [google.base_href.indexOf("/images?") == 0 ? google.base_href.replace(/^\/images\?/, "/mbd?") : google.base_href.replace(/^\/search\?/, "/mbd?"), "&mbtype=29&resnum=1&tbo=1", mbtb1.tbs ? "&tbs=" + mbtb1.tbs : "", "&docid=", mbtb1.docid, "&usg=", mbtb1.usg, "&zx=", google.time()].join(""), true);
+ a.onreadystatechange = function () {
+ if (a.readyState == 4) if (a.status == 200) try {
+ eval(a.responseText)
+ } catch (b) {
+ r()
+ } else r()
+ };
+ a.send(null)
+ }
+ }
+
+ function v(a) {
+ for (var b = 0, c = 0, d, e;
+ (d = a[b]) && (e = q[c]); b++, c++) if (google.Toolbelt.pti[c]) e.id != d[0] && b--;
+ else {
+ if (d[2]) {
+ e.className = "tbos";
+ google.listen(e, "click", google.Toolbelt.tbosClk)
+ } else e.className = "tbou";
+ e.id = d[0];
+ e.innerHTML = d[1]
+ }
+ }
+ function x(a) {
+ for (var b = 0, c; c = google.Toolbelt.pbt[b++];) if (c[0] == a) return true;
+ return false
+ }
+ google.Toolbelt.initializeToolElements = function () {
+ p = [];
+ q = [];
+ var a = document.getElementById("tbd");
+ if (a) {
+ for (var b = a.getElementsByTagName("ul"), c = 0, d; d = b[c++];) {
+ p.push(d);
+ d = d.getElementsByTagName("li");
+ for (var e = 0, f; f = d[e++];) q.push(f)
+ }
+ }
+ };
+
+ function y() {
+ var a = document.getElementById("tbd");
+ if (!a.getAttribute("data-loaded")) {
+ a.setAttribute("data-loaded", 1);
+ var b = [],
+ c = 0;
+ var d = '<li style="opacity:0">';
+ for (var e = 0, f = google.Toolbelt.atg.length; e < f; ++e) {
+ var h = google.Toolbelt.atg[e],
+ g = google.style.hasClass(p[e], "tbpd");
+ b.push('<li><ul class="tbt' + (g ? " tbpd" : "") + '">');
+ for (var n;
+ (n =
+ google.Toolbelt.pbt[c]) && n[0] == e; c++) {
+ for (g = 0; g++ < n[1];) b.push(d);
+ b.push('<li class="' + q[c].className + '" id=' + q[c].id + ">" + q[c].innerHTML)
+ }
+ for (g = 0; g++ < h;) b.push(d);
+ b.push("</ul>")
+ }
+ a.innerHTML = b.join("");
+ google.Toolbelt.initializeToolElements();
+ u()
+ }
+ }
+
+ function z(a) {
+ for (var b = [], c = [], d = a ? 0 : 1, e = a ? 1 : 0, f = null, h = 0, g; g = p[h]; h++) {
+ google.style.hasClass(g, "tbpd") || b.push([g, "marginBottom", d * 8, e * 8]);
+ if (x(h)) f = g;
+ }
+ google.style.hasClass(f, "tbpd") && b.push([f, "marginBottom", d * 8, e * 8]);
+ for (h = 0; f = q[h]; h++) if (!google.Toolbelt.pti[h]) {
+ b.push([f, "height", d * 1.2, e * 1.2, 0, "em"]);
+ b.push([f, "paddingBottom", d * 3, e * 3]);
+ c.push([f, "opacity", d, e, 0, ""]);
+ f.style.overflow = "hidden";
+ }
+ d = a ? b : c;
+ var C = a ? c : b;
+ google.fx.animate(300, d, function () {
+ document.body.className =
+ document.body.className.replace(/\btbo\b/, "") + (a ? " tbo" : "");
+ google.fx.animate(200, C, function () {
+ var s = a ? "" : "none";
+ for (m = 0; i = q[m]; m++) {
+ if (a) {
+ i.style.height = "";
+ i.style.overflow = "visible";
+ i.style.opacity = "";
+ }
+ }
+ })
+ })
+ }
+ google.Toolbelt.togglePromotedTools = function () {
+ var a = !google.style.hasClass(document.body, "tbo");
+ a && y();
+ t(a);
+ z(a);
+ google.log("toolbelt", (a ? "0" : "1") + "&ei=" + google.kEI);
+ return false
+ };
+ google.rein.push(google.Toolbelt.initializeToolElements);
+
+ function A(a) {
+ for (; a && !google.hasClass(a, "tbt");) a = a.parentNode;
+ return a
+ }
+ google.Toolbelt.ctlClk = function (a, b, c) {
+ a = a || "cdr_opt";
+ if (a == "cdr_opt") {
+ c && c.stopPropagation();
+ }
+ google.Toolbelt.maybeLoadCal && google.Toolbelt.maybeLoadCal();
+ b = b || "cdr_min";
+ if (a = document.getElementById(a)) {
+ a.className = "tbots";
+ if (a = A(a)) {
+ c = 0;
+ for (var d; d = a.childNodes[c++];) if (d.className == "tbos") d.className = "tbotu";
+ (b = document.getElementById(b)) && b.focus()
+ }
+ }
+ return false
+ };
+ google.Toolbelt.cdrClk = google.Toolbelt.ctlClk;
+
+ function B(a) {
+ return a.replace(/_/g, "_1").replace(/,/g, "_2").replace(/:/g, "_3")
+ }
+ google.Toolbelt.cdrSbt = function () {
+ return D("ctbs", {
+ cdr_min: "cd_min",
+ cdr_max: "cd_max"
+ })
+ };
+ google.Toolbelt.clSbt = function () {
+ return D("ltbs", {
+ l_in: "cl_loc"
+ })
+ };
+ google.Toolbelt.prcSbt = function () {
+ D("prcbs", {
+ prc_min: "pr_min",
+ prc_max: "pr_max"
+ });
+ var a = document.getElementById("prc_frm");
+ if (a) {
+ var b = document.getElementById("tsf");
+ if (b) a.elements.q.value = b.elements.q.value
+ }
+ };
+
+ function D(a, b) {
+ var c = document.getElementById(a);
+ if (c) for (var d in b) {
+ var e = B(document.getElementById(d).value),
+ f = new RegExp("(" + b[d] + ":)([^,]*)");
+ c.value = c.value.replace(f, "$1" + e)
+ }
+ return true
+ }
+ google.Toolbelt.tbosClk = function (a) {
+ a = a || window.event;
+ if ((a = a.target || a.srcElement) && a.className == "tbotu") {
+ a.className = "tbos";
+ if (a = A(a)) for (var b = 0, c; c = a.childNodes[b++];) if (c.className == "tbots") c.className = "tbou"
+ }
+ };
+})();
+if (!window.gbar || !gbar.close) {
+ window.gbar = {};
+ (function () {
+ var e = window.gbar,
+ g, k;
+
+ function l(a) {
+ var b = window.encodeURIComponent && (document.forms[0].q || "").value;
+ if (b) a.href = a.href.replace(/([?&])q=[^&]*|$/, function (c, d) {
+ return (d || "&") + "q=" + encodeURIComponent(b)
+ })
+ }
+ e.qs = l;
+
+ function m(a, b, c, d, j, h) {
+ var f = document.getElementById(a),
+ i = f.style;
+ if (f) {
+ i.left = d ? "auto" : b + "px";
+ i.right = d ? b + "px" : "auto";
+ i.top = c + "px";
+ i.visibility = k ? "hidden" : "visible";
+ if (j && h) {
+ i.width = j + "px";
+ i.height = h + "px"
+ } else {
+ m(g, b, c, d, f.offsetWidth, f.offsetHeight);
+ k = k ? "" : a
+ }
+ }
+ }
+ e.tg = function (a) {
+ a = a || window.event;
+ var b = a.target || a.srcElement;
+ a.cancelBubble = true;
+ if (g != null) n(b);
+ else {
+ a = document.createElement(Array.every || window.createPopup ? "iframe" : "div");
+ a.frameBorder = "0";
+ a.src = "#";
+ g = b.parentNode.appendChild(a).id = "gbs";
+ document.onclick = e.close;
+ n(b);
+ e.alld && e.alld(function () {
+ var c = document.getElementById("gbli");
+ if (c) {
+ var d = c.parentNode;
+ d.removeChild(c);
+ o(d)
+ }
+ })
+ }
+ };
+
+ function p(a) {
+ var b, c = document.defaultView;
+ if (c && c.getComputedStyle) {
+ if (a = c.getComputedStyle(a, "")) b = a.direction
+ } else b = a.currentStyle ? a.currentStyle.direction : a.style.direction;
+ return b == "rtl"
+ }
+ function n(a) {
+ var b = 0;
+ if (a.className != "gb3") a = a.parentNode;
+ var c = a.getAttribute("aria-owns") || "gbi",
+ d = a.offsetWidth,
+ j = a.offsetTop > 20 ? 46 : 24,
+ h = false;
+ do b += a.offsetLeft || 0;
+ while (a = a.offsetParent);
+ a = (document.documentElement.clientWidth || document.body.clientWidth) - b - d;
+ d = p(document.body);
+ if (c == "gbi") {
+ var f = document.getElementById("gbi");
+ e.alli && e.alli(f);
+ o(f);
+ if (d) {
+ b = a;
+ h = true
+ }
+ } else if (!d) {
+ b = a;
+ h = true
+ }
+ k != c && e.close();
+ m(c, b, j, h)
+ }
+ e.close = function () {
+ k && m(k, 0, 0)
+ };
+
+ function q(a, b) {
+ var c = a.firstChild ? a.firstChild.className : "gb2";
+ a.insertBefore(b, a.firstChild).className = c
+ }
+ function o(a) {
+ for (var b, c = window.navExtra; c && (b = c.pop());) q(a, b)
+ }
+ })();;
+};
+(function () {
+ var f = true,
+ g = false;
+ window.google.rt = {};
+ var h, i, j, k, m, n, o, p, q, r, s, t, u, v, w, aa, x;
+
+ function ba() {
+ h = 30;
+ i = [];
+ k = j = g;
+ m = "";
+ o = 0;
+ p = g;
+ q = (new Date).getTime();
+ r = 100;
+ s = 0;
+ t = g;
+ x = []
+ }
+ google.rt.init = function (a, c, b) {
+ ba();
+ if (n = document.getElementById(a)) {
+ if (b) if (b.maxResults) r = b.maxResults;
+ document.onmousemove = function () {
+ p = f
+ };
+ document.onkeydown = function () {
+ p = f
+ };
+ c && ca(c);
+ s += n.getElementsByTagName("li").length;
+ i.length == 0 && window.setTimeout(y, 3E3);
+ da(n, x);
+ z(y, h);
+ if (ea("sbu", "sbd", "sbb", a)) {
+ A.push(function () {
+ k = f
+ });
+ B.push(function () {
+ k = g
+ });
+ C(0, f)
+ }
+ fa(ga, 3E3, 6E3)
+ }
+ };
+ google.rt.pause = function () {
+ ha();
+ D();
+ var a = document.getElementById("rth");
+ a = a.getElementsByTagName("span");
+ E(a[0]);
+ F(a[1]);
+ aa = (new Date).getTime()
+ };
+ google.rt.resume = function () {
+ var a = ((new Date).getTime() - aa) / 1E3;
+ if (a > 10) i = [];
+ y();
+ z(y, h);
+ fa(ga, 2E3, 6E3);
+ a = document.getElementById("rth");
+ a = a.getElementsByTagName("span");
+ E(a[1]);
+ F(a[0])
+ };
+
+ function E(a) {
+ a.style.display = "none"
+ }
+ function F(a) {
+ a.style.display = ""
+ }
+
+ function z(a, c) {
+ var b = c;
+ if (o) {
+ b = Math.pow(2, o) * 5;
+ b = (Math.random() + 0.5) * b;
+ b = Math.min(7200, b)
+ }
+ w = window.setTimeout(function () {
+ a();
+ z(a, c)
+ }, b * 1E3)
+ }
+ function ha() {
+ window.clearTimeout(w)
+ }
+ function fa(a, c, b) {
+ u = window.setTimeout(function () {
+ a();
+ v = window.setInterval(a, b)
+ }, c)
+ }
+ function D() {
+ window.clearTimeout(u);
+ window.clearInterval(v)
+ }
+
+ function ga() {
+ if (!i.length || k) {
+ if (t) {
+ D();
+ var a = document.getElementById("rth");
+ a = a.getElementsByTagName("span");
+ if (a.length > 2) {
+ E(a[0]);
+ E(a[1]);
+ F(a[2])
+ }
+ }
+ } else {
+ var c = i.shift();
+ a = c.e;
+ var b = a.getElementsByTagName("li")[0];
+ n.insertBefore(a, n.firstChild);
+ c.updateDate();
+ google.History.save(ia, {
+ r: n.innerHTML,
+ u: m,
+ n: s,
+ s: x,
+ t: G()
+ });
+ var d = -google.getComputedStyle(b, "height") - google.getComputedStyle(b, "margin-bottom");
+ c = n.scrollTop;
+ if (c < 20) {
+ C(c);
+ a = [
+ [a, "marginTop", d, 0, google.fx.easeInAndOut]
+ ];
+ google.fx.animate(1200, a)
+ } else C(c - d)
+ }
+ }
+ function ca(a) {
+ if (a.results) {
+ var c = a.results.length;
+ s += c;
+ c = c;
+ for (var b; b = a.results[--c];) i.push(ja(b))
+ }
+ if (a.nextRequest) m = a.nextRequest;
+ if (a.pollSeconds) h = a.pollSeconds
+ }
+ window.mbrt0 = window.mb0rt = {
+ insert: function (a) {
+ a = eval("(" + a + ")");
+ ca(a)
+ }
+ };
+
+ function y() {
+ if (p) {
+ p = g;
+ q = (new Date).getTime()
+ } else if ((new Date).getTime() - q > 24E4) return;
+ t = s + 5 > r;
+ if (!(j || t || !m)) {
+ var a = google.xhr();
+ a.open("GET", m);
+ a.onreadystatechange = function () {
+ if (a.readyState == 4) {
+ if (a.status == 200) {
+ eval(a.responseText);
+ o = 0
+ } else o++;
+ j = g
+ }
+ };
+ j = f;
+ a.send(null)
+ }
+ }
+ function ja(a) {
+ var c = document.createElement("div");
+ c.innerHTML = a.html;
+ return {
+ e: c,
+ updateDate: ka(c, x)
+ }
+ }
+ var ia = google.History.client(function (a) {
+ n.innerHTML = a.r;
+ m = a.u;
+ s = a.n;
+ x = a.s;
+ H(n, x, a.t);
+ C(0, f);
+ i = [];
+ y()
+ });
+ google.dstr.push(function () {
+ D();
+ ha()
+ });
+ var I, J, K, M, N, O, P, A, B, Q, R, S = g;
+
+ function T(a) {
+ var c = google.getComputedStyle(a, "height");
+ return c
+ }
+ function U(a) {
+ a = a.offsetTop;
+ a -= M.offsetTop;
+ return a
+ }
+
+ function V(a) {
+ if (a) for (var c = 0, b; b = A[c++];) b();
+ else if (P) for (c = 0; b = B[c++];) b();
+ P = a
+ }
+ function W(a) {
+ var c = la(a);
+ if (c) {
+ var b = U(c);
+ a || (b += T(c) - R);
+ ma(b, f, 300, function () {
+ na(a)
+ })
+ }
+ }
+ function ma(a, c, b, d) {
+ var e = M.scrollHeight - R;
+ e = e == 0 ? 0 : oa(a * (Q - Math.max(R / M.scrollHeight * Q, 20)) / e);
+ e = [
+ [K, "marginTop", google.getComputedStyle(K, "margin-top"), e, google.fx.easeInAndOut]
+ ];
+ if (c) e.push([M, "scrollTop", M.scrollTop, a, google.fx.easeInAndOut, ""]);
+ else M.scrollTop = a;
+ google.fx.animate(b, e, d)
+ }
+
+ function na(a) {
+ setTimeout(function () {
+ P && W(a)
+ }, 200)
+ }
+ function la(a) {
+ var c = M.childNodes;
+ if (a) for (a = c.length - 1; a >= 0; --a) {
+ var b = c[a],
+ d = U(b);
+ if (b.nodeType == 1 && d < M.scrollTop) return b
+ } else for (a = 0; b = c[a++];) {
+ d = U(b);
+ if (b.nodeType == 1 && d + T(b) > M.scrollTop + R) return b
+ }
+ }
+ function X(a) {
+ var c = a.clientY - N;
+ c = oa(google.getComputedStyle(K, "margin-top") + c);
+ K.style.marginTop = c + "px";
+ M.scrollTop = c * (M.scrollHeight - R) / (Q - T(K));
+ N = a.clientY
+ }
+ function oa(a) {
+ return Math.max(0, Math.min(Q - T(K), a))
+ }
+
+ function C(a, c) {
+ if (S) {
+ var b = T(K),
+ d = Math.max(R / M.scrollHeight * Q, 20),
+ e = document.getElementById("sbbb");
+ b = [
+ [K, "height", b, d],
+ [e, "marginTop", b - 7, d - 7]
+ ];
+ if (!O) {
+ e = d = 0;
+ for (var l; l = M.childNodes[e++];) if (l.nodeType == 1) d += T(l);
+ if (d > R) {
+ b.push([document.getElementById("sb"), "opacity", 0, 1, google.fx.linear, ""]);
+ O = f
+ }
+ }
+ d = c ? 0 : 1200;
+ ma(a, g, d);
+ google.fx.animate(d, b, function () {
+ if (O) K.style.position = "absolute"
+ })
+ }
+ }
+
+ function Y(a, c) {
+ if (a.parentNode == K) a = K;
+ var b = 70 * (c ? 1 : -1);
+ pa(a, b);
+ for (var d = 0, e; e = a.childNodes[d++];) e.nodeType == 1 && pa(e, b)
+ }
+ function pa(a, c) {
+ var b = a.style.backgroundPosition.match(/^-?\d+/),
+ d = a.style.backgroundPosition.match(/\s+.*$/);
+ a.style.backgroundPosition = parseInt(b, 10) + c + "px " + (d ? d : "")
+ }
+
+ function ea(a, c, b, d) {
+ I = document.getElementById(a);
+ J = document.getElementById(c);
+ K = document.getElementById(b);
+ M = document.getElementById(d);
+ if (!(I && J && K && M)) return S = g;
+ P = O = g;
+ A = [];
+ B = [];
+ Q = google.getComputedStyle(document.getElementById("sbc"), "height") - 1;
+ R = google.getComputedStyle(M, "height");
+ a = [I, J, K];
+ for (c = 0; b = a[c++];) {
+ google.bind(b, "mouseover", function (e) {
+ Y(e.target)
+ });
+ google.bind(b, "mouseout", function (e) {
+ Y(e.target, f)
+ });
+ b.onmousedown = function () {
+ return g
+ };
+ }
+ google.bind(I, "mousedown", function () {
+ V(f);
+ W(f)
+ });
+ google.bind(J, "mousedown", function () {
+ V(f);
+ W()
+ });
+ google.bind(K, "mousedown", function (e) {
+ V(f);
+ N = e.clientY;
+ google.bind(document, "mousemove", X)
+ });
+ return S = f
+ }
+ google.bind(document, "mouseup", function () {
+ document.removeEventListener("mousemove", X, g);
+ V(g)
+ });
+ google.dstr.push(function () {
+ A = B = [];
+ S = g
+ });
+ var qa = -1,
+ Z, ra = {
+ Hour: "%I %p",
+ HourMinute: "%I:%M%p",
+ FullMonth: "%B",
+ ShortMonth: "%b",
+ MonthDay: "%b %d",
+ FullDate: "%b %d, %Y %I:%M:%S %p"
+ },
+ sa = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
+ ta = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
+
+ function ua(a, c) {
+ for (var b = a.getElementsByTagName("div"), d = 0, e; e = b[d++];) if (e.className == "rtdelta") {
+ b = parseInt(e.innerHTML, 10);
+ return c - b
+ }
+ return g
+ }
+ function G() {
+ return Math.round((new Date).getTime() / 1E3)
+ }
+ function va(a, c, b) {
+ return b ?
+ function (d) {
+ return google.rt.formatTime(d, "FullDate")
+ } : wa
+ }
+
+ function wa(a, c) {
+ var b = c - a;
+ if (b < 86400) if (b < 45) return "seconds ago";
+ else if (b < 105) return "1 minute ago";
+ else if (b < 3345) {
+ b = Math.floor(b / 60) + (b % 60 >= 45 ? 1 : 0);
+ return "1 minutes ago".replace("1", b + "")
+ } else if (b < 6600) return "1 hour ago";
+ else {
+ b = Math.floor(b / 3600) + (b % 3600 >= 3E3 ? 1 : 0);
+ return "1 hours ago".replace("1", b + "")
+ }
+ return g
+ }
+ function xa(a, c, b, d) {
+ if (c) if (c = d(c, b)) a.innerHTML = c
+ }
+
+ function $(a) {
+ var c = [];
+ a = a.getElementsByTagName("span");
+ for (var b = 0, d; d = a[b++];) d.className.match("rtd") && c.push(d);
+ return c
+ }
+ function ya(a) {
+ a = $(a);
+ if (a.length > 0) return a[0];
+ return g
+ }
+ function H(a, c, b) {
+ a = $(a);
+ b = b || G();
+ for (var d = 0, e; e = a[d]; d++) xa(e, c[d], b, Z)
+ }
+ function ka(a, c, b) {
+ var d = b || G();
+ return function () {
+ var e = ya(a);
+ if (e) {
+ var l = ua(e, d);
+ if (l) {
+ xa(e, l, G(), Z);
+ c.unshift(l)
+ }
+ }
+ }
+ }
+
+ function da(a, c, b, d) {
+ var e = $(a);
+ b = b || G();
+ for (var l = 0, L; L = e[l++];)(L = ua(L, b)) && c.push(L);
+ Z = va(c[c.length - 1], c[0], d);
+ if (d) H(a, c);
+ else qa = window.setInterval(function () {
+ H(a, c)
+ }, 6E4)
+ }
+ google.dstr.push(function () {
+ window.clearInterval(qa)
+ });
+ if (!window.google.rt) window.google.rt = {};
+ google.rt.formatTimeString = function (a, c) {
+ var b = new Date(a * 1E3),
+ d = c;
+ d = d.replace("%Y", b.getFullYear() + "");
+ var e = b.getMonth();
+ d = d.replace("%b", sa[e]);
+ d = d.replace("%B", ta[e]);
+ d = d.replace("%m", (1 + e < 10 ? "0" : "") + (1 + e));
+ e = b.getDate();
+ d = d.replace("%d", (e < 10 ? "0" : "") + e);
+ d = d.replace("%H", b.getHours() + "");
+ e = (e = b.getHours() % 12) ? e + "" : "12";
+ d = d.replace("%I", e);
+ d = d.replace("%p", b.getHours() / 12 < 1 ? "am" : "pm");
+ e = b.getMinutes();
+ d = d.replace("%M", (e < 10 ? "0" : "") + e);
+ b = b.getSeconds();
+ return d = d.replace("%S", (b < 10 ? "0" : "") + b)
+ };
+ google.rt.formatTime = function (a, c) {
+ var b = ra[c];
+ return google.rt.formatTimeString(a, b)
+ };
+ google.rt.replayinit = function (a) {
+ n = document.getElementById(a);
+ x = [];
+ if (n) {
+ da(n, x, null, f);
+ google.History.save(ia, {
+ r: n.innerHTML,
+ s: x,
+ t: G()
+ })
+ }
+ };
+})();
+(function () {
+ var e = false;
+
+ function h(a) {
+ google.srp.updateLinksWithParam("prmdo", a ? "1" : "", google.srp.isSerpLink, google.srp.isSerpForm)
+ }
+ function i(a, c, b) {
+ return [[c, "height", a ? b : 0, a ? 0 : b], [c, "opacity", a ? 1 : 0, a ? 0 : 1, null, ""]]
+ }
+ function j(a) {
+ if (!a) return null;
+ var c = a.offsetHeight,
+ b = google.style.getComputedStyle(a, "overflow", 1);
+ a.style.overflow = "hidden";
+ return {
+ height: c,
+ overflow: b
+ }
+ }
+
+ function l(a, c, b) {
+ if (c) a.style.height = b.height + "px";
+ else a.style.removeAttribute && a.style.removeAttribute("filter");
+ a.style.overflow = b.overflow
+ }
+ google.srp.toggleModes = function () {
+ if (!e) {
+ e = true;
+ var a = document.getElementById("ms"),
+ c = document.getElementById("hidden_modes"),
+ b = document.getElementById("hmp"),
+ d = google.style.hasClass(a, "open");
+ a.className = "open";
+ var k = j(c),
+ f = j(b),
+ g = i(d, c, k.height);
+ if (f) g = g.concat(i(d, b, f.height));
+ h(!d);
+ google.fx.animate(227, g, function () {
+ if (d) a.className = "";
+ l(c, d, k);
+ b && l(b, d, f);
+ e = false
+ })
+ }
+ };
+})();
+(function () {
+ google.Tbpr = {};
+ var d = {},
+ g = /\bl\b/;
+
+ function h(a) {
+ return g.test(a.className)
+ }
+ function i() {
+ for (var a = document.getElementsByTagName("h3"), b = 0, c; c = a[b++];) if (c.className == "tbpr") {
+ var e = Number(c.id.substr(5));
+ d[e] = c;
+ j(c, e)
+ }
+ }
+ function j(a, b) {
+ for (; a && a.nodeName != "LI";) a = a.parentNode;
+ if (a) for (var c = a.getElementsByTagName("a"), e = 0, f; f = c[e++];) if (h(f)) {
+ f.result_index = b;
+ return
+ }
+ }
+ function k() {
+ for (var a in d) d[a].style.display = "none"
+ }
+ function l(a) {
+ if (d[a]) d[a].style.display = "block"
+ }
+
+ function m(a) {
+ var b = "";
+ k();
+ if (a.lastClicked >= 0) {
+ l(a.lastClicked);
+ b = "tbpr:idx=" + a.lastClicked
+ }
+ return b
+ }
+ function n(a, b) {
+ b.lastClicked = a.result_index || -1
+ }
+ google.Tbpr.init = function () {
+ i();
+ google.event.back.init();
+ google.event.back.register(h, n, m, "tbpr")
+ };
+})();
+if (google.y.first) {
+ for (var a = 0, b; b = google.y.first[a]; ++a) b();
+ delete google.y.first
+}
+for (a in google.y) google.y[a][1] ? google.y[a][1].apply(google.y[a][0]) : google.y[a][0].go();
+google.y.x = google.x;
+google.x = function (d, c) {
+ c && c.apply(d);
+ return false
+};
+google.y.first = [];
+(function () {
+ if (window.google) {
+ window.google.a = {};
+ window.google.c = 1;
+ var k = function (a, b, d) {
+ b = a.t[b];
+ a = a.t.start;
+ if (b && (a || d)) {
+ if (d != undefined) a = d;
+ return b > a ? b - a : a - b
+ }
+ };
+ window.google.report = function (a, b, d) {
+ var e = "";
+ if (window.google.pt) {
+ e += "&srt=" + window.google.pt;
+ delete window.google.pt
+ }
+ var c = document.getElementById("csi");
+ if (c) {
+ var f;
+ if (window.google._bfr != undefined) f = window.google._bfr;
+ else {
+ f = c.value;
+ window.google._bfr = f;
+ c.value = 1
+ }
+ if (f) return ""
+ }
+ c = "chrome.loadTimes";
+ if (window.chrome && window[c] && window[c]().wasFetchedViaSpdy) e += "&p=s";
+ if (a.b) e += "&" + a.b;
+ if (window.parent != window) e += "&wif=1";
+ c = a.t;
+ f = c.start;
+ var h = [];
+ for (var g in c) g != "start" && f && h.push(g + "." + k(a, g));
+ delete c.start;
+ if (b) for (var i in b) e += "&" + i + "=" + b[i];
+ a = [d ? d : "/csi", "?v=3", "&s=" + (window.google.sn || "GWS") + "&action=", a.name, "", e, "&rt=", h.join(",")].join("");
+ b = new Image;
+ var j = window.google.c++;
+ window.google.a[j] = b;
+ b.onload = b.onerror = function () {
+ delete window.google.a[j]
+ };
+ b.src = a;
+ b = null;
+ return a
+ }
+ };
+ if (google.timers && google.timers.load.t) {
+ if (!google.nocsixjs) google.timers.load.t.xjsee = google.time();
+ window.setTimeout(function () {
+ if (google.timers.load.t) {
+ google.timers.load.t.xjs = google.time();
+ google.timers.load.t.ol && google.report(google.timers.load, google.kCSI)
+ }
+ }, 0)
+ };
+})(); \ No newline at end of file
diff --git a/Pacman/index.html b/Pacman/index.html
new file mode 100644
index 0000000..9f80e9b
--- /dev/null
+++ b/Pacman/index.html
@@ -0,0 +1,502 @@
+<!doctype html><html onmousemove="google&&google.fade&&google.fade(event)">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>Google PAC-MAN</title>
+ <div id="main">
+ <span style="font-size:30px;cursor:pointer" onclick="openNav()">&#9776;</span>
+</div>
+ <script>
+ window.google = {
+ kEI: "zNr2S6z3C4f0eNui1bYK",
+ kEXPI: "17259,18168,24661,24737,24745",
+ kCSI: {
+ e: "17259,18168,24661,24737,24745",
+ ei: "zNr2S6z3C4f0eNui1bYK",
+ expi: "17259,18168,24661,24737,24745"
+ },
+ ml: function () {},
+ kHL: "en",
+ time: function () {
+ return (new Date).getTime()
+ },
+ log: function (b, d, c) {
+ var a = new Image,
+ e = google,
+ g = e.lc,
+ f = e.li;
+ a.onerror = (a.onload = (a.onabort = function () {
+ delete g[f]
+ }));
+ g[f] = a;
+ c = c || "/gen_204?atyp=i&ct=" + b + "&cad=" + d + "&zx=" + google.time();
+ a.src = c;
+ e.li = f + 1
+ },
+ lc: [],
+ li: 0,
+ Toolbelt: {}
+ };
+ window.google.sn = "webhp";
+ window.google.timers = {
+ load: {
+ t: {
+ start: (new Date).getTime()
+ }
+ }
+ };
+ try {
+ window.google.pt = window.chrome && window.chrome.csi && Math.floor(window.chrome.csi().pageT);
+ } catch (u) {}
+ window.google.jsrt_kill = 1;
+ var _gjwl = location;
+
+ function _gjuc() {
+ var b = _gjwl.href.indexOf("#");
+ if (b >= 0) {
+ var a = _gjwl.href.substring(b + 1);
+ if (/(^|&)q=/.test(a) && a.indexOf("#") == -1 && !/(^|&)cad=h($|&)/.test(a)) {
+ _gjwl.replace("/search?" + a.replace(/(^|&)fp=[^&]*/g, "") + "&cad=h");
+ return 1
+ }
+ }
+ return 0
+ }
+ function _gjp() {
+ !(window._gjwl.hash && window._gjuc()) && setTimeout(_gjp, 500)
+ };
+ window._gjp && _gjp()
+ </script>
+ <style>
+.button1 {
+ background-color: white;
+ color: black;
+ border: 2px solid #555555;
+}
+
+.button1:hover {
+ background-color: #555555;
+ color: white;
+}
+.sidenav {
+ height: 100%;
+ width: 0;
+ position: fixed;
+ z-index: 1;
+ top: 0;
+ left: 0;
+ background-color: #111;
+ overflow-x: hidden;
+ transition: 0.5s;
+ padding-top: 60px;
+}
+.sidenav a {
+ padding: 8px 8px 8px 32px;
+ text-decoration: none;
+ font-size: 15px;
+ color: #818181;
+ display: block;
+ transition: 0.3s;
+}
+.sidenav a:hover, .offcanvas a:focus{
+ color: #f1f1f1;
+}
+.sidenav .closebtn {
+ position: absolute;
+ top: 0;
+ right: 25px;
+ font-size: 25px;
+ margin-left: 50px;
+}
+#main {
+ transition: margin-left .5s;
+ padding: 16px;
+ color:black;
+}
+ body{margin:0}
+ #gog{padding:3px 8px 0}
+ td{line-height:.8em;}
+ .gac_m td{line-height:17px;}
+ form{margin-bottom:20px;}
+ body,td,a,p,.h{font-family:arial,sans-serif}
+ .h{color:#36c;font-size:20px}
+ .q{color:#00c}
+ .ts td{padding:0}
+ .ts{border-collapse:collapse}
+ em{font-weight:bold;font-style:normal}
+ .lst{width:496px}
+ input{font-family:inherit}
+ .lsb:active,.gac_sb:active{background:-webkit-gradient(linear,left top,left bottom,from(#ccc),to(#ddd))}
+ #fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{opacity:0;}
+ #fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{background:#fff;}
+ a.gb1,a.gb2,a.gb3,a.gb4{color:#11c !important}
+ #gog{background:#fff;}
+ #gbar,#guser{font-size:13px;padding-top:1px !important}
+ #gbar{float:left;height:22px}
+ #guser{padding-bottom:7px !important;text-align:right}
+ .gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}
+ .gbh{height:0;position:absolute;top:24px;width:100%}
+ #gbs,.gbm{background:#fff;left:0;position:absolute;text-align:left;visibility:hidden;z-index:1000}
+ .gbm{border:1px solid;border-color:#c9d7f1 #36c #36c #a2bae7;z-index:1001}
+ .gb1{margin-right:.5em}
+ .gb1,.gb3{zoom:1}
+ .gb2{display:block;padding:.2em .5em;}
+ .gb2,.gb3{text-decoration:none;border-bottom:none}
+ a.gb1,a.gb2,a.gb3,a.gb4{color:#00c !important}
+ a.gb2:hover{background:#36c;color:#fff !important}
+ body{background:#fff;color:black}
+ input{-moz-box-sizing:content-box}
+ a{color:#11c;text-decoration:none}
+ a:hover,a:active{text-decoration:underline}
+ .fl a{color:#4272db}
+ /*a:visited{color:#551a8b}*/
+ a.gb1,a.gb4{text-decoration:underline}
+ a.gb3:hover{text-decoration:none}
+ #ghead a.gb2:hover{color:#fff!important}
+ .ds{display:-moz-inline-box}
+ .ds{border-bottom:solid 1px #e7e7e7;border-right:solid 1px #e7e7e7;display:inline-block;margin:3px 0 4px;margin-left:4px;margin-right:3px:height:32px}
+ .sblc{padding-top:5px}
+ .sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px;}
+ .lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px;display:block}
+ .lsb{background:url(/images/srpr/nav_logo13.png) bottom;font:15px arial,sans-serif;border:none;cursor:pointer;height:30px;margin:0;outline:0;vertical-align:top}
+ .lsb:active{background:#ccc}
+ .lst:focus{outline:none}
+ .ftl,#fll a{margin:0 12px}
+ #addlang a{padding:0 3px}
+ .gac_v div{display:none}
+ .gac_v .gac_v2,.gac_bt{display:block!important}
+ body{Background-color:#323232;}
+</style>
+ <noscript>
+ <style>
+ #fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{opacity:1;}
+ </style>
+ </noscript>
+ <script>
+ google.y = {};
+ google.x = function (e, g) {
+ google.y[e.id] = [e, g];
+ return false
+ };
+ if (!window.google) window.google = {};
+ window.google.crm = {};
+ window.google.cri = 0;
+ window.clk = function (e, f, g, k, l, b, m) {
+ if (document.images) {
+ var a = encodeURIComponent || escape,
+ c = new Image,
+ h = window.google.cri++;
+ window.google.crm[h] = c;
+ c.onerror = (c.onload = (c.onabort = function () {
+ delete window.google.crm[h]
+ }));
+ if (b && b.substring(0, 6) != "&sig2=") b = "&sig2=" + b;
+ c.src = ["/url?sa=T", "", f ? "&oi=" + a(f) : "", g ? "&cad=" + a(g) : "", "&ct=", a(k || "res"), "&cd=", a(l), "&ved=", a(m), e ? "&url=" + a(e.replace(/#.*/, "")).replace(/\+/g, "%2B") : "", "&ei=", "zNr2S6z3C4f0eNui1bYK", b].join("")
+ }
+ return true
+ };
+ window.gbar = {
+ qs: function () {},
+ tg: function (e) {
+ var o = {
+ id: 'gbar'
+ };
+ for (i in e) o[i] = e[i];
+ google.x(o, function () {
+ gbar.tg(o)
+ })
+ }
+ };
+ </script>
+</head>
+<body bgcolor='#ffffff' text='#000000' link='#0000cc' vlink='#551a8b' alink='#ff0000' onload="document.f.q.focus();if(document.images)new Image().src='/images/srpr/nav_logo13.png'">
+<textarea id='csi' style='display:none'></textarea>
+<iframe name='wgjf' style='display:none'>
+</iframe>
+
+<center><br clear='all' id='lgpd'>
+<div id='lga'>
+ <a href="/search?q=PAC-MAN+30th+Anniversary&ct=pacman10-hp&oi=ddle" id="dlink"></a>
+ <div id='logo' style="width:554px;height:186px;background:black url(logos/pacman10-hp.png) 0 0 no-repeat;position:relative;margin-bottom:9px" title="PAC-MAN's 30th Birthday! Doodle with PAC-MAN™ & ©1980 NAMCO BANDAI Games Inc.">
+ <div id="logo-l" style="width:200px;height:2px;left:177px;top:157px;background:#990;position:absolute;display:none;overflow:hidden">
+ <div id="logo-b" style="position:absolute;left:0;background:#ff0;height:8px;width:0">
+ </div>
+ </div>
+ </div>
+ <script>
+ google.pml = function () {
+ function d(a) {
+ if (!google.pml_installed) {
+ google.pml_installed = true;
+ if (!a) {
+ document.getElementById("logo").style.background = "black";
+ window.setTimeout(function () {
+ var b = document.getElementById("logo-l");
+ if (b) b.style.display = "block"
+ }, 400)
+ }
+ a = document.createElement("script");
+ a.type = "text/javascript";
+ a.src = "logos/js/pacman10-hp.2.js";
+ google.dom.append(a)
+ }
+ }
+ function e() {
+ if (document.f && document.f.btnI) document.f.btnI.onclick = function () {
+ typeof google.pacman != "undefined" ? google.pacman.insertCoin() : d(false);
+ return false
+ }
+ }
+ if (!google.pml_loaded) {
+ google.pml_loaded = true;
+ window.setTimeout(function () {
+ document.f && document.f.q && document.f.q.value == "" && d(true)
+ }, 1E4);
+ e();
+ google.rein && google.rein.push(e);
+ google.dstr && google.dstr.push(function () {
+ google.pacman && google.pacman.destroy();
+ if (google.pml_installed) {
+ for (var a = (document.getElementById("xjsc") || document.body).getElementsByTagName("script"), b = 0, c; c = a[b++];) c.src.indexOf("logos/js") != -1 && google.dom.remove(c);
+ google.pml_installed = false
+ }
+ });
+ google.pacManQuery = function () {
+ google.nav(document.getElementById("dlink").href)
+ }
+ }
+ };
+ </script>
+</div>
+<form action="/search" name='f'>
+ <table cellpadding='0' cellspacing='0'>
+ <tr valign='top'>
+ <td width='25%'>
+ &nbsp;
+ </td>
+ <td align='center' nowrap>
+ <input name='hl' type='hidden' value='en'><input name='source' type='hidden' value='hp'>
+ <div class='ds' style="height:32px;margin:4px 0">
+ <span class='ds'><span class='lsbb'><input name='btnI' type='submit' value="Insert Coin" class='lsb'></span></span>
+ </td>
+
+ </tr>
+ </table>
+</form>
+
+<div id='xjsi'>
+ <script>
+ if (google.y) google.y.first = [];
+ if (google.y) google.y.first = [];
+ google.dstr = [];
+ google.rein = [];
+ window.setTimeout(function () {
+ var a = document.createElement("script");
+ // Google src originally links to /extern_js/f/SOME_LONG_HASH/ANOTHER_HASH.js
+ // It is regenerated upon each page refresh
+ a.src = "extern_js/google.js";
+ (document.getElementById("xjsd") || document.body).appendChild(a);
+ if (google.timers && google.timers.load.t) google.timers.load.t.xjsls = (new Date).getTime();
+ }, 0);;
+ google.neegg = 1;
+ google.y.first.push(function () {
+ google.ac.i(document.f, document.f.q, '', '', '', {
+ o: 1,
+ sw: 1
+ });
+ (function () {
+ var h, i, j = 1,
+ k = google.time(),
+ l = [];
+
+ function m(a, f) {
+ var b = [];
+ for (var c = 0, e; e = a[c++];) {
+ var d = document.getElementById(e);
+ d && b.push(d)
+ }
+ for (var c = 0, g; g = f[c++];) b = b.concat(n(g[0], g[1]));
+ for (var c = 0; b[c]; c++) b[c] = [b[c], "opacity", 0, 1, 0, ""];
+ return b
+ }
+ function n(a, f) {
+ var b = [],
+ c = new RegExp("(^|\\s)" + f + "($|\\s)");
+ for (var e = 0, d, g = document.getElementsByTagName(a); d =
+ g[e++];) c.test(d.className) && b.push(d);
+ return b
+ }
+ google.fade = function (a) {
+ if (google.fx && j) {
+ a = a || window.event;
+ var f = 1,
+ b = google.time() - k;
+ if (a && a.type == "mousemove") {
+ var c = a.clientX,
+ e = a.clientY;
+ f = (h || i) && (h != c || i != e) && b > 600;
+ h = c;
+ i = e
+ }
+ if (f) {
+ j = 0;
+ google.fx.animate(600, m(["fctr", "ghead", "pmocntr", "sbl", "tba", "tbe"], [
+ ["span", "fade"],
+ ["div", "fade"],
+ ["div", "gbh"]
+ ]));
+ for (var d = 0; d < l.length; ++d) if (typeof l[d] == "function") l[d]()
+ }
+ }
+ };
+ google.addFadeNotifier = function (a) {
+ l.push(a);
+ if (!j) a()
+ };
+ })();;
+ google.History && google.History.initialize('/')
+ });
+ if (google.j && google.j.en && google.j.xi) {
+ window.setTimeout(google.j.xi, 0);
+ google.fade = null;
+ }
+ google.pml && google.pml();
+ </script>
+</div>
+<script>
+ (function () {
+ var b, d, e, f;
+
+ function g(a, c) {
+ if (a.removeEventListener) {
+ a.removeEventListener("load", c, false);
+ a.removeEventListener("error", c, false)
+ } else {
+ a.detachEvent("onload", c);
+ a.detachEvent("onerror", c)
+ }
+ }
+ function h(a) {
+ f = (new Date).getTime();
+ ++d;
+ a = a || window.event;
+ var c = a.target || a.srcElement;
+ g(c, h)
+ }
+ var i = document.getElementsByTagName("img");
+ b = i.length;
+ d = 0;
+ for (var j = 0, k; j < b; ++j) {
+ k = i[j];
+ if (k.complete || typeof k.src != "string" || !k.src)++d;
+ else if (k.addEventListener) {
+ k.addEventListener("load", h, false);
+ k.addEventListener("error", h, false)
+ } else {
+ k.attachEvent("onload", h);
+ k.attachEvent("onerror", h)
+ }
+ }
+ e = b - d;
+
+ function l() {
+ google.timers.load.t.ol = (new Date).getTime();
+ google.timers.load.t.iml = f;
+ google.kCSI.imc = d;
+ google.kCSI.imn = b;
+ google.kCSI.imp = e;
+ google.report && google.report(google.timers.load, google.kCSI)
+ }
+ if (window.addEventListener) window.addEventListener("load", l, false);
+ else if (window.attachEvent) window.attachEvent("onload", l);
+ google.timers.load.t.prt = (f = (new Date).getTime());
+ })();
+ (function () {
+ var b, d, e, f;
+
+ function g(a, c) {
+ if (a.removeEventListener) {
+ a.removeEventListener("load", c, false);
+ a.removeEventListener("error", c, false)
+ } else {
+ a.detachEvent("onload", c);
+ a.detachEvent("onerror", c)
+ }
+ }
+ function h(a) {
+ f = (new Date).getTime();
+ ++d;
+ a = a || window.event;
+ var c = a.target || a.srcElement;
+ g(c, h)
+ }
+ var i = document.getElementsByTagName("img");
+ b = i.length;
+ d = 0;
+ for (var j = 0, k; j < b; ++j) {
+ k = i[j];
+ if (k.complete || typeof k.src != "string" || !k.src)++d;
+ else if (k.addEventListener) {
+ k.addEventListener("load", h, false);
+ k.addEventListener("error", h, false)
+ } else {
+ k.attachEvent("onload", h);
+ k.attachEvent("onerror", h)
+ }
+ }
+ e = b - d;
+
+ function l() {
+ google.timers.load.t.ol = (new Date).getTime();
+ google.timers.load.t.iml = f;
+ google.kCSI.imc = d;
+ google.kCSI.imn = b;
+ google.kCSI.imp = e;
+ google.report && google.report(google.timers.load, google.kCSI)
+ }
+ if (window.addEventListener) window.addEventListener("load", l, false);
+ else if (window.attachEvent) window.attachEvent("onload", l);
+ google.timers.load.t.prt = (f = (new Date).getTime());
+ })();
+</script>
+<p>Want google pacman code</p>
+<a href="https://www.dropbox.com/s/13ff6t70aly3o24/GooglePacman.zip?dl=1">
+ <input type="submit" value="Download">
+ </a>
+<div id="mySidenav" class="sidenav">
+ <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
+ <a href="https://mcd223.github.io">Home</a>
+ <a href="https://mcd223.github.io/morsecode/">Morse code</a>
+ <a href="https://mcd223.github.io/binary/" id="pLink">Binary</a>
+ <a href="https://mcd223.github.io/Pacman/" id="pLinks">Google Pacman</a>
+ <a href="https://duckduckgo.com/">DuckDuckGo</a>
+ <a href="https://mail.google.com/mail/u/0/?tab=wm#inbox">Gmail</a>
+ <a href="https://play.google.com/music/listen?authuser&u=0#/home">Google Play Music</a>
+ <a href="https://photos.google.com/">Google Photos</a>
+ <a href="https://drive.google.com/drive/u/0/my-drive">Google Drive</a>
+ <a href="https://www.youtube.com">Youtube</a>
+ <a href="https://ww.github.com/">Github</a>
+ <a href="https://8values.github.io/">8Values</a>
+ <a href="https://www.politicalcompass.org/test/">Political Compass</a>
+ <a href="https://www.twitch.tv/">Twitch</a>
+ <a href="http://www.w3schools.com/html/default.asp">html tutorial</a>
+ <a href="http://www.urbandictionary.com/">Urban Dictionary</a>
+ <a href="http://ai2.appinventor.mit.edu/">google app maker</a>
+ <a href="https://www.google.com/voice/">google voice</a>
+ <a href="http://www.computerhope.com/overview.htm">MS-DOS commands</a>
+ <a href="http://geektyper.com/">GEEK TYPER</a>
+ <a href="https://www.dropbox.com/home">dropbox</a>
+ <a href="https://sites.google.com/a/simplelittledream.com?tab=m3&pli=1">Google Sites</a>
+ <a href="https://drive.google.com/keep">Google Keep</a>
+ <a href="https://www.google.com/">Google.com</a>
+</div>
+<script>
+function openNav() {
+ document.getElementById("mySidenav").style.width = "250px";
+ document.getElementById("main").style.marginLeft = "250px";
+}
+
+function closeNav() {
+ document.getElementById("mySidenav").style.width = "0";
+ document.getElementById("main").style.marginLeft= "0";
+}
+</script>
diff --git a/Pacman/logos/js/pacman10-hp.2.js b/Pacman/logos/js/pacman10-hp.2.js
new file mode 100644
index 0000000..ef89c2e
--- /dev/null
+++ b/Pacman/logos/js/pacman10-hp.2.js
@@ -0,0 +1,3162 @@
+google.pacman ||
+function () {
+ var a = true,
+ e = false,
+ g = {},
+ i = [1, 4, 2, 8],
+ l = {
+ 0: {
+ axis: 0,
+ increment: 0
+ },
+ 1: {
+ axis: 0,
+ increment: -1
+ },
+ 2: {
+ axis: 0,
+ increment: +1
+ },
+ 4: {
+ axis: 1,
+ increment: -1
+ },
+ 8: {
+ axis: 1,
+ increment: +1
+ }
+ },
+ m = [0, 7, 17, 32],
+ n = [{
+ x: 5,
+ y: 1,
+ w: 56
+ },
+ {
+ x: 5,
+ y: 4,
+ w: 5
+ },
+ {
+ x: 5,
+ y: 1,
+ h: 4
+ },
+ {
+ x: 9,
+ y: 1,
+ h: 12
+ },
+ {
+ x: 5,
+ y: 12,
+ h: 4
+ },
+ {
+ x: 10,
+ y: 12,
+ h: 4
+ },
+ {
+ x: 5,
+ y: 15,
+ w: 16
+ },
+ {
+ x: 5,
+ y: 12,
+ w: 31
+ },
+ {
+ x: 60,
+ y: 1,
+ h: 4
+ },
+ {
+ x: 54,
+ y: 1,
+ h: 4
+ },
+ {
+ x: 19,
+ y: 1,
+ h: 12
+ },
+ {
+ x: 19,
+ y: 4,
+ w: 26
+ },
+ {
+ x: 13,
+ y: 5,
+ w: 7
+ },
+ {
+ x: 13,
+ y: 5,
+ h: 4
+ },
+ {
+ x: 13,
+ y: 8,
+ w: 3
+ },
+ {
+ x: 56,
+ y: 4,
+ h: 9
+ },
+ {
+ x: 48,
+ y: 4,
+ w: 13
+ },
+ {
+ x: 48,
+ y: 1,
+ h: 12
+ },
+ {
+ x: 60,
+ y: 12,
+ h: 4
+ },
+ {
+ x: 44,
+ y: 15,
+ w: 17
+ },
+ {
+ x: 54,
+ y: 12,
+ h: 4
+ },
+ {
+ x: 44,
+ y: 12,
+ w: 17
+ },
+ {
+ x: 44,
+ y: 1,
+ h: 15
+ },
+ {
+ x: 41,
+ y: 13,
+ w: 4
+ },
+ {
+ x: 41,
+ y: 13,
+ h: 3
+ },
+ {
+ x: 38,
+ y: 13,
+ h: 3
+ },
+ {
+ x: 38,
+ y: 15,
+ w: 4
+ },
+ {
+ x: 35,
+ y: 10,
+ w: 10
+ },
+ {
+ x: 35,
+ y: 1,
+ h: 15
+ },
+ {
+ x: 35,
+ y: 13,
+ w: 4
+ },
+ {
+ x: 21,
+ y: 12,
+ h: 4
+ },
+ {
+ x: 24,
+ y: 12,
+ h: 4
+ },
+ {
+ x: 24,
+ y: 15,
+ w: 12
+ },
+ {
+ x: 27,
+ y: 4,
+ h: 9
+ },
+ {
+ x: 52,
+ y: 9,
+ w: 5
+ },
+ {
+ x: 56,
+ y: 8,
+ w: 10,
+ type: 1
+ },
+ {
+ x: 1,
+ y: 8,
+ w: 9,
+ type: 1
+ }],
+ o = [{
+ x: 1,
+ y: 8,
+ w: 8
+ },
+ {
+ x: 57,
+ y: 8,
+ w: 9
+ },
+ {
+ x: 44,
+ y: 2,
+ h: 10
+ },
+ {
+ x: 35,
+ y: 5,
+ h: 7
+ },
+ {
+ x: 36,
+ y: 4,
+ w: 8
+ },
+ {
+ x: 36,
+ y: 10,
+ w: 8
+ },
+ {
+ x: 39,
+ y: 15,
+ w: 2
+ }],
+ p = [{
+ x: 5,
+ y: 15
+ },
+ {
+ x: 5,
+ y: 3
+ },
+ {
+ x: 15,
+ y: 8
+ },
+ {
+ x: 60,
+ y: 3
+ },
+ {
+ x: 60,
+ y: 15
+ }],
+ q = [{
+ x: 2,
+ y: 8
+ },
+ {
+ x: 63,
+ y: 8
+ }],
+ r = {
+ 1: [{
+ x: 39.5,
+ y: 15,
+ dir: 4
+ },
+ {
+ x: 39.5,
+ y: 4,
+ dir: 4,
+ scatterX: 57,
+ scatterY: -4
+ },
+ {
+ x: 39.5,
+ y: 7,
+ dir: 2,
+ scatterX: 0,
+ scatterY: -4
+ },
+ {
+ x: 37.625,
+ y: 7,
+ dir: 1,
+ scatterX: 57,
+ scatterY: 20
+ },
+ {
+ x: 41.375,
+ y: 7,
+ dir: 1,
+ scatterX: 0,
+ scatterY: 20
+ }],
+ 2: [{
+ x: 40.25,
+ y: 15,
+ dir: 8
+ },
+ {
+ x: 38.75,
+ y: 15,
+ dir: 4
+ },
+ {
+ x: 39.5,
+ y: 4,
+ dir: 4,
+ scatterX: 57,
+ scatterY: -4
+ },
+ {
+ x: 39.5,
+ y: 7,
+ dir: 2,
+ scatterX: 0,
+ scatterY: -4
+ },
+ {
+ x: 37.625,
+ y: 7,
+ dir: 1,
+ scatterX: 57,
+ scatterY: 20
+ },
+ {
+ x: 41.375,
+ y: 7,
+ dir: 1,
+ scatterX: 0,
+ scatterY: 20
+ }]
+ },
+ s = [32, 312],
+ v = [80, 312],
+ w = {
+ 0: 0.16,
+ 1: 0.23,
+ 2: 1,
+ 3: 1,
+ 4: 2.23,
+ 5: 0.3,
+ 6: 1.9,
+ 7: 2.23,
+ 8: 1.9,
+ 9: 5,
+ 10: 1.9,
+ 11: 1.18,
+ 12: 0.3,
+ 13: 0.5,
+ 14: 1.9,
+ 15: 9,
+ 16: 10,
+ 17: 0.26
+ },
+ y = 0.8 * 0.4,
+ z = [{},
+ {
+ ghostSpeed: 0.75,
+ ghostTunnelSpeed: 0.4,
+ playerSpeed: 0.8,
+ dotEatingSpeed: 0.71,
+ ghostFrightSpeed: 0.5,
+ playerFrightSpeed: 0.9,
+ dotEatingFrightSpeed: 0.79,
+ elroyDotsLeftPart1: 20,
+ elroySpeedPart1: 0.8,
+ elroyDotsLeftPart2: 10,
+ elroySpeedPart2: 0.85,
+ frightTime: 6,
+ frightBlinkCount: 5,
+ fruit: 1,
+ fruitScore: 100,
+ ghostModeSwitchTimes: [7, 20, 7, 20, 5, 20, 5, 1],
+ penForceTime: 4,
+ penLeavingLimits: [0, 0, 30, 60]
+ },
+ {
+ ghostSpeed: 0.85,
+ ghostTunnelSpeed: 0.45,
+ playerSpeed: 0.9,
+ dotEatingSpeed: 0.79,
+ ghostFrightSpeed: 0.55,
+ playerFrightSpeed: 0.95,
+ dotEatingFrightSpeed: 0.83,
+ elroyDotsLeftPart1: 30,
+ elroySpeedPart1: 0.9,
+ elroyDotsLeftPart2: 15,
+ elroySpeedPart2: 0.95,
+ frightTime: 5,
+ frightBlinkCount: 5,
+ fruit: 2,
+ fruitScore: 300,
+ ghostModeSwitchTimes: [7, 20, 7, 20, 5, 1033, 1 / 60, 1],
+ penForceTime: 4,
+ penLeavingLimits: [0, 0, 0, 50],
+ cutsceneId: 1
+ },
+ {
+ ghostSpeed: 0.85,
+ ghostTunnelSpeed: 0.45,
+ playerSpeed: 0.9,
+ dotEatingSpeed: 0.79,
+ ghostFrightSpeed: 0.55,
+ playerFrightSpeed: 0.95,
+ dotEatingFrightSpeed: 0.83,
+ elroyDotsLeftPart1: 40,
+ elroySpeedPart1: 0.9,
+ elroyDotsLeftPart2: 20,
+ elroySpeedPart2: 0.95,
+ frightTime: 4,
+ frightBlinkCount: 5,
+ fruit: 3,
+ fruitScore: 500,
+ ghostModeSwitchTimes: [7, 20, 7, 20, 5, 1033, 1 / 60, 1],
+ penForceTime: 4,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.85,
+ ghostTunnelSpeed: 0.45,
+ playerSpeed: 0.9,
+ dotEatingSpeed: 0.79,
+ ghostFrightSpeed: 0.55,
+ playerFrightSpeed: 0.95,
+ dotEatingFrightSpeed: 0.83,
+ elroyDotsLeftPart1: 40,
+ elroySpeedPart1: 0.9,
+ elroyDotsLeftPart2: 20,
+ elroySpeedPart2: 0.95,
+ frightTime: 3,
+ frightBlinkCount: 5,
+ fruit: 3,
+ fruitScore: 500,
+ ghostModeSwitchTimes: [7, 20, 7, 20, 5, 1033, 1 / 60, 1],
+ penForceTime: 4,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 40,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 20,
+ elroySpeedPart2: 1.05,
+ frightTime: 2,
+ frightBlinkCount: 5,
+ fruit: 4,
+ fruitScore: 700,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0],
+ cutsceneId: 2
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 50,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 25,
+ elroySpeedPart2: 1.05,
+ frightTime: 5,
+ frightBlinkCount: 5,
+ fruit: 4,
+ fruitScore: 700,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 50,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 25,
+ elroySpeedPart2: 1.05,
+ frightTime: 2,
+ frightBlinkCount: 5,
+ fruit: 5,
+ fruitScore: 1E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 50,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 25,
+ elroySpeedPart2: 1.05,
+ frightTime: 2,
+ frightBlinkCount: 5,
+ fruit: 5,
+ fruitScore: 1E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 60,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 30,
+ elroySpeedPart2: 1.05,
+ frightTime: 1,
+ frightBlinkCount: 3,
+ fruit: 6,
+ fruitScore: 2E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0],
+ cutsceneId: 3
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 60,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 30,
+ elroySpeedPart2: 1.05,
+ frightTime: 5,
+ frightBlinkCount: 5,
+ fruit: 6,
+ fruitScore: 2E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 60,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 30,
+ elroySpeedPart2: 1.05,
+ frightTime: 2,
+ frightBlinkCount: 5,
+ fruit: 7,
+ fruitScore: 3E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 80,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 40,
+ elroySpeedPart2: 1.05,
+ frightTime: 1,
+ frightBlinkCount: 3,
+ fruit: 7,
+ fruitScore: 3E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 80,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 40,
+ elroySpeedPart2: 1.05,
+ frightTime: 1,
+ frightBlinkCount: 3,
+ fruit: 8,
+ fruitScore: 5E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0],
+ cutsceneId: 3
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 80,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 40,
+ elroySpeedPart2: 1.05,
+ frightTime: 3,
+ frightBlinkCount: 5,
+ fruit: 8,
+ fruitScore: 5E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 100,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 50,
+ elroySpeedPart2: 1.05,
+ frightTime: 1,
+ frightBlinkCount: 3,
+ fruit: 8,
+ fruitScore: 5E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 100,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 50,
+ elroySpeedPart2: 1.05,
+ frightTime: 1,
+ frightBlinkCount: 3,
+ fruit: 8,
+ fruitScore: 5E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 100,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 50,
+ elroySpeedPart2: 1.05,
+ frightTime: 0,
+ frightBlinkCount: 0,
+ fruit: 8,
+ fruitScore: 5E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0],
+ cutsceneId: 3
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 100,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 50,
+ elroySpeedPart2: 1.05,
+ frightTime: 1,
+ frightBlinkCount: 3,
+ fruit: 8,
+ fruitScore: 5E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 120,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 60,
+ elroySpeedPart2: 1.05,
+ frightTime: 0,
+ frightBlinkCount: 0,
+ fruit: 8,
+ fruitScore: 5E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 1,
+ dotEatingSpeed: 0.87,
+ ghostFrightSpeed: 0.6,
+ playerFrightSpeed: 1,
+ dotEatingFrightSpeed: 0.87,
+ elroyDotsLeftPart1: 120,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 60,
+ elroySpeedPart2: 1.05,
+ frightTime: 0,
+ frightBlinkCount: 0,
+ fruit: 8,
+ fruitScore: 5E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ },
+ {
+ ghostSpeed: 0.95,
+ ghostTunnelSpeed: 0.5,
+ playerSpeed: 0.9,
+ dotEatingSpeed: 0.79,
+ ghostFrightSpeed: 0.75,
+ playerFrightSpeed: 0.9,
+ dotEatingFrightSpeed: 0.79,
+ elroyDotsLeftPart1: 120,
+ elroySpeedPart1: 1,
+ elroyDotsLeftPart2: 60,
+ elroySpeedPart2: 1.05,
+ frightTime: 0,
+ frightBlinkCount: 0,
+ fruit: 8,
+ fruitScore: 5E3,
+ ghostModeSwitchTimes: [5, 20, 5, 20, 5, 1037, 1 / 60, 1],
+ penForceTime: 3,
+ penLeavingLimits: [0, 0, 0, 0]
+ }],
+ A = {
+ 1: [{
+ x: 37.6,
+ y: 7,
+ dir: 1,
+ dest: 6.375,
+ speed: 0.48
+ },
+ {
+ x: 37.6,
+ y: 6.375,
+ dir: 2,
+ dest: 7.625,
+ speed: 0.48
+ },
+ {
+ x: 37.6,
+ y: 7.625,
+ dir: 1,
+ dest: 7,
+ speed: 0.48
+ }],
+ 2: [{
+ x: 39.5,
+ y: 7,
+ dir: 2,
+ dest: 7.625,
+ speed: 0.48
+ },
+ {
+ x: 39.5,
+ y: 7.625,
+ dir: 1,
+ dest: 6.375,
+ speed: 0.48
+ },
+ {
+ x: 39.5,
+ y: 6.375,
+ dir: 2,
+ dest: 7,
+ speed: 0.48
+ }],
+ 3: [{
+ x: 41.4,
+ y: 7,
+ dir: 1,
+ dest: 6.375,
+ speed: 0.48
+ },
+ {
+ x: 41.4,
+ y: 6.375,
+ dir: 2,
+ dest: 7.625,
+ speed: 0.48
+ },
+ {
+ x: 41.4,
+ y: 7.625,
+ dir: 1,
+ dest: 7,
+ speed: 0.48
+ }],
+ 4: [{
+ x: 37.6,
+ y: 7,
+ dir: 8,
+ dest: 39.5,
+ speed: y
+ },
+ {
+ x: 39.5,
+ y: 7,
+ dir: 1,
+ dest: 4,
+ speed: y
+ }],
+ 5: [{
+ x: 39.5,
+ y: 7,
+ dir: 1,
+ dest: 4,
+ speed: y
+ }],
+ 6: [{
+ x: 41.4,
+ y: 7,
+ dir: 4,
+ dest: 39.5,
+ speed: y
+ },
+ {
+ x: 39.5,
+ y: 7,
+ dir: 1,
+ dest: 4,
+ speed: y
+ }],
+ 7: [{
+ x: 39.5,
+ y: 4,
+ dir: 2,
+ dest: 7,
+ speed: 1.6
+ },
+ {
+ x: 39.5,
+ y: 7,
+ dir: 4,
+ dest: 37.625,
+ speed: 1.6
+ }],
+ 8: [{
+ x: 39.5,
+ y: 4,
+ dir: 2,
+ dest: 7,
+ speed: 1.6
+ }],
+ 9: [{
+ x: 39.5,
+ y: 4,
+ dir: 2,
+ dest: 7,
+ speed: 1.6
+ },
+ {
+ x: 39.5,
+ y: 7,
+ dir: 8,
+ dest: 41.375,
+ speed: 1.6
+ }],
+ 10: [{
+ x: 37.6,
+ y: 7,
+ dir: 8,
+ dest: 39.5,
+ speed: y
+ },
+ {
+ x: 39.5,
+ y: 7,
+ dir: 1,
+ dest: 4,
+ speed: y
+ }],
+ 11: [{
+ x: 39.5,
+ y: 7,
+ dir: 1,
+ dest: 4,
+ speed: y
+ }],
+ 12: [{
+ x: 41.4,
+ y: 7,
+ dir: 4,
+ dest: 39.5,
+ speed: y
+ },
+ {
+ x: 39.5,
+ y: 7,
+ dir: 1,
+ dest: 4,
+ speed: y
+ }]
+ },
+ B = {
+ 1: {
+ actors: [{
+ ghost: e,
+ x: 64,
+ y: 9,
+ id: 0
+ },
+ {
+ ghost: a,
+ x: 68.2,
+ y: 9,
+ id: 1
+ }],
+ sequence: [{
+ time: 5.5,
+ moves: [{
+ dir: 4,
+ speed: 0.75 * 0.8 * 2
+ },
+ {
+ dir: 4,
+ speed: 0.78 * 0.8 * 2
+ }]
+ },
+ {
+ time: 0.1,
+ moves: [{
+ dir: 4,
+ speed: 32
+ },
+ {
+ dir: 4,
+ speed: 0
+ }]
+ },
+ {
+ time: 9,
+ moves: [{
+ dir: 8,
+ speed: 0.75 * 0.8 * 2,
+ elId: "pcm-bpcm"
+ },
+ {
+ dir: 8,
+ speed: 0.8,
+ mode: 4
+ }]
+ }]
+ },
+ 2: {
+ actors: [{
+ ghost: e,
+ x: 64,
+ y: 9,
+ id: 0
+ },
+ {
+ ghost: a,
+ x: 70.2,
+ y: 9,
+ id: 1
+ },
+ {
+ ghost: a,
+ x: 32,
+ y: 9.5,
+ id: 2
+ }],
+ sequence: [{
+ time: 2.7,
+ moves: [{
+ dir: 4,
+ speed: 0.75 * 0.8 * 2
+ },
+ {
+ dir: 4,
+ speed: 0.78 * 0.8 * 2
+ },
+ {
+ dir: 0,
+ speed: 0,
+ elId: "pcm-stck"
+ }]
+ },
+ {
+ time: 1,
+ moves: [{
+ dir: 4,
+ speed: 0.75 * 0.8 * 2
+ },
+ {
+ dir: 4,
+ speed: 0.1 * 0.8
+ },
+ {
+ dir: 0,
+ speed: 0,
+ elId: "pcm-stck"
+ }]
+ },
+ {
+ time: 1.3,
+ moves: [{
+ dir: 4,
+ speed: 0.75 * 0.8 * 2
+ },
+ {
+ dir: 4,
+ speed: 0
+ },
+ {
+ dir: 0,
+ speed: 0,
+ elId: "pcm-stck"
+ }]
+ },
+ {
+ time: 1,
+ moves: [{
+ dir: 4,
+ speed: 0.75 * 0.8 * 2
+ },
+ {
+ dir: 4,
+ speed: 0,
+ elId: "pcm-ghfa"
+ },
+ {
+ dir: 0,
+ speed: 0,
+ elId: "pcm-stck"
+ }]
+ },
+ {
+ time: 2.5,
+ moves: [{
+ dir: 4,
+ speed: 0.75 * 0.8 * 2
+ },
+ {
+ dir: 4,
+ speed: 0,
+ elId: "pcm-ghfa"
+ },
+ {
+ dir: 0,
+ speed: 0,
+ elId: "pcm-stck"
+ }]
+ }]
+ },
+ 3: {
+ actors: [{
+ ghost: e,
+ x: 64,
+ y: 9,
+ id: 0
+ },
+ {
+ ghost: a,
+ x: 70.2,
+ y: 9,
+ id: 2
+ }],
+ sequence: [{
+ time: 5.3,
+ moves: [{
+ dir: 4,
+ speed: 0.75 * 0.8 * 2
+ },
+ {
+ dir: 4,
+ speed: 0.78 * 0.8 * 2,
+ elId: "pcm-ghin"
+ }]
+ },
+ {
+ time: 5.3,
+ moves: [{
+ dir: 4,
+ speed: 0
+ },
+ {
+ dir: 8,
+ speed: 0.78 * 0.8 * 2,
+ elId: "pcm-gbug"
+ }]
+ }]
+ }
+ },
+ C = [90, 45, 30],
+ D = C[0];
+
+ function E(b) {
+ this.id = b
+ }
+ E.prototype.A = function () {
+ var b = r[g.playerCount][this.id];
+ this.pos = [b.y * 8, b.x * 8];
+ this.posDelta = [0, 0];
+ this.tilePos = [b.y * 8, b.x * 8];
+ this.targetPos = [b.scatterY * 8, b.scatterX * 8];
+ this.scatterPos = [b.scatterY * 8, b.scatterX * 8];
+ this.lastActiveDir = this.dir = b.dir;
+ this.physicalSpeed = this.requestedDir = this.nextDir = 0;
+ this.c(0);
+ this.reverseDirectionsNext = this.freeToLeavePen = this.modeChangedWhileInPen = this.eatenInThisFrightMode = e;
+ this.l()
+ };
+ E.prototype.createElement = function () {
+ this.el = document.createElement("div");
+ this.el.className = "pcm-ac";
+ this.el.id = "actor" + this.id;
+ g.prepareElement(this.el, 0, 0);
+ g.playfieldEl.appendChild(this.el);
+ this.elPos = [0, 0];
+ this.elBackgroundPos = [0, 0]
+ };
+ E.prototype.a = function (b) {
+ var c = this.mode;
+ this.mode = b;
+ if (this.id == g.playerCount + 3 && (b == 16 || c == 16)) g.updateCruiseElroySpeed();
+ switch (c) {
+ case 32:
+ g.ghostExitingPenNow = e;
+ break;
+ case 8:
+ g.ghostEyesCount > 0 && g.ghostEyesCount--;
+ g.ghostEyesCount == 0 && g.playAmbientSound();
+ break
+ }
+ switch (b) {
+ case 4:
+ this.fullSpeed = g.levels.ghostFrightSpeed * 0.8;
+ this.tunnelSpeed = g.levels.ghostTunnelSpeed * 0.8;
+ this.followingRoutine = e;
+ break;
+ case 1:
+ this.fullSpeed = g.levels.ghostSpeed * 0.8;
+ this.tunnelSpeed = g.levels.ghostTunnelSpeed * 0.8;
+ this.followingRoutine =
+ e;
+ break;
+ case 2:
+ this.targetPos = this.scatterPos;
+ this.fullSpeed = g.levels.ghostSpeed * 0.8;
+ this.tunnelSpeed = g.levels.ghostTunnelSpeed * 0.8;
+ this.followingRoutine = e;
+ break;
+ case 8:
+ this.tunnelSpeed = this.fullSpeed = 1.6;
+ this.targetPos = [s[0], s[1]];
+ this.freeToLeavePen = this.followingRoutine = e;
+ break;
+ case 16:
+ this.l();
+ this.followingRoutine = a;
+ this.routineMoveId = -1;
+ switch (this.id) {
+ case g.playerCount + 1:
+ this.routineToFollow = 2;
+ break;
+ case g.playerCount + 2:
+ this.routineToFollow = 1;
+ break;
+ case g.playerCount + 3:
+ this.routineToFollow =
+ 3;
+ break
+ }
+ break;
+ case 32:
+ this.followingRoutine = a;
+ this.routineMoveId = -1;
+ switch (this.id) {
+ case g.playerCount + 1:
+ this.routineToFollow = 5;
+ break;
+ case g.playerCount + 2:
+ this.routineToFollow = 4;
+ break;
+ case g.playerCount + 3:
+ this.routineToFollow = 6;
+ break
+ }
+ g.ghostExitingPenNow = a;
+ break;
+ case 64:
+ this.followingRoutine = a;
+ this.routineMoveId = -1;
+ switch (this.id) {
+ case g.playerCount:
+ case g.playerCount + 1:
+ this.routineToFollow = 8;
+ break;
+ case g.playerCount + 2:
+ this.routineToFollow = 7;
+ break;
+ case g.playerCount + 3:
+ this.routineToFollow = 9;
+ break
+ }
+ break;
+ case 128:
+ this.followingRoutine = a;
+ this.routineMoveId = -1;
+ switch (this.id) {
+ case g.playerCount:
+ case g.playerCount + 1:
+ this.routineToFollow = 11;
+ break;
+ case g.playerCount + 2:
+ this.routineToFollow = 10;
+ break;
+ case g.playerCount + 3:
+ this.routineToFollow = 12;
+ break
+ }
+ break
+ }
+ this.d()
+ };
+ E.prototype.l = function () {
+ if (this.id >= g.playerCount) this.targetPlayerId = Math.floor(g.rand() * g.playerCount)
+ };
+ E.prototype.z = function (b) {
+ if (this.dir == g.oppositeDirections[b]) {
+ this.dir = b;
+ this.posDelta = [0, 0];
+ this.currentSpeed != 2 && this.c(0);
+ if (this.dir != 0) this.lastActiveDir = this.dir;
+ this.nextDir = 0
+ } else if (this.dir != b) if (this.dir == 0) {
+ if (g.playfield[this.pos[0]][this.pos[1]].allowedDir & b) this.dir = b
+ } else {
+ var c = g.playfield[this.tilePos[0]][this.tilePos[1]];
+ if (c && c.allowedDir & b) {
+ c = l[this.dir];
+ var d = [this.pos[0], this.pos[1]];
+ d[c.axis] -= c.increment;
+ var f = 0;
+ if (d[0] == this.tilePos[0] && d[1] == this.tilePos[1]) f = 1;
+ else {
+ d[c.axis] -= c.increment;
+ if (d[0] == this.tilePos[0] && d[1] == this.tilePos[1]) f = 2
+ }
+ if (f) {
+ this.dir = b;
+ this.pos[0] = this.tilePos[0];
+ this.pos[1] = this.tilePos[1];
+ c = l[this.dir];
+ this.pos[c.axis] += c.increment * f;
+ return
+ }
+ }
+ this.nextDir = b;
+ this.posDelta = [0, 0]
+ }
+ };
+ E.prototype.i = function (b) {
+ var c = this.tilePos,
+ d = l[this.dir],
+ f = [c[0], c[1]];
+ f[d.axis] += d.increment * 8;
+ var h = g.playfield[f[0]][f[1]];
+ if (b && !h.intersection) h = g.playfield[c[0]][c[1]];
+ if (h.intersection) switch (this.mode) {
+ case 2:
+ case 1:
+ case 8:
+ if ((this.dir & h.allowedDir) == 0 && h.allowedDir == g.oppositeDirections[this.dir]) this.nextDir = g.oppositeDirections[this.dir];
+ else {
+ b = 99999999999;
+ c = 0;
+ for (var j in i) {
+ var k = i[j];
+ if (h.allowedDir & k && this.dir != g.oppositeDirections[k]) {
+ d = l[k];
+ var x = [f[0], f[1]];
+ x[d.axis] += d.increment;
+ d = g.getDistance(x, [this.targetPos[0], this.targetPos[1]]);
+ if (d < b) {
+ b = d;
+ c = k
+ }
+ }
+ }
+ if (c) this.nextDir = c
+ }
+ break;
+ case 4:
+ if ((this.dir & h.allowedDir) == 0 && h.allowedDir == g.oppositeDirections[this.dir]) this.nextDir = g.oppositeDirections[this.dir];
+ else {
+ do f = i[Math.floor(g.rand() * 4)];
+ while ((f & h.allowedDir) == 0 || f == g.oppositeDirections[this.dir]);
+ this.nextDir = f
+ }
+ break
+ }
+ };
+ E.prototype.p = function (b) {
+ g.tilesChanged = a;
+ if (this.reverseDirectionsNext) {
+ this.dir = g.oppositeDirections[this.dir];
+ this.nextDir = 0;
+ this.reverseDirectionsNext = e;
+ this.i(a)
+ }
+ if (!this.ghost && !g.playfield[b[0]][b[1]].path) {
+ this.pos[0] = this.lastGoodTilePos[0];
+ this.pos[1] = this.lastGoodTilePos[1];
+ b[0] = this.lastGoodTilePos[0];
+ b[1] = this.lastGoodTilePos[1];
+ this.dir = 0
+ } else this.lastGoodTilePos = [b[0], b[1]];
+ g.playfield[b[0]][b[1]].type == 1 && this.mode != 8 ? this.c(2) : this.c(0);
+ !this.ghost && g.playfield[b[0]][b[1]].dot && g.dotEaten(this.id, b);
+ this.tilePos[0] = b[0];
+ this.tilePos[1] = b[1]
+ };
+ E.prototype.t = function () {
+ var b = this.tilePos;
+ switch (this.dir) {
+ case 1:
+ var c = [b[0], b[1]],
+ d = [b[0] + 3.6, b[1]];
+ break;
+ case 2:
+ c = [b[0] - 4, b[1]];
+ d = [b[0], b[1]];
+ break;
+ case 4:
+ c = [b[0], b[1]];
+ d = [b[0], b[1] + 3.6];
+ break;
+ case 8:
+ c = [b[0], b[1] - 4];
+ d = [b[0], b[1]];
+ break
+ }
+ if (this.pos[0] >= c[0] && this.pos[0] <= d[0] && this.pos[1] >= c[1] && this.pos[1] <= d[1]) {
+ b = l[this.nextDir];
+ this.posDelta[b.axis] += b.increment
+ }
+ };
+ E.prototype.n = function () {
+ if (this.pos[0] == q[0].y * 8 && this.pos[1] == q[0].x * 8) {
+ this.pos[0] = q[1].y * 8;
+ this.pos[1] = (q[1].x - 1) * 8
+ } else if (this.pos[0] == q[1].y * 8 && this.pos[1] == q[1].x * 8) {
+ this.pos[0] = q[0].y * 8;
+ this.pos[1] = (q[0].x + 1) * 8
+ }
+ this.mode == 8 && this.pos[0] == s[0] && this.pos[1] == s[1] && this.a(64);
+ if (!this.ghost && this.pos[0] == v[0] && (this.pos[1] == v[1] || this.pos[1] == v[1] + 8)) g.eatFruit(this.id)
+ };
+ E.prototype.u = function () {
+ this.n();
+ this.ghost && this.i(e);
+ var b = g.playfield[this.pos[0]][this.pos[1]];
+ if (b.intersection) if (this.nextDir && this.nextDir & b.allowedDir) {
+ if (this.dir != 0) this.lastActiveDir = this.dir;
+ this.dir = this.nextDir;
+ this.nextDir = 0;
+ if (!this.ghost) {
+ this.pos[0] += this.posDelta[0];
+ this.pos[1] += this.posDelta[1];
+ this.posDelta = [0, 0]
+ }
+ } else if ((this.dir & b.allowedDir) == 0) {
+ if (this.dir != 0) this.lastActiveDir = this.dir;
+ this.nextDir = this.dir = 0;
+ this.c(0)
+ }
+ };
+ E.prototype.o = function () {
+ var b = this.pos[0] / 8,
+ c = this.pos[1] / 8,
+ d = [Math.round(b) * 8, Math.round(c) * 8];
+ if (d[0] != this.tilePos[0] || d[1] != this.tilePos[1]) this.p(d);
+ else {
+ b = [Math.floor(b) * 8, Math.floor(c) * 8];
+ this.pos[1] == b[1] && this.pos[0] == b[0] && this.u()
+ }!this.ghost && this.nextDir && g.playfield[d[0]][d[1]].intersection && this.nextDir & g.playfield[d[0]][d[1]].allowedDir && this.t()
+ };
+ E.prototype.B = function () {
+ if (this.id == g.playerCount && g.dotsRemaining < g.levels.elroyDotsLeftPart1 && this.mode == 2 && (!g.lostLifeOnThisLevel || g.actors[g.playerCount + 3].mode != 16)) {
+ var b = g.actors[this.targetPlayerId];
+ this.targetPos = [b.tilePos[0], b.tilePos[1]]
+ } else if (this.ghost && this.mode == 1) {
+ b = g.actors[this.targetPlayerId];
+ switch (this.id) {
+ case g.playerCount:
+ this.targetPos = [b.tilePos[0], b.tilePos[1]];
+ break;
+ case g.playerCount + 1:
+ this.targetPos = [b.tilePos[0], b.tilePos[1]];
+ var c = l[b.dir];
+ this.targetPos[c.axis] += 32 * c.increment;
+ if (b.dir == 1) this.targetPos[1] -= 32;
+ break;
+ case g.playerCount + 2:
+ var d = g.actors[g.playerCount],
+ f = [b.tilePos[0], b.tilePos[1]];
+ c = l[b.dir];
+ f[c.axis] += 16 * c.increment;
+ if (b.dir == 1) f[1] -= 16;
+ this.targetPos[0] = f[0] * 2 - d.tilePos[0];
+ this.targetPos[1] = f[1] * 2 - d.tilePos[1];
+ break;
+ case g.playerCount + 3:
+ c = g.getDistance(b.tilePos, this.tilePos);
+ this.targetPos = c > 64 ? [b.tilePos[0], b.tilePos[1]] : this.scatterPos;
+ break
+ }
+ }
+ };
+ E.prototype.v = function () {
+ this.routineMoveId++;
+ if (this.routineMoveId == A[this.routineToFollow].length) if (this.mode == 16 && this.freeToLeavePen && !g.ghostExitingPenNow) {
+ this.eatenInThisFrightMode ? this.a(128) : this.a(32);
+ return
+ } else if (this.mode == 32 || this.mode == 128) {
+ this.pos = [s[0], s[1] + 4];
+ this.dir = this.modeChangedWhileInPen ? 8 : 4;
+ var b = g.mainGhostMode;
+ if (this.mode == 128 && b == 4) b = g.lastMainGhostMode;
+ this.a(b);
+ return
+ } else if (this.mode == 64) {
+ if (this.id == g.playerCount || this.freeToLeavePen) this.a(128);
+ else {
+ this.eatenInThisFrightMode =
+ a;
+ this.a(16)
+ }
+ return
+ } else this.routineMoveId = 0;
+ b = A[this.routineToFollow][this.routineMoveId];
+ this.pos[0] = b.y * 8;
+ this.pos[1] = b.x * 8;
+ this.dir = b.dir;
+ this.physicalSpeed = 0;
+ this.speedIntervals = g.getSpeedIntervals(b.speed);
+ this.proceedToNextRoutineMove = e;
+ this.b()
+ };
+ E.prototype.m = function () {
+ var b = A[this.routineToFollow][this.routineMoveId];
+ if (b) if (this.speedIntervals[g.intervalTime]) {
+ var c = l[this.dir];
+ this.pos[c.axis] += c.increment;
+ switch (this.dir) {
+ case 1:
+ case 4:
+ if (this.pos[c.axis] < b.dest * 8) {
+ this.pos[c.axis] = b.dest * 8;
+ this.proceedToNextRoutineMove = a
+ }
+ break;
+ case 2:
+ case 8:
+ if (this.pos[c.axis] > b.dest * 8) {
+ this.pos[c.axis] = b.dest * 8;
+ this.proceedToNextRoutineMove = a
+ }
+ break
+ }
+ this.b()
+ }
+ };
+ E.prototype.j = function () {
+ if (this.routineMoveId == -1 || this.proceedToNextRoutineMove) this.v();
+ this.m()
+ };
+ E.prototype.d = function () {
+ switch (this.currentSpeed) {
+ case 0:
+ var b = this.id == g.playerCount && (this.mode == 2 || this.mode == 1) ? g.cruiseElroySpeed : this.fullSpeed;
+ break;
+ case 1:
+ b = this.dotEatingSpeed;
+ break;
+ case 2:
+ b = this.tunnelSpeed;
+ break
+ }
+ if (this.physicalSpeed != b) {
+ this.physicalSpeed = b;
+ this.speedIntervals = g.getSpeedIntervals(this.physicalSpeed)
+ }
+ };
+ E.prototype.c = function (b) {
+ this.currentSpeed = b;
+ this.d()
+ };
+ E.prototype.e = function () {
+ if (this.dir) if (this.speedIntervals[g.intervalTime]) {
+ var b = l[this.dir];
+ this.pos[b.axis] += b.increment;
+ this.o();
+ this.b()
+ }
+ };
+ E.prototype.move = function () {
+ if (g.gameplayMode == 0 || this.ghost && g.gameplayMode == 1 && (this.mode == 8 || this.mode == 64)) {
+ if (this.requestedDir != 0) {
+ this.z(this.requestedDir);
+ this.requestedDir = 0
+ }
+ if (this.followingRoutine) {
+ this.j();
+ this.mode == 64 && this.j()
+ } else {
+ this.e();
+ this.mode == 8 && this.e()
+ }
+ }
+ };
+ E.prototype.k = function () {
+ var b = g.getPlayfieldX(this.pos[1] + this.posDelta[1]),
+ c = g.getPlayfieldY(this.pos[0] + this.posDelta[0]);
+ if (this.elPos[0] != c || this.elPos[1] != b) {
+ this.elPos[0] = c;
+ this.elPos[1] = b;
+ this.el.style.left = b + "px";
+ this.el.style.top = c + "px"
+ }
+ };
+ E.prototype.s = function () {
+ var b = 0,
+ c = 0,
+ d = this.dir;
+ if (d == 0) d = this.lastActiveDir;
+ if (g.gameplayMode == 1 && this.id == g.playerEatingGhostId) {
+ b = 3;
+ c = 0
+ } else if ((g.gameplayMode == 9 || g.gameplayMode == 10) && this.id == 0) {
+ b = 2;
+ c = 0
+ } else if (g.gameplayMode == 4 || g.gameplayMode == 5 || g.gameplayMode == 7) {
+ b = this.id == 0 ? 2 : 4;
+ c = 0
+ } else if (g.gameplayMode == 3) if (this.id == g.playerDyingId) {
+ d = 20 - Math.floor(g.gameplayModeTime / g.timing[4] * 21);
+ if (this.id == 0) {
+ b = d - 1;
+ switch (b) {
+ case -1:
+ b = 0;
+ break;
+ case 11:
+ b = 10;
+ break;
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 18:
+ case 19:
+ case 20:
+ b =
+ 11;
+ break
+ }
+ c = 12
+ } else switch (d) {
+ case 0:
+ case 1:
+ case 2:
+ case 6:
+ case 10:
+ b = 4;
+ c = 3;
+ break;
+ case 3:
+ case 7:
+ case 11:
+ b = 4;
+ c = 0;
+ break;
+ case 4:
+ case 8:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 18:
+ case 19:
+ case 20:
+ b = 4;
+ c = 2;
+ break;
+ case 5:
+ case 9:
+ b = 4;
+ c = 1;
+ break
+ }
+ } else {
+ b = 3;
+ c = 0
+ } else if (this.el.id == "pcm-bpcm") {
+ b = 14;
+ c = 0;
+ d = Math.floor(g.globalTime * 0.2) % 4;
+ if (d == 3) d = 1;
+ c += 2 * d
+ } else {
+ switch (d) {
+ case 4:
+ c = 0;
+ break;
+ case 8:
+ c = 1;
+ break;
+ case 1:
+ c = 2;
+ break;
+ case 2:
+ c = 3;
+ break
+ }
+ if (g.gameplayMode != 2) b = Math.floor(g.globalTime * 0.3) % 4;
+ if (b == 3 && this.dir == 0) b = 0;
+ if (b == 2 && this.id == 0) b = 0;
+ if (b == 3) {
+ b = 2;
+ if (this.id == 0) c = 0
+ }
+ if (this.id == 1) b += 4
+ }
+ return [c, b]
+ };
+ E.prototype.r = function () {
+ var b = 0,
+ c = 0;
+ if (g.gameplayMode == 10 || g.gameplayMode == 4 || g.gameplayMode == 3) {
+ b = 3;
+ c = 0
+ } else if (g.gameplayMode == 1 && this.id == g.ghostBeingEatenId) {
+ switch (g.modeScoreMultiplier) {
+ case 2:
+ b = 0;
+ break;
+ case 4:
+ b = 1;
+ break;
+ case 8:
+ b = 2;
+ break;
+ case 16:
+ b = 3;
+ break
+ }
+ c = 11;
+ this.el.className = "pcm-ac pcm-n"
+ } else if (this.mode == 4 || (this.mode == 16 || this.mode == 32) && g.mainGhostMode == 4 && !this.eatenInThisFrightMode) {
+ b = 0;
+ c = 8;
+ if (g.frightModeTime < g.levels.frightTotalTime - g.levels.frightTime && Math.floor(g.frightModeTime / g.timing[1]) % 2 == 0) b += 2;
+ b += Math.floor(g.globalTime / 16) % 2
+ } else if (this.mode == 8 || this.mode == 64) {
+ c = this.nextDir;
+ if (!c) c = this.dir;
+ switch (c) {
+ case 4:
+ b = 2;
+ break;
+ case 8:
+ b = 3;
+ break;
+ case 1:
+ b = 0;
+ break;
+ case 2:
+ b = 1;
+ break
+ }
+ c = 10
+ } else if (this.el.id == "pcm-ghin") {
+ b = 6;
+ c = 8;
+ b += Math.floor(g.globalTime / 16) % 2
+ } else if (this.el.id == "pcm-gbug") {
+ b = 6;
+ c = 9;
+ c += Math.floor(g.globalTime / 16) % 2
+ } else if (this.el.id == "pcm-ghfa") {
+ b = g.cutsceneSequenceId == 3 ? 6 : 7;
+ c = 11
+ } else if (this.el.id == "pcm-stck") {
+ b = g.cutsceneSequenceId == 1 ? g.cutsceneTime > 60 ? 1 : g.cutsceneTime > 45 ? 2 : 3 : g.cutsceneSequenceId == 2 ? 3 : g.cutsceneSequenceId == 3 || g.cutsceneSequenceId == 4 ? 4 : 0;
+ c = 13
+ } else {
+ c = this.nextDir;
+ if (!c || g.playfield[this.tilePos[0]][this.tilePos[1]].type == 1) c = this.dir;
+ switch (c) {
+ case 4:
+ b = 4;
+ break;
+ case 8:
+ b = 6;
+ break;
+ case 1:
+ b = 0;
+ break;
+ case 2:
+ b = 2;
+ break
+ }
+ c = 4 + this.id - g.playerCount;
+ if (this.speed > 0 || g.gameplayMode != 13) b += Math.floor(g.globalTime / 16) % 2
+ }
+ return [c, b]
+ };
+ E.prototype.b = function () {
+ this.k();
+ var b = [0, 0];
+ b = g.gameplayMode == 8 || g.gameplayMode == 14 ? [0, 3] : this.ghost ? this.r() : this.s();
+ if (this.elBackgroundPos[0] != b[0] || this.elBackgroundPos[1] != b[1]) {
+ this.elBackgroundPos[0] = b[0];
+ this.elBackgroundPos[1] = b[1];
+ b[0] *= 16;
+ b[1] *= 16;
+ g.changeElementBkPos(this.el, b[1], b[0], a)
+ }
+ };
+ g.rand = function () {
+ var b = 4294967296,
+ c = 134775813;
+ c = c * g.randSeed + 1;
+ return (g.randSeed = c % b) / b
+ };
+ g.seed = function (b) {
+ g.randSeed = b
+ };
+ g.getDistance = function (b, c) {
+ return Math.sqrt((c[1] - b[1]) * (c[1] - b[1]) + (c[0] - b[0]) * (c[0] - b[0]))
+ };
+ g.getPlayfieldX = function (b) {
+ return b + -32
+ };
+ g.getPlayfieldY = function (b) {
+ return b + 0
+ };
+ g.getCorrectedSpritePos = function (b) {
+ return b / 8 * 10 + 2
+ };
+ g.getDotElementId = function (b, c) {
+ return "pcm-d" + b + "-" + c
+ };
+ g.showElementById = function (b, c) {
+ var d = document.getElementById(b);
+ if (d) d.style.visibility = c ? "visible" : "hidden"
+ };
+ g.getAbsoluteElPos = function (b) {
+ var c = [0, 0];
+ do {
+ c[0] += b.offsetTop;
+ c[1] += b.offsetLeft
+ } while (b = b.offsetParent);
+ return c
+ };
+ g.prepareElement = function (b, c, d) {
+ c = g.getCorrectedSpritePos(parseInt(c, 10));
+ d = g.getCorrectedSpritePos(parseInt(d, 10));
+ if (g.useCss) {
+ b.style.backgroundImage = "url(logos/pacman10-hp-sprite.png)";
+ b.style.backgroundPosition = -c + "px " + -d + "px";
+ b.style.backgroundRepeat = "no-repeat"
+ } else {
+ b.style.overflow = "hidden";
+ c = "display: block; position: relative; left: " + -c + "px; top: " + -d + "px";
+ b.innerHTML = '<img style="' + c + '" src="logos/pacman10-hp-sprite.png">'
+ }
+ };
+ g.changeElementBkPos = function (b, c, d, f) {
+ if (f) {
+ c = g.getCorrectedSpritePos(c);
+ d = g.getCorrectedSpritePos(d)
+ }
+ if (g.useCss) b.style.backgroundPosition = -c + "px " + -d + "px";
+ else if (b.childNodes[0]) {
+ b.childNodes[0].style.left = -c + "px";
+ b.childNodes[0].style.top = -d + "px"
+ }
+ };
+ g.determinePlayfieldDimensions = function () {
+ g.playfieldWidth = 0;
+ g.playfieldHeight = 0;
+ for (var b in n) {
+ var c = n[b];
+ if (c.w) {
+ c = c.x + c.w - 1;
+ if (c > g.playfieldWidth) g.playfieldWidth = c
+ } else {
+ c = c.y + c.h - 1;
+ if (c > g.playfieldHeight) g.playfieldHeight = c
+ }
+ }
+ };
+ g.preparePlayfield = function () {
+ g.playfield = [];
+ for (var b = 0; b <= g.playfieldHeight + 1; b++) {
+ g.playfield[b * 8] = [];
+ for (var c = -2; c <= g.playfieldWidth + 1; c++) g.playfield[b * 8][c * 8] = {
+ path: 0,
+ dot: 0,
+ intersection: 0
+ }
+ }
+ };
+ g.preparePaths = function () {
+ for (var b in n) {
+ var c = n[b],
+ d = c.type;
+ if (c.w) {
+ for (var f = c.y * 8, h = c.x * 8; h <= (c.x + c.w - 1) * 8; h += 8) {
+ g.playfield[f][h].path = a;
+ if (g.playfield[f][h].dot == 0) {
+ g.playfield[f][h].dot = 1;
+ g.dotsRemaining++
+ }
+ g.playfield[f][h].type = !d || h != c.x * 8 && h != (c.x + c.w - 1) * 8 ? d : 0
+ }
+ g.playfield[f][c.x * 8].intersection = a;
+ g.playfield[f][(c.x + c.w - 1) * 8].intersection = a
+ } else {
+ h = c.x * 8;
+ for (f = c.y * 8; f <= (c.y + c.h - 1) * 8; f += 8) {
+ if (g.playfield[f][h].path) g.playfield[f][h].intersection = a;
+ g.playfield[f][h].path = a;
+ if (g.playfield[f][h].dot == 0) {
+ g.playfield[f][h].dot = 1;
+ g.dotsRemaining++
+ }
+ g.playfield[f][h].type = !d || f != c.y * 8 && f != (c.y + c.h - 1) * 8 ? d : 0
+ }
+ g.playfield[c.y * 8][h].intersection = a;
+ g.playfield[(c.y + c.h - 1) * 8][h].intersection = a
+ }
+ }
+ for (b in o) if (o[b].w) for (h = o[b].x * 8; h <= (o[b].x + o[b].w - 1) * 8; h += 8) {
+ g.playfield[o[b].y * 8][h].dot = 0;
+ g.dotsRemaining--
+ } else for (f = o[b].y * 8; f <= (o[b].y + o[b].h - 1) * 8; f += 8) {
+ g.playfield[f][o[b].x * 8].dot = 0;
+ g.dotsRemaining--
+ }
+ };
+ g.prepareAllowedDirections = function () {
+ for (var b = 8; b <= g.playfieldHeight * 8; b += 8) for (var c = 8; c <= g.playfieldWidth * 8; c += 8) {
+ g.playfield[b][c].allowedDir = 0;
+ if (g.playfield[b - 8][c].path) g.playfield[b][c].allowedDir += 1;
+ if (g.playfield[b + 8][c].path) g.playfield[b][c].allowedDir += 2;
+ if (g.playfield[b][c - 8].path) g.playfield[b][c].allowedDir += 4;
+ if (g.playfield[b][c + 8].path) g.playfield[b][c].allowedDir += 8
+ }
+ };
+ g.createDotElements = function () {
+ for (var b = 8; b <= g.playfieldHeight * 8; b += 8) for (var c = 8; c <= g.playfieldWidth * 8; c += 8) if (g.playfield[b][c].dot) {
+ var d = document.createElement("div");
+ d.className = "pcm-d";
+ d.id = g.getDotElementId(b, c);
+ d.style.left = c + -32 + "px";
+ d.style.top = b + 0 + "px";
+ g.playfieldEl.appendChild(d)
+ }
+ };
+ g.createEnergizerElements = function () {
+ for (var b in p) {
+ var c = p[b],
+ d = g.getDotElementId(c.y * 8, c.x * 8);
+ document.getElementById(d).className = "pcm-e";
+ g.prepareElement(document.getElementById(d), 0, 144);
+ g.playfield[c.y * 8][c.x * 8].dot = 2
+ }
+ };
+ g.createFruitElement = function () {
+ g.fruitEl = document.createElement("div");
+ g.fruitEl.id = "pcm-f";
+ g.fruitEl.style.left = g.getPlayfieldX(v[1]) + "px";
+ g.fruitEl.style.top = g.getPlayfieldY(v[0]) + "px";
+ g.prepareElement(g.fruitEl, -32, -16);
+ g.playfieldEl.appendChild(g.fruitEl)
+ };
+ g.createPlayfieldElements = function () {
+ g.doorEl = document.createElement("div");
+ g.doorEl.id = "pcm-do";
+ g.doorEl.style.display = "none";
+ g.playfieldEl.appendChild(g.doorEl);
+ g.createDotElements();
+ g.createEnergizerElements();
+ g.createFruitElement()
+ };
+ g.createActors = function () {
+ g.actors = [];
+ for (var b = 0; b < g.playerCount + 4; b++) {
+ g.actors[b] = new E(b);
+ if (b < g.playerCount) {
+ g.actors[b].ghost = e;
+ g.actors[b].mode = 1
+ } else g.actors[b].ghost = a
+ }
+ };
+ g.restartActors = function () {
+ for (var b in g.actors) g.actors[b].A()
+ };
+ g.createActorElements = function () {
+ for (var b in g.actors) g.actors[b].createElement()
+ };
+ g.createPlayfield = function () {
+ g.playfieldEl = document.createElement("div");
+ g.playfieldEl.id = "pcm-p";
+ g.canvasEl.appendChild(g.playfieldEl)
+ };
+ g.resetPlayfield = function () {
+ g.dotsRemaining = 0;
+ g.dotsEaten = 0;
+ g.playfieldEl.innerHTML = "";
+ g.prepareElement(g.playfieldEl, 256, 0);
+ g.determinePlayfieldDimensions();
+ g.preparePlayfield();
+ g.preparePaths();
+ g.prepareAllowedDirections();
+ g.createPlayfieldElements();
+ g.createActorElements()
+ };
+ g.keyPressed = function (b) {
+ var c = e;
+ switch (b) {
+ case 37:
+ g.actors[0].requestedDir = 4;
+ c = a;
+ break;
+ case 38:
+ g.actors[0].requestedDir = 1;
+ c = a;
+ break;
+ case 39:
+ g.actors[0].requestedDir = 8;
+ c = a;
+ break;
+ case 40:
+ g.actors[0].requestedDir = 2;
+ c = a;
+ break;
+ case 65:
+ if (g.playerCount == 2) {
+ g.actors[1].requestedDir = 4;
+ c = a
+ }
+ break;
+ case 83:
+ if (g.playerCount == 2) {
+ g.actors[1].requestedDir = 2;
+ c = a
+ }
+ break;
+ case 68:
+ if (g.playerCount == 2) {
+ g.actors[1].requestedDir = 8;
+ c = a
+ }
+ break;
+ case 87:
+ if (g.playerCount == 2) {
+ g.actors[1].requestedDir = 1;
+ c = a
+ }
+ break
+ }
+ return c
+ };
+ g.handleKeyDown = function (b) {
+ if (!b) b = window.event;
+ if (g.keyPressed(b.keyCode)) if (b.preventDefault) b.preventDefault();
+ else b.returnValue = e
+ };
+ g.canvasClicked = function (b, c) {
+ var d = g.getAbsoluteElPos(g.canvasEl);
+ b -= d[1] - -32;
+ c -= d[0] - 0;
+ d = g.actors[0];
+ var f = g.getPlayfieldX(d.pos[1] + d.posDelta[1]) + 16,
+ h = g.getPlayfieldY(d.pos[0] + d.posDelta[0]) + 32,
+ j = Math.abs(b - f),
+ k = Math.abs(c - h);
+ if (j > 8 && k < j) d.requestedDir = b > f ? 8 : 4;
+ else if (k > 8 && j < k) d.requestedDir = c > h ? 2 : 1
+ };
+ g.handleClick = function (b) {
+ if (!b) b = window.event;
+ g.canvasClicked(b.clientX, b.clientY)
+ };
+ g.registerTouch = function () {
+ document.body.addEventListener("touchstart", g.handleTouchStart, a);
+ g.canvasEl.addEventListener("touchstart", g.handleTouchStart, a);
+ document.f && document.f.q && document.f.q.addEventListener("touchstart", g.handleTouchStart, a)
+ };
+ g.handleTouchStart = function (b) {
+ g.touchDX = 0;
+ g.touchDY = 0;
+ if (b.touches.length == 1) {
+ g.touchStartX = b.touches[0].pageX;
+ g.touchStartY = b.touches[0].pageY;
+ document.body.addEventListener("touchmove", g.handleTouchMove, a);
+ document.body.addEventListener("touchend", g.handleTouchEnd, a)
+ }
+ b.preventDefault();
+ b.stopPropagation()
+ };
+ g.handleTouchMove = function (b) {
+ if (b.touches.length > 1) g.cancelTouch();
+ else {
+ g.touchDX = b.touches[0].pageX - g.touchStartX;
+ g.touchDY = b.touches[0].pageY - g.touchStartY
+ }
+ b.preventDefault();
+ b.stopPropagation()
+ };
+ g.handleTouchEnd = function (b) {
+ if (g.touchDX == 0 && g.touchDY == 0) g.canvasClicked(g.touchStartX, g.touchStartY);
+ else {
+ var c = Math.abs(g.touchDX),
+ d = Math.abs(g.touchDY);
+ if (c < 8 && d < 8) g.canvasClicked(g.touchStartX, g.touchStartY);
+ else if (c > 15 && d < c * 2 / 3) g.actors[0].requestedDir = g.touchDX > 0 ? 8 : 4;
+ else if (d > 15 && c < d * 2 / 3) g.actors[0].requestedDir = g.touchDY > 0 ? 2 : 1
+ }
+ b.preventDefault();
+ b.stopPropagation();
+ g.cancelTouch()
+ };
+ g.cancelTouch = function () {
+ document.body.removeEventListener("touchmove", g.handleTouchMove, a);
+ document.body.removeEventListener("touchend", g.handleTouchEnd, a);
+ g.touchStartX = null;
+ g.touchStartY = null
+ };
+ g.addEventListeners = function () {
+ if (window.addEventListener) {
+ window.addEventListener("keydown", g.handleKeyDown, e);
+ g.canvasEl.addEventListener("click", g.handleClick, e);
+ g.registerTouch()
+ } else {
+ document.body.attachEvent("onkeydown", g.handleKeyDown);
+ g.canvasEl.attachEvent("onclick", g.handleClick)
+ }
+ };
+ g.startGameplay = function () {
+ g.score = [0, 0];
+ g.extraLifeAwarded = [e, e];
+ g.lives = 3;
+ g.level = 0;
+ g.paused = e;
+ g.globalTime = 0;
+ g.newLevel(a)
+ };
+ g.restartGameplay = function (b) {
+ g.seed(0);
+ g.frightModeTime = 0;
+ g.intervalTime = 0;
+ g.gameplayModeTime = 0;
+ g.fruitTime = 0;
+ g.ghostModeSwitchPos = 0;
+ g.ghostModeTime = g.levels.ghostModeSwitchTimes[0] * D;
+ g.ghostExitingPenNow = e;
+ g.ghostEyesCount = 0;
+ g.tilesChanged = e;
+ g.updateCruiseElroySpeed();
+ g.hideFruit();
+ g.resetForcePenLeaveTime();
+ g.restartActors();
+ g.updateActorPositions();
+ g.switchMainGhostMode(2, a);
+ for (var c = g.playerCount + 1; c < g.playerCount + 4; c++) g.actors[c].a(16);
+ g.dotEatingChannel = [0, 0];
+ g.dotEatingSoundPart = [1, 1];
+ g.clearDotEatingNow();
+ b ? g.changeGameplayMode(4) : g.changeGameplayMode(6)
+ };
+ g.initiateDoubleMode = function () {
+ if (g.playerCount != 2) {
+ g.stopAllAudio();
+ g.changeGameplayMode(12)
+ }
+ };
+ g.newGame = function () {
+ g.playerCount = 1;
+ g.createChrome();
+ g.createPlayfield();
+ g.createActors();
+ g.startGameplay()
+ };
+ g.switchToDoubleMode = function () {
+ g.playerCount = 2;
+ g.createChrome();
+ g.createPlayfield();
+ g.createActors();
+ g.startGameplay()
+ };
+ g.insertCoin = function () {
+ g.gameplayMode == 8 || g.gameplayMode == 14 ? g.newGame() : g.initiateDoubleMode()
+ };
+ g.createKillScreenElement = function (b, c, d, f, h) {
+ var j = document.createElement("div");
+ j.style.left = b + "px";
+ j.style.top = c + "px";
+ j.style.width = d + "px";
+ j.style.height = f + "px";
+ j.style.zIndex = 119;
+ if (h) {
+ j.style.background = "url(logos/pacman10-hp-sprite.png) -" + g.killScreenTileX + "px -" + g.killScreenTileY + "px no-repeat";
+ g.killScreenTileY += 8
+ } else j.style.background = "black";
+ g.playfieldEl.appendChild(j)
+ };
+ g.killScreen = function () {
+ g.seed(0);
+ g.canvasEl.style.visibility = "";
+ g.createKillScreenElement(272, 0, 200, 80, e);
+ g.createKillScreenElement(280, 80, 192, 56, e);
+ g.killScreenTileX = 80;
+ g.killScreenTileY = 0;
+ for (var b = 280; b <= 472; b += 8) for (var c = 0; c <= 136; c += 8) {
+ if (g.rand() < 0.03) {
+ g.killScreenTileX = Math.floor(g.rand() * 25) * 10;
+ g.killScreenTileY = Math.floor(g.rand() * 2) * 10
+ }
+ g.createKillScreenElement(b, c, 8, 8, a)
+ }
+ g.changeGameplayMode(14)
+ };
+ g.newLevel = function (b) {
+ g.level++;
+ g.levels = g.level >= z.length ? z[z.length - 1] : z[g.level];
+ g.levels.frightTime = Math.round(g.levels.frightTime * D);
+ g.levels.frightTotalTime = g.levels.frightTime + g.timing[1] * (g.levels.frightBlinkCount * 2 - 1);
+ for (var c in g.actors) g.actors[c].dotCount = 0;
+ g.alternatePenLeavingScheme = e;
+ g.lostLifeOnThisLevel = e;
+ g.updateChrome();
+ g.resetPlayfield();
+ g.restartGameplay(b);
+ g.level == 256 && g.killScreen()
+ };
+ g.newLife = function () {
+ g.lostLifeOnThisLevel = a;
+ g.alternatePenLeavingScheme = a;
+ g.alternateDotCount = 0;
+ g.lives--;
+ g.updateChromeLives();
+ g.lives == -1 ? g.changeGameplayMode(8) : g.restartGameplay(e)
+ };
+ g.switchMainGhostMode = function (b, c) {
+ if (b == 4 && g.levels.frightTime == 0) for (var d in g.actors) {
+ var f = g.actors[d];
+ if (f.ghost) f.reverseDirectionsNext = a
+ } else {
+ f = g.mainGhostMode;
+ if (b == 4 && g.mainGhostMode != 4) g.lastMainGhostMode = g.mainGhostMode;
+ g.mainGhostMode = b;
+ if (b == 4 || f == 4) g.playAmbientSound();
+ switch (b) {
+ case 1:
+ case 2:
+ g.currentPlayerSpeed = g.levels.playerSpeed * 0.8;
+ g.currentDotEatingSpeed = g.levels.dotEatingSpeed * 0.8;
+ break;
+ case 4:
+ g.currentPlayerSpeed = g.levels.playerFrightSpeed * 0.8;
+ g.currentDotEatingSpeed = g.levels.dotEatingFrightSpeed * 0.8;
+ g.frightModeTime = g.levels.frightTotalTime;
+ g.modeScoreMultiplier = 1;
+ break
+ }
+ for (d in g.actors) {
+ f = g.actors[d];
+ if (f.ghost) {
+ if (b != 64 && !c) f.modeChangedWhileInPen = a;
+ if (b == 4) f.eatenInThisFrightMode = e;
+ if (f.mode != 8 && f.mode != 16 && f.mode != 32 && f.mode != 128 && f.mode != 64 || c) {
+ if (!c && f.mode != 4 && f.mode != b) f.reverseDirectionsNext = a;
+ f.a(b)
+ }
+ } else {
+ f.fullSpeed = g.currentPlayerSpeed;
+ f.dotEatingSpeed = g.currentDotEatingSpeed;
+ f.tunnelSpeed = g.currentPlayerSpeed;
+ f.d()
+ }
+ }
+ }
+ };
+ g.figureOutPenLeaving = function () {
+ if (g.alternatePenLeavingScheme) {
+ g.alternateDotCount++;
+ switch (g.alternateDotCount) {
+ case m[1]:
+ g.actors[g.playerCount + 1].freeToLeavePen = a;
+ break;
+ case m[2]:
+ g.actors[g.playerCount + 2].freeToLeavePen = a;
+ break;
+ case m[3]:
+ if (g.actors[g.playerCount + 3].mode == 16) g.alternatePenLeavingScheme = e;
+ break
+ }
+ } else if (g.actors[g.playerCount + 1].mode == 16 || g.actors[g.playerCount + 1].mode == 8) {
+ g.actors[g.playerCount + 1].dotCount++;
+ if (g.actors[g.playerCount + 1].dotCount >= g.levels.penLeavingLimits[1]) g.actors[g.playerCount + 1].freeToLeavePen = a
+ } else if (g.actors[g.playerCount + 2].mode == 16 || g.actors[g.playerCount + 2].mode == 8) {
+ g.actors[g.playerCount + 2].dotCount++;
+ if (g.actors[g.playerCount + 2].dotCount >= g.levels.penLeavingLimits[2]) g.actors[g.playerCount + 2].freeToLeavePen = a
+ } else if (g.actors[g.playerCount + 3].mode == 16 || g.actors[g.playerCount + 3].mode == 8) {
+ g.actors[g.playerCount + 3].dotCount++;
+ if (g.actors[g.playerCount + 3].dotCount >= g.levels.penLeavingLimits[3]) g.actors[g.playerCount + 3].freeToLeavePen = a
+ }
+ };
+ g.resetForcePenLeaveTime = function () {
+ g.forcePenLeaveTime = g.levels.penForceTime * D
+ };
+ g.dotEaten = function (b, c) {
+ g.dotsRemaining--;
+ g.dotsEaten++;
+ g.actors[b].c(1);
+ g.playDotEatingSound(b);
+ if (g.playfield[c[0]][c[1]].dot == 2) {
+ g.switchMainGhostMode(4, e);
+ g.addToScore(50, b)
+ } else g.addToScore(10, b);
+ var d = document.getElementById(g.getDotElementId(c[0], c[1]));
+ d.style.display = "none";
+ g.playfield[c[0]][c[1]].dot = 0;
+ g.updateCruiseElroySpeed();
+ g.resetForcePenLeaveTime();
+ g.figureOutPenLeaving();
+ if (g.dotsEaten == 70 || g.dotsEaten == 170) g.showFruit();
+ g.dotsRemaining == 0 && g.finishLevel();
+ g.playAmbientSound()
+ };
+ g.getFruitSprite = function (b) {
+ var c = b <= 4 ? 128 : 160;
+ b = 128 + 16 * ((b - 1) % 4);
+ return [c, b]
+ };
+ g.getFruitScoreSprite = function (b) {
+ var c = 128;
+ b = 16 * (b - 1);
+ return [c, b]
+ };
+ g.hideFruit = function () {
+ g.fruitShown = e;
+ g.changeElementBkPos(g.fruitEl, 32, 16, a)
+ };
+ g.showFruit = function () {
+ g.fruitShown = a;
+ var b = g.getFruitSprite(g.levels.fruit);
+ g.changeElementBkPos(g.fruitEl, b[0], b[1], a);
+ g.fruitTime = g.timing[15] + (g.timing[16] - g.timing[15]) * g.rand()
+ };
+ g.eatFruit = function (b) {
+ if (g.fruitShown) {
+ g.playSound("fruit", 0);
+ g.fruitShown = e;
+ var c = g.getFruitScoreSprite(g.levels.fruit);
+ g.changeElementBkPos(g.fruitEl, c[0], c[1], a);
+ g.fruitTime = g.timing[14];
+ g.addToScore(g.levels.fruitScore, b)
+ }
+ };
+ g.updateActorTargetPositions = function () {
+ for (var b = g.playerCount; b < g.playerCount + 4; b++) g.actors[b].B()
+ };
+ g.moveActors = function () {
+ for (var b in g.actors) g.actors[b].move()
+ };
+ g.ghostDies = function (b, c) {
+ g.playSound("eating-ghost", 0);
+ g.addToScore(200 * g.modeScoreMultiplier, c);
+ g.modeScoreMultiplier *= 2;
+ g.ghostBeingEatenId = b;
+ g.playerEatingGhostId = c;
+ g.changeGameplayMode(1)
+ };
+ g.playerDies = function (b) {
+ g.playerDyingId = b;
+ g.changeGameplayMode(2)
+ };
+ g.detectCollisions = function () {
+ g.tilesChanged = e;
+ for (var b = g.playerCount; b < g.playerCount + 4; b++) for (var c = 0; c < g.playerCount; c++) if (g.actors[b].tilePos[0] == g.actors[c].tilePos[0] && g.actors[b].tilePos[1] == g.actors[c].tilePos[1]) if (g.actors[b].mode == 4) {
+ g.ghostDies(b, c);
+ return
+ } else g.actors[b].mode != 8 && g.actors[b].mode != 16 && g.actors[b].mode != 32 && g.actors[b].mode != 128 && g.actors[b].mode != 64 && g.playerDies(c)
+ };
+ g.updateCruiseElroySpeed = function () {
+ var b = g.levels.ghostSpeed * 0.8;
+ if (!g.lostLifeOnThisLevel || g.actors[g.playerCount + 3].mode != 16) {
+ var c = g.levels;
+ if (g.dotsRemaining < c.elroyDotsLeftPart2) b = c.elroySpeedPart2 * 0.8;
+ else if (g.dotsRemaining < c.elroyDotsLeftPart1) b = c.elroySpeedPart1 * 0.8
+ }
+ if (b != g.cruiseElroySpeed) {
+ g.cruiseElroySpeed = b;
+ g.actors[g.playerCount].d()
+ }
+ };
+ g.getSpeedIntervals = function (b) {
+ if (!g.speedIntervals[b]) {
+ var c = 0,
+ d = 0;
+ g.speedIntervals[b] = [];
+ for (var f = 0; f < D; f++) {
+ c += b;
+ if (Math.floor(c) > d) {
+ g.speedIntervals[b].push(a);
+ d = Math.floor(c)
+ } else g.speedIntervals[b].push(e)
+ }
+ }
+ return g.speedIntervals[b]
+ };
+ g.finishLevel = function () {
+ g.changeGameplayMode(9)
+ };
+ g.changeGameplayMode = function (b) {
+ g.gameplayMode = b;
+ if (b != 13) for (var c = 0; c < g.playerCount + 4; c++) g.actors[c].b();
+ switch (b) {
+ case 0:
+ g.playAmbientSound();
+ break;
+ case 2:
+ g.stopAllAudio();
+ g.gameplayModeTime = g.timing[3];
+ break;
+ case 3:
+ g.playerDyingId == 0 ? g.playSound("death", 0) : g.playSound("death-double", 0);
+ g.gameplayModeTime = g.timing[4];
+ break;
+ case 6:
+ g.canvasEl.style.visibility = "hidden";
+ g.gameplayModeTime = g.timing[5];
+ break;
+ case 7:
+ g.stopAllAudio();
+ g.canvasEl.style.visibility = "";
+ g.doorEl.style.display = "block";
+ b = document.createElement("div");
+ b.id = "pcm-re";
+ g.prepareElement(b, 160, 0);
+ g.playfieldEl.appendChild(b);
+ g.gameplayModeTime = g.timing[6];
+ break;
+ case 4:
+ g.doorEl.style.display = "block";
+ b = document.createElement("div");
+ b.id = "pcm-re";
+ g.prepareElement(b, 160, 0);
+ g.playfieldEl.appendChild(b);
+ g.gameplayModeTime = g.timing[7];
+ g.stopAllAudio();
+ g.playerCount == 2 ? g.playSound("start-music-double", 0, a) : g.playSound("start-music", 0, a);
+ break;
+ case 5:
+ g.lives--;
+ g.updateChromeLives();
+ g.gameplayModeTime = g.timing[8];
+ break;
+ case 8:
+ case 14:
+ b = document.getElementById("pcm-re");
+ google.dom.remove(b);
+ g.stopAllAudio();
+ b = document.createElement("div");
+ b.id = "pcm-go";
+ g.prepareElement(b, 8, 152);
+ g.playfieldEl.appendChild(b);
+ g.gameplayModeTime = g.timing[9];
+ break;
+ case 9:
+ g.stopAllAudio();
+ g.gameplayModeTime = g.timing[10];
+ break;
+ case 10:
+ g.doorEl.style.display = "none";
+ g.gameplayModeTime = g.timing[11];
+ break;
+ case 11:
+ g.canvasEl.style.visibility = "hidden";
+ g.gameplayModeTime = g.timing[12];
+ break;
+ case 12:
+ g.playfieldEl.style.visibility = "hidden";
+ g.gameplayModeTime = g.timing[13];
+ break;
+ case 1:
+ g.gameplayModeTime =
+ g.timing[2];
+ break;
+ case 13:
+ g.startCutscene();
+ break
+ }
+ };
+ g.showChrome = function (b) {
+ g.showElementById("pcm-sc-1-l", b);
+ g.showElementById("pcm-sc-2-l", b);
+ g.showElementById("pcm-sc-1", b);
+ g.showElementById("pcm-sc-2", b);
+ g.showElementById("pcm-li", b);
+ g.showElementById("pcm-so", b)
+ };
+ g.startCutscene = function () {
+ g.playfieldEl.style.visibility = "hidden";
+ g.canvasEl.style.visibility = "";
+ g.showChrome(e);
+ g.cutsceneCanvasEl = document.createElement("div");
+ g.cutsceneCanvasEl.id = "pcm-cc";
+ g.canvasEl.appendChild(g.cutsceneCanvasEl);
+ g.cutscene = B[g.cutsceneId];
+ g.cutsceneSequenceId = -1;
+ g.frightModeTime = g.levels.frightTotalTime;
+ g.cutsceneActors = [];
+ for (var b in g.cutscene.actors) {
+ var c = g.cutscene.actors[b].id;
+ if (c > 0) c += g.playerCount - 1;
+ var d = document.createElement("div");
+ d.className = "pcm-ac";
+ d.id = "actor" + c;
+ g.prepareElement(d, 0, 0);
+ c = new E(c);
+ c.el = d;
+ c.elBackgroundPos = [0, 0];
+ c.elPos = [0, 0];
+ c.pos = [g.cutscene.actors[b].y * 8, g.cutscene.actors[b].x * 8];
+ c.posDelta = [0, 0];
+ c.ghost = g.cutscene.actors[b].ghost;
+ g.cutsceneCanvasEl.appendChild(d);
+ g.cutsceneActors.push(c)
+ }
+ g.cutsceneNextSequence();
+ g.stopAllAudio();
+ g.playAmbientSound()
+ };
+ g.stopCutscene = function () {
+ g.playfieldEl.style.visibility = "";
+ google.dom.remove(g.cutsceneCanvasEl);
+ g.showChrome(a);
+ g.newLevel(e)
+ };
+ g.cutsceneNextSequence = function () {
+ g.cutsceneSequenceId++;
+ if (g.cutscene.sequence.length == g.cutsceneSequenceId) g.stopCutscene();
+ else {
+ var b = g.cutscene.sequence[g.cutsceneSequenceId];
+ g.cutsceneTime = b.time * D;
+ for (var c in g.cutsceneActors) {
+ var d = g.cutsceneActors[c];
+ d.dir = b.moves[c].dir;
+ d.speed = b.moves[c].speed;
+ if (b.moves[c].elId) d.el.id = b.moves[c].elId;
+ if (b.moves[c].mode) d.mode = b.moves[c].mode;
+ d.b()
+ }
+ }
+ };
+ g.checkCutscene = function () {
+ g.cutsceneTime <= 0 && g.cutsceneNextSequence()
+ };
+ g.advanceCutscene = function () {
+ for (var b in g.cutsceneActors) {
+ var c = g.cutsceneActors[b],
+ d = l[c.dir];
+ c.pos[d.axis] += d.increment * c.speed;
+ c.b()
+ }
+ g.cutsceneTime--
+ };
+ g.updateActorPositions = function () {
+ for (var b in g.actors) g.actors[b].k()
+ };
+ g.blinkEnergizers = function () {
+ switch (g.gameplayMode) {
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ g.playfieldEl.className = "";
+ break;
+ case 8:
+ case 14:
+ g.playfieldEl.className = "blk";
+ break;
+ default:
+ if (g.globalTime % (g.timing[0] * 2) == 0) g.playfieldEl.className = "";
+ else if (g.globalTime % (g.timing[0] * 2) == g.timing[0]) g.playfieldEl.className = "blk";
+ break
+ }
+ };
+ g.blinkScoreLabels = function () {
+ if (g.gameplayMode != 13) {
+ var b = "";
+ if (g.globalTime % (g.timing[17] * 2) == 0) b = "visible";
+ else if (g.globalTime % (g.timing[17] * 2) == g.timing[17]) b = "hidden";
+ if (b) for (var c = 0; c < g.playerCount; c++) g.scoreLabelEl[c].style.visibility = b
+ }
+ };
+ g.finishFrightMode = function () {
+ g.switchMainGhostMode(g.lastMainGhostMode, e)
+ };
+ g.handleGameplayModeTimer = function () {
+ if (g.gameplayModeTime) {
+ g.gameplayModeTime--;
+ switch (g.gameplayMode) {
+ case 2:
+ case 3:
+ for (var b = 0; b < g.playerCount + 4; b++) g.actors[b].b();
+ break;
+ case 10:
+ Math.floor(g.gameplayModeTime / (g.timing[11] / 8)) % 2 == 0 ? g.changeElementBkPos(g.playfieldEl, 322, 2, e) : g.changeElementBkPos(g.playfieldEl, 322, 138, e)
+ }
+ if (g.gameplayModeTime <= 0) {
+ g.gameplayModeTime = 0;
+ switch (g.gameplayMode) {
+ case 1:
+ g.changeGameplayMode(0);
+ g.ghostEyesCount++;
+ g.playAmbientSound();
+ g.actors[g.ghostBeingEatenId].el.className = "pcm-ac";
+ g.actors[g.ghostBeingEatenId].a(8);
+ var c = e;
+ for (b = g.playerCount; b < g.playerCount + 4; b++) if (g.actors[b].mode == 4 || (g.actors[b].mode == 16 || g.actors[b].mode == 128) && !g.actors[b].eatenInThisFrightMode) {
+ c = a;
+ break
+ }
+ c || g.finishFrightMode();
+ break;
+ case 2:
+ g.changeGameplayMode(3);
+ break;
+ case 3:
+ g.newLife();
+ break;
+ case 4:
+ g.changeGameplayMode(5);
+ break;
+ case 6:
+ g.changeGameplayMode(7);
+ break;
+ case 7:
+ case 5:
+ b = document.getElementById("pcm-re");
+ google.dom.remove(b);
+ g.changeGameplayMode(0);
+ break;
+ case 8:
+ b = document.getElementById("pcm-go");
+ google.dom.remove(b);
+ google.pacManQuery && google.pacManQuery();
+ break;
+ case 9:
+ g.changeGameplayMode(10);
+ break;
+ case 10:
+ g.changeGameplayMode(11);
+ break;
+ case 11:
+ if (g.levels.cutsceneId) {
+ g.cutsceneId = g.levels.cutsceneId;
+ g.changeGameplayMode(13)
+ } else {
+ g.canvasEl.style.visibility = "";
+ g.newLevel(e)
+ }
+ break;
+ case 12:
+ g.playfieldEl.style.visibility = "";
+ g.canvasEl.style.visibility = "";
+ g.switchToDoubleMode();
+ break
+ }
+ }
+ }
+ };
+ g.handleFruitTimer = function () {
+ if (g.fruitTime) {
+ g.fruitTime--;
+ g.fruitTime <= 0 && g.hideFruit()
+ }
+ };
+ g.handleGhostModeTimer = function () {
+ if (g.frightModeTime) {
+ g.frightModeTime--;
+ if (g.frightModeTime <= 0) {
+ g.frightModeTime = 0;
+ g.finishFrightMode()
+ }
+ } else if (g.ghostModeTime > 0) {
+ g.ghostModeTime--;
+ if (g.ghostModeTime <= 0) {
+ g.ghostModeTime = 0;
+ g.ghostModeSwitchPos++;
+ if (g.levels.ghostModeSwitchTimes[g.ghostModeSwitchPos]) {
+ g.ghostModeTime = g.levels.ghostModeSwitchTimes[g.ghostModeSwitchPos] * D;
+ switch (g.mainGhostMode) {
+ case 2:
+ g.switchMainGhostMode(1, e);
+ break;
+ case 1:
+ g.switchMainGhostMode(2, e);
+ break
+ }
+ }
+ }
+ }
+ };
+ g.handleForcePenLeaveTimer = function () {
+ if (g.forcePenLeaveTime) {
+ g.forcePenLeaveTime--;
+ if (g.forcePenLeaveTime <= 0) {
+ for (var b = 1; b <= 3; b++) if (g.actors[g.playerCount + b].mode == 16) {
+ g.actors[g.playerCount + b].freeToLeavePen = a;
+ break
+ }
+ g.resetForcePenLeaveTime()
+ }
+ }
+ };
+ g.handleTimers = function () {
+ if (g.gameplayMode == 0) {
+ g.handleForcePenLeaveTimer();
+ g.handleFruitTimer();
+ g.handleGhostModeTimer()
+ }
+ g.handleGameplayModeTimer()
+ };
+ g.tick = function () {
+ var b = (new Date).getTime();
+ g.lastTimeDelta += b - g.lastTime - g.tickInterval;
+ if (g.lastTimeDelta > 100) g.lastTimeDelta = 100;
+ if (g.canDecreaseFps && g.lastTimeDelta > 50) {
+ g.lastTimeSlownessCount++;
+ g.lastTimeSlownessCount == 20 && g.decreaseFps()
+ }
+ var c = 0;
+ if (g.lastTimeDelta > g.tickInterval) {
+ c = Math.floor(g.lastTimeDelta / g.tickInterval);
+ g.lastTimeDelta -= g.tickInterval * c
+ }
+ g.lastTime = b;
+ if (g.gameplayMode == 13) {
+ for (b = 0; b < g.tickMultiplier + c; b++) {
+ g.advanceCutscene();
+ g.intervalTime = (g.intervalTime + 1) % D;
+ g.globalTime++
+ }
+ g.checkCutscene();
+ g.blinkScoreLabels()
+ } else for (b = 0; b < g.tickMultiplier + c; b++) {
+ g.moveActors();
+ if (g.gameplayMode == 0) if (g.tilesChanged) {
+ g.detectCollisions();
+ g.updateActorTargetPositions()
+ }
+ g.globalTime++;
+ g.intervalTime = (g.intervalTime + 1) % D;
+ g.blinkEnergizers();
+ g.blinkScoreLabels();
+ g.handleTimers()
+ }
+ };
+ g.extraLife = function (b) {
+ g.playSound("extra-life", 0);
+ g.extraLifeAwarded[b] = a;
+ g.lives++;
+ if (g.lives > 5) g.lives = 5;
+ g.updateChromeLives()
+ };
+ g.addToScore = function (b, c) {
+ g.score[c] += b;
+ !g.extraLifeAwarded[c] && g.score[c] > 1E4 && g.extraLife(c);
+ g.updateChromeScore(c)
+ };
+ g.updateChrome = function () {
+ g.updateChromeLevel();
+ g.updateChromeLives();
+ for (var b = 0; b < g.playerCount; b++) g.updateChromeScore(b)
+ };
+ g.updateChromeScore = function (b) {
+ var c = g.score[b].toString();
+ if (c.length > g.scoreDigits) c = c.substr(c.length - g.scoreDigits, g.scoreDigits);
+ for (var d = 0; d < g.scoreDigits; d++) {
+ var f = document.getElementById("pcm-sc-" + (b + 1) + "-" + d),
+ h = c.substr(d, 1);
+ h ? g.changeElementBkPos(f, 8 + 8 * parseInt(h, 10), 144, a) : g.changeElementBkPos(f, 48, 0, a)
+ }
+ };
+ g.updateChromeLives = function () {
+ g.livesEl.innerHTML = "";
+ for (var b = 0; b < g.lives; b++) {
+ var c = document.createElement("div");
+ c.className = "pcm-lif";
+ g.prepareElement(c, 64, 129);
+ g.livesEl.appendChild(c)
+ }
+ };
+ g.updateChromeLevel = function () {
+ g.levelEl.innerHTML = "";
+ for (var b = g.level; b >= Math.max(g.level - 4 + 1, 1); b--) {
+ var c = b >= z.length ? z[z.length - 1].fruit : z[b].fruit,
+ d = document.createElement("div");
+ c = g.getFruitSprite(c);
+ g.prepareElement(d, c[0], c[1]);
+ g.levelEl.appendChild(d)
+ }
+ g.levelEl.style.marginTop = (4 - Math.min(g.level, 4)) * 16 + "px"
+ };
+ g.createChrome = function () {
+ g.canvasEl.innerHTML = "";
+ g.scoreDigits = g.playerCount == 1 ? 10 : 5;
+ g.scoreLabelEl = [];
+ g.scoreLabelEl[0] = document.createElement("div");
+ g.scoreLabelEl[0].id = "pcm-sc-1-l";
+ g.prepareElement(g.scoreLabelEl[0], 160, 56);
+ g.canvasEl.appendChild(g.scoreLabelEl[0]);
+ g.scoreEl = [];
+ g.scoreEl[0] = document.createElement("div");
+ g.scoreEl[0].id = "pcm-sc-1";
+ for (var b = 0; b < g.scoreDigits; b++) {
+ var c = document.createElement("div");
+ c.id = "pcm-sc-1-" + b;
+ c.style.top = b * 8 + "px";
+ c.style.left = 0;
+ c.style.position = "absolute";
+ c.style.width = "8px";
+ c.style.height = "8px";
+ g.prepareElement(c, 48, 0);
+ g.scoreEl[0].appendChild(c)
+ }
+ g.canvasEl.appendChild(g.scoreEl[0]);
+ g.livesEl = document.createElement("div");
+ g.livesEl.id = "pcm-li";
+ g.canvasEl.appendChild(g.livesEl);
+ g.levelEl = document.createElement("div");
+ g.levelEl.id = "pcm-le";
+ g.canvasEl.appendChild(g.levelEl);
+ if (g.playerCount == 2) {
+ g.scoreLabelEl[1] = document.createElement("div");
+ g.scoreLabelEl[1].id = "pcm-sc-2-l";
+ g.prepareElement(g.scoreLabelEl[1], 160, 64);
+ g.canvasEl.appendChild(g.scoreLabelEl[1]);
+ g.scoreEl[1] = document.createElement("div");
+ g.scoreEl[1].id = "pcm-sc-2";
+ for (b = 0; b < g.scoreDigits; b++) {
+ c = document.createElement("div");
+ c.id = "pcm-sc-2-" + b;
+ c.style.top = b * 8 + "px";
+ c.style.left = 0;
+ c.style.position = "absolute";
+ c.style.width = "8px";
+ c.style.height = "8px";
+ g.prepareElement(c, 48, 0);
+ g.scoreEl[1].appendChild(c)
+ }
+ g.canvasEl.appendChild(g.scoreEl[1])
+ }
+ };
+ g.clearDotEatingNow = function () {
+ g.dotEatingNow = [e, e];
+ g.dotEatingNext = [e, e]
+ };
+ g.playSound = function (b, c, d) {
+ if (!(!g.soundAvailable || !g.soundEnabled || g.paused)) {
+ d || g.stopSoundChannel(c);
+ try {
+ g.flashSoundPlayer.playTrack(b, c)
+ } catch (f) {
+ g.soundAvailable = e
+ }
+ }
+ };
+ g.stopSoundChannel = function (b) {
+ if (g.soundAvailable && g.soundEnabled) try {
+ g.flashSoundPlayer.stopChannel(b)
+ } catch (c) {
+ g.soundAvailable = e
+ }
+ };
+ g.stopAllAudio = function () {
+ if (g.soundAvailable && g.soundEnabled) {
+ try {
+ g.flashSoundPlayer.stopAmbientTrack()
+ } catch (b) {
+ g.soundAvailable = e
+ }
+ for (var c = 0; c < 5; c++) g.stopSoundChannel(c)
+ }
+ };
+ g.playDotEatingSound = function (b) {
+ if (g.soundAvailable && g.soundEnabled) if (g.gameplayMode == 0) if (g.dotEatingNow[b]) g.dotEatingNext[b] = a;
+ else {
+ if (b == 0) {
+ var c = g.dotEatingSoundPart[b] == 1 ? "eating-dot-1" : "eating-dot-2";
+ g.playSound(c, 1 + g.dotEatingChannel[b], a);
+ g.dotTimer = window.setInterval(g.repeatDotEatingSoundPacMan, 150)
+ } else {
+ g.playSound("eating-dot-double", 3 + g.dotEatingChannel[b], a);
+ g.dotTimerMs = window.setInterval(g.repeatDotEatingSoundMsPacMan, 150)
+ }
+ g.dotEatingChannel[b] = (g.dotEatingChannel[b] + 1) % 2;
+ g.dotEatingSoundPart[b] =
+ 3 - g.dotEatingSoundPart[b]
+ }
+ };
+ g.repeatDotEatingSound = function (b) {
+ g.dotEatingNow[b] = e;
+ if (g.dotEatingNext[b]) {
+ g.dotEatingNext[b] = e;
+ g.playDotEatingSound(b)
+ }
+ };
+ g.repeatDotEatingSoundPacMan = function () {
+ g.repeatDotEatingSound(0)
+ };
+ g.repeatDotEatingSoundMsPacMan = function () {
+ g.repeatDotEatingSound(1)
+ };
+ g.playAmbientSound = function () {
+ if (g.soundAvailable && g.soundEnabled) {
+ var b = 0;
+ if (g.gameplayMode == 0 || g.gameplayMode == 1) b = g.ghostEyesCount ? "ambient-eyes" : g.mainGhostMode == 4 ? "ambient-fright" : g.dotsEaten > 241 ? "ambient-4" : g.dotsEaten > 207 ? "ambient-3" : g.dotsEaten > 138 ? "ambient-2" : "ambient-1";
+ else if (g.gameplayMode == 13) b = "cutscene";
+ if (b) try {
+ g.flashSoundPlayer.playAmbientTrack(b)
+ } catch (c) {
+ g.soundAvailable = e
+ }
+ }
+ };
+ g.initializeTickTimer = function () {
+ window.clearInterval(g.tickTimer);
+ g.fps = C[g.fpsChoice];
+ g.tickInterval = 1E3 / g.fps;
+ g.tickMultiplier = D / g.fps;
+ g.timing = {};
+ for (var b in w) {
+ var c = !g.soundEnabled && (b == 7 || b == 8) ? 1 : w[b];
+ g.timing[b] = Math.round(c * D)
+ }
+ g.lastTime = (new Date).getTime();
+ g.lastTimeDelta = 0;
+ g.lastTimeSlownessCount = 0;
+ g.tickTimer = window.setInterval(g.tick, g.tickInterval)
+ };
+ g.decreaseFps = function () {
+ if (g.fpsChoice < C.length - 1) {
+ g.fpsChoice++;
+ g.initializeTickTimer();
+ if (g.fpsChoice == C.length - 1) g.canDecreaseFps = e
+ }
+ };
+ g.addCss = function () {
+ var b = "#pcm-c { width: 554px; border-top: 25px solid black; padding-bottom: 25px; height: 136px; position: relative; background: black; outline: 0; overflow: hidden; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}#pcm-c * { position: absolute; overflow: hidden;}#pcm-p,#pcm-cc { left: 45px; width: 464px; height: 136px; z-index: 99; overflow: hidden;}#pcm-p .pcm-d { width: 2px; height: 2px; margin-left: 3px; margin-top: 3px; background: #f8b090; z-index: 100;}#pcm-p .pcm-e { width: 8px; height: 8px; z-index: 101;}#pcm-sc-1 { left: 18px; top: 16px; width: 8px; height: 56px; position: absolute; overflow: hidden;}#pcm-sc-2 { left: 18px; top: 80px; width: 8px; height: 56px; position: absolute; overflow: hidden;}#pcm-le { position: absolute; left: 515px; top: 74px; height: 64px; width: 32px;} #pcm-le div { position: relative;}#pcm-sc-1-l { left: -2px; top: 0; width: 48px; height: 8px;}#pcm-sc-2-l { left: -2px; top: 64px; width: 48px; height: 8px;}#pcm-so { left: 7px; top: 116px; width: 12px; height: 12px; border: 8px solid black; cursor: pointer;}#pcm-li { position: absolute; left: 523px; top: 0; height: 80px; width: 16px;}#pcm-li .pcm-lif { position: relative; width: 16px; height: 12px; margin-bottom: 3px;}#pcm-p.blk .pcm-e { visibility: hidden;}#pcm-c .pcm-ac { width: 16px; height: 16px; margin-left: -4px; margin-top: -4px; z-index: 110;}#pcm-c .pcm-n { z-index: 111;}#pcm-c #pcm-stck { z-index: 109;}#pcm-c #pcm-gbug { width: 32px;}#pcm-c #pcm-bpcm { width: 32px; height: 32px; margin-left: -20px; margin-top: -20px;}#pcm-f,#pcm-le div { width: 32px; height: 16px; z-index: 105;}#pcm-f { margin-left: -8px; margin-top: -4px;}#pcm-do { width: 19px; height: 2px; left: 279px; top: 46px; overflow: hidden; position: absolute; background: #ffaaa5;}#pcm-re { width: 48px; height: 8px; z-index: 120; left: 264px; top: 80px;}#pcm-go { width: 80px; height: 8px; z-index: 120; left: 248px; top: 80px;}";
+ g.styleElement =
+ document.createElement("style");
+ g.styleElement.type = "text/css";
+ if (g.styleElement.styleSheet) g.styleElement.styleSheet.cssText = b;
+ else g.styleElement.appendChild(document.createTextNode(b));
+ document.getElementsByTagName("head")[0].appendChild(g.styleElement)
+ };
+ g.createCanvasElement = function () {
+ g.canvasEl = document.createElement("div");
+ g.canvasEl.id = "pcm-c";
+ g.canvasEl.hideFocus = a;
+ document.getElementById("logo").appendChild(g.canvasEl);
+ g.canvasEl.tabIndex = 0;
+ g.canvasEl.focus()
+ };
+ g.everythingIsReady = function () {
+ if (!g.ready) {
+ g.ready = a;
+ var b = document.getElementById("logo-l");
+ google.dom.remove(b);
+ document.getElementById("logo").style.background = "black";
+ g.addCss();
+ g.createCanvasElement();
+ g.speedIntervals = [];
+ g.oppositeDirections = [];
+ g.oppositeDirections[1] = 2;
+ g.oppositeDirections[2] = 1;
+ g.oppositeDirections[4] = 8;
+ g.oppositeDirections[8] = 4;
+ g.addEventListeners();
+ g.fpsChoice = 0;
+ g.canDecreaseFps = a;
+ g.initializeTickTimer();
+ g.newGame()
+ }
+ };
+ g.checkIfEverythingIsReady = function () {
+ if (g.soundReady || g.graphicsReady) g.updateLoadingProgress(0.67);
+ if (g.soundReady && g.graphicsReady) {
+ g.updateLoadingProgress(1);
+ g.everythingIsReady()
+ }
+ };
+ g.preloadImage = function (b) {
+ var c = new Image,
+ d = google.browser.engine.IE;
+ if (!d) c.onload = g.imageLoaded;
+ c.src = b;
+ d && g.imageLoaded()
+ };
+ g.imageLoaded = function () {
+ g.graphicsReady = a;
+ g.checkIfEverythingIsReady()
+ };
+ g.prepareGraphics = function () {
+ g.graphicsReady = e;
+ g.preloadImage("logos/pacman10-hp-sprite.png")
+ };
+ g.trimString = function (b) {
+ return b.replace(/^[\s\xa0]+|[\s\xa0]+$/g, "")
+ };
+ g.g = function (b, c) {
+ if (b < c) return -1;
+ else if (b > c) return 1;
+ return 0
+ };
+ g.compareVersions = function (b, c) {
+ for (var d = 0, f = g.trimString(String(b)).split("."), h = g.trimString(String(c)).split("."), j = Math.max(f.length, h.length), k = 0; d == 0 && k < j; k++) {
+ var x = f[k] || "",
+ F = h[k] || "",
+ G = new RegExp("(\\d*)(\\D*)", "g"),
+ H = new RegExp("(\\d*)(\\D*)", "g");
+ do {
+ var t = G.exec(x) || ["", "", ""],
+ u = H.exec(F) || ["", "", ""];
+ if (t[0].length == 0 && u[0].length == 0) break;
+ d = t[1].length == 0 ? 0 : parseInt(t[1], 10);
+ var I = u[1].length == 0 ? 0 : parseInt(u[1], 10);
+ d = g.g(d, I) || g.g(t[2].length == 0, u[2].length == 0) || g.g(t[2], u[2])
+ } while (d == 0)
+ }
+ return d
+ };
+ g.getFlashVersion = function (b) {
+ b = b.match(/[\d]+/g);
+ b.length = 3;
+ return b.join(".")
+ };
+ g.detectFlash = function () {
+ var b = e,
+ c = "";
+ if (navigator.plugins && navigator.plugins.length) {
+ var d = navigator.plugins["Shockwave Flash"];
+ if (d) {
+ b = a;
+ if (d.description) c = g.getFlashVersion(d.description)
+ }
+ if (navigator.plugins["Shockwave Flash 2.0"]) {
+ b = a;
+ c = "2.0.0.11"
+ }
+ } else if (navigator.mimeTypes && navigator.mimeTypes.length) {
+ if (b = (d = navigator.mimeTypes["application/x-shockwave-flash"]) && d.enabledPlugin) {
+ c = d.enabledPlugin.description;
+ c = g.getFlashVersion(c)
+ }
+ } else try {
+ d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
+ b = a;
+ c = g.getFlashVersion(d.GetVariable("$version"))
+ } catch (f) {
+ try {
+ d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+ b = a;
+ c = "6.0.21"
+ } catch (h) {
+ try {
+ d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
+ b = a;
+ c = g.getFlashVersion(d.GetVariable("$version"))
+ } catch (j) {}
+ }
+ }
+ g.hasFlash = b;
+ g.flashVersion = c
+ };
+ g.isFlashVersion = function (b) {
+ return g.compareVersions(g.flashVersion, b) >= 0
+ };
+ g.prepareSound = function () {
+ g.soundAvailable = e;
+ g.soundEnabled = e;
+ g.soundReady = e;
+ g.detectFlash();
+ if (!g.hasFlash || !g.isFlashVersion("9.0.0.0")) {
+ g.soundReady = a;
+ g.checkIfEverythingIsReady()
+ } else {
+ g.flashIframe = document.createElement("iframe");
+ g.flashIframe.name = "pm-sound";
+ g.flashIframe.style.position = "absolute";
+ g.flashIframe.style.top = "-150px";
+ g.flashIframe.style.border = 0;
+ g.flashIframe.style.width = "100px";
+ g.flashIframe.style.height = "100px";
+ google.dom.append(g.flashIframe);
+ g.flashIframeDoc = g.flashIframe.contentDocument;
+ if (g.flashIframeDoc == undefined || g.flashIframeDoc == null) g.flashIframeDoc = g.flashIframe.contentWindow.document;
+ g.flashIframeDoc.open();
+ g.flashIframeDoc.write('<html><head></head><body><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="0" height="0" id="pacman-sound-player" type="application/x-shockwave-flash"> <param name="movie" value="logos/swf/pacman10-hp-sound.swf"> <param name="allowScriptAccess" value="always"> <object id="pacman-sound-player-2" type="application/x-shockwave-flash" data="logos/swf/pacman10-hp-sound.swf" width="0" height="0"><param name="allowScriptAccess" value="always"> </object></object></body></html>');
+ g.flashIframeDoc.close();
+ window.setTimeout(g.flashNotReady, 3E3)
+ }
+ };
+ g.flashNotReady = function () {
+ if (!g.ready) {
+ g.soundAvailable = e;
+ g.soundEnabled = e;
+ g.soundReady = a;
+ g.checkIfEverythingIsReady()
+ }
+ };
+ g.flashReady = function (b) {
+ g.flashSoundPlayer = b;
+ g.soundAvailable = a;
+ g.soundEnabled = a;
+ g.soundReady = a;
+ g.checkIfEverythingIsReady()
+ };
+ g.flashLoaded = function () {
+ if (g.flashIframeDoc) {
+ var b = g.flashIframeDoc.getElementById("pacman-sound-player");
+ if (b && b.playTrack) {
+ g.flashReady(b);
+ return
+ } else if ((b = g.flashIframeDoc.getElementById("pacman-sound-player-2")) && b.playTrack) {
+ g.flashReady(b);
+ return
+ }
+ }
+ g.flashNotReady()
+ };
+ g.destroy = function () {
+ if (google.pacman) {
+ g.stopAllAudio();
+ window.clearInterval(g.tickTimer);
+ window.clearInterval(g.dotTimer);
+ window.clearInterval(g.dotTimerMs);
+ google.dom.remove(g.styleElement);
+ google.dom.remove(g.flashIframe);
+ google.dom.remove(g.canvasEl);
+ google.pacman = undefined
+ }
+ };
+ g.exportFunctionCalls = function () {
+ google.pacman = {};
+ google.pacman.insertCoin = g.insertCoin;
+ google.pacman.flashLoaded = g.flashLoaded;
+ google.pacman.destroy = g.destroy
+ };
+ g.updateLoadingProgress = function (b) {
+ b = Math.round(b * 200);
+ document.getElementById("logo-b").style.width = b + "px"
+ };
+ g.init = function () {
+ g.ready = e;
+ document.getElementById("logo").title = "";
+ g.updateLoadingProgress(0.33);
+ g.exportFunctionCalls();
+ g.useCss = navigator.userAgent.indexOf("MSIE 5.") != -1 || navigator.userAgent.indexOf("MSIE 6.") != -1 || navigator.userAgent.indexOf("MSIE 7.") != -1 ? e : a;
+ g.prepareGraphics();
+ g.prepareSound()
+ };
+ g.init();
+}(); \ No newline at end of file
diff --git a/Pacman/logos/pacman10-hp-sprite.png b/Pacman/logos/pacman10-hp-sprite.png
new file mode 100644
index 0000000..8ab4790
--- /dev/null
+++ b/Pacman/logos/pacman10-hp-sprite.png
Binary files differ
diff --git a/Pacman/logos/pacman10-hp.png b/Pacman/logos/pacman10-hp.png
new file mode 100644
index 0000000..ffb5d37
--- /dev/null
+++ b/Pacman/logos/pacman10-hp.png
Binary files differ
diff --git a/Pacman/logos/swf/pacman10-hp-sound.swf b/Pacman/logos/swf/pacman10-hp-sound.swf
new file mode 100644
index 0000000..0786781
--- /dev/null
+++ b/Pacman/logos/swf/pacman10-hp-sound.swf
Binary files differ