LibManager.require("frame.scriptaculous.effects"); function MapLoader(a, c, b, d, e) { this.map = a; this.statusElement = c; this.bar = d; this.fill = e; this.textElement = b } MapLoader.prototype.map = null; MapLoader.prototype.statusElement = null; MapLoader.prototype.textElement = null; MapLoader.prototype.bar = null; MapLoader.prototype.fill = null; MapLoader.prototype.hideMe = true;
MapLoader.prototype.show = function(a, c, b) { b ? this.statusElement.hide() : this.statusElement.show(); this.statusElement.style.height = "auto"; this.textElement.innerHTML = a; c ? this.bar.show() : this.bar.hide(); this.hideMe = c; b && Effect.Appear(this.statusElement, { duration: 0.25, from: 0, to: 0.9 }); if (Element.getDimensions(this.statusElement).height > 490) this.statusElement.style.height = "490px" }; MapLoader.prototype.hide = function(a) { this.fill.style.width = "1px"; a && this.statusElement.hide(); this.map.enableDragging() };
MapLoader.prototype.queue = null; MapLoader.prototype.add = function(a, c, b) { if (!this.queue) this.queue = []; this.queue[this.queue.length] = function() { a.f = c; a.f(b); b = null; a = a.f = null } }; MapLoader.prototype.queueCounter = 0;
MapLoader.prototype.execute = function() {
    if (isBrowser("netscape")) { $("mapSidebar").style.overflow = "hidden"; $("mapLoading").style.overflow = "hidden" } this.fill.style.width = this.queueCounter > 0 && this.queue ? 100 * this.queueCounter / this.queue.length + "%" : "1px"; for (var a = this.queueCounter + 5; this.queue && this.queueCounter < this.queue.length && this.queueCounter < a; ) { this.queue[this.queueCounter](); this.queue[this.queueCounter++] = null } if (this.queue && this.queueCounter < this.queue.length) setTimeout(this.execute.bind(this),
20); else { for (a = 0; this.queue && a < this.queue.length; a++) this.queue[a] = null; this.queue = null; this.queueCounter = 0; this.hide(this.hideMe); if (isBrowser("netscape")) { $("mapSidebar").style.overflow = "auto"; $("mapLoading").style.overflow = "auto" } } 
}; MapLoader.prototype.cancel = function() { for (var a = 0; this.queue && a < this.queue.length; a++) this.queue[a] = null; this.queue = null; this.queueCounter = 0; this.hide() };