var GMapKitMapControls3d = function () {this.sliderStep = 9;this.imgSrc = "http://maps.google.com/intl/en_ALL/mapfiles/mapcontrols3d.png";};
GMapKitMapControls3d.prototype = new GLargeMapControl;
GMapKitMapControls3d.prototype._1 = null;
GMapKitMapControls3d.prototype._6 = null;
GMapKitMapControls3d.prototype._2 = null;
GMapKitMapControls3d.prototype.initialize = function (map) {GMapKitMapControls3d.prototype._1 = map;new GKeyboardHandler(map);var agt = navigator.userAgent.toLowerCase();var isIE = 0;var _0 = new Array;if (agt.indexOf("msie") != -1) {isIE = 1;}var commonImg = new Image;commonImg.src = this.imgSrc;var currentMapType = map.getCurrentMapType();var minZoom = parseInt(currentMapType.getMinimumResolution());var maxZoom = 0;var maptypes = map.getMapTypes();for (var i = 0; i < maptypes.length; i++) {if (maptypes[i].getMaximumResolution() > maxZoom) {maxZoom = maptypes[i].getMaximumResolution();}}GMapKitMapControls3d.prototype._4 = parseInt(maxZoom);GMapKitMapControls3d.prototype._3 = this.sliderStep;var ctrlHeight = (91) + (maxZoom - minZoom + 1) * this.sliderStep + 5;var container = document.createElement("div");with (container.style) {width = "59px";height = (ctrlHeight + this.sliderStep + 2) + "px";overflow = "hidden";padding = "0";MozUserSelect = "none";textAlign = "left";}_0.container = container;GMapKitMapControls3d.prototype._6 = container;var imgContainer = document.createElement("div");with (imgContainer.style) {width = "59px";height = "62px";overflow = "hidden";if (isIE) {filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.imgSrc + "')";}}container.appendChild(imgContainer);if (!isIE) {var baseImg = commonImg.cloneNode(false);with (baseImg.style) {position = "absolute";left = "0px";top = "0px";width = "59px";height = "458px";}imgContainer.appendChild(baseImg);}var topBtn = document.createElement("div");with (topBtn.style) {position = "absolute";left = "20px";top = "0px";width = "18px";height = "18px";cursor = "pointer";overflow = "hidden";}topBtn.title = "up";container.appendChild(topBtn);var leftBtn = topBtn.cloneNode(true);with (leftBtn.style) {left = "0px";top = "20px";}leftBtn.title = "left";container.appendChild(leftBtn);var rightBtn = topBtn.cloneNode(true);with (rightBtn.style) {left = "40px";top = "20px";}rightBtn.title = "right";container.appendChild(rightBtn);var bottomBtn = topBtn.cloneNode(true);with (bottomBtn.style) {left = "20px";top = "40px";}bottomBtn.title = "bottom";container.appendChild(bottomBtn);var homeBtn = topBtn.cloneNode(true);with (homeBtn.style) {left = "20px";top = "20px";}homeBtn.title = "home position";container.appendChild(homeBtn);_0.topBtn = topBtn;_0.leftBtn = leftBtn;_0.rightBtn = rightBtn;_0.bottomBtn = bottomBtn;_0.homeBtn = homeBtn;var zoomSlideBarContainer = document.createElement("div");with (zoomSlideBarContainer.style) {position = "absolute";left = "19px";top = "86px";width = "22px";height = ((maxZoom - minZoom + 1) * this.sliderStep) + "px";overflow = "hidden";cursor = "pointer";}container.appendChild(zoomSlideBarContainer);_0.slideBar = zoomSlideBarContainer;var zoomLevel = map.getZoom();var zoomSliderContainer = document.createElement("div");with (zoomSliderContainer.style) {position = "absolute";left = 0;top = ((maxZoom - zoomLevel) * this.sliderStep + 1) + "px";width = "22px";height = "14px";overflow = "hidden";cursor = "url(http://maps.google.com/intl/en_ALL/mapfiles/openhand.cur), default";}zoomSlideBarContainer.appendChild(zoomSliderContainer);_0.slideBarContainer = zoomSliderContainer;if (isIE) {var zoomSliderBtnImg = document.createElement("div");with (zoomSliderBtnImg.style) {position = "relative";left = 0;top = "-384px";width = "22px";height = "14px";overflow = "hidden";filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.imgSrc + "')";}zoomSliderContainer.appendChild(zoomSliderBtnImg);_0.zoomSlider = zoomSliderBtnImg;} else {var slideImg = commonImg.cloneNode(false);with (slideImg.style) {position = "absolute";left = "0px";top = "-384px";MozUserSelect = "none";border = "0px none";margin = "0px";padding = "0px";width = "59px";height = "458px";}zoomSliderContainer.appendChild(slideImg);_0.zoomSlider = slideImg;}var zoomOutBtnContainer = document.createElement("div");with (zoomOutBtnContainer.style) {position = "absolute";left = 0;top = (86 + (maxZoom - minZoom + 1) * this.sliderStep) + "px";width = "59px";height = "23px";overflow = "hidden";}container.appendChild(zoomOutBtnContainer);if (isIE) {var zoomOutBtnImg = document.createElement("div");with (zoomOutBtnImg.style) {position = "relative";left = 0;top = "-360px";width = "59px";height = "23px";overflow = "hidden";filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.imgSrc + "')";}zoomOutBtnContainer.appendChild(zoomOutBtnImg);} else {var btnImg = commonImg.cloneNode(false);with (btnImg.style) {position = "absolute";left = "0px";top = "-360px";width = "59px";height = "458px";}zoomOutBtnContainer.appendChild(btnImg);}var zoomOutBtn = document.createElement("div");with (zoomOutBtn.style) {position = "absolute";left = "20px";top = (91 + (maxZoom - minZoom + 1) * this.sliderStep) + "px";width = "18px";height = "23px";cursor = "pointer";overflow = "hidden";}zoomOutBtn.title = "zoom out";container.appendChild(zoomOutBtn);_0.zoomOutBtn = zoomOutBtn;var zoomInBtn = document.createElement("div");with (zoomInBtn.style) {position = "absolute";left = "20px";top = "65px";width = "18px";height = "23px";cursor = "pointer";overflow = "hidden";}zoomInBtn.title = "zoom in";container.appendChild(zoomInBtn);_0.zoomInBtn = zoomInBtn;GEvent.addDomListener(_0.topBtn, "click", this._16);GEvent.addDomListener(_0.leftBtn, "click", this._15);GEvent.addDomListener(_0.rightBtn, "click", this._14);GEvent.addDomListener(_0.bottomBtn, "click", this._13);GEvent.addDomListener(_0.homeBtn, "click", this._7);GEvent.addDomListener(_0.zoomOutBtn, "click", this._12);GEvent.addDomListener(_0.zoomInBtn, "click", this._11);GEvent.addDomListener(_0.slideBar, "click", this._10);GEvent.addListener(map, "zoomend", this._5);var drgOpt = {container: _0.slideBar};var drgCtrl = new GDraggableObject(_0.slideBarContainer, drgOpt);GEvent.addDomListener(drgCtrl, "dragend", this._8);GMapKitMapControls3d.prototype._2 = drgCtrl;this._5(map.getZoom(), map.getZoom());map.getContainer().appendChild(container);return container;};
GMapKitMapControls3d.prototype._16 = function () {GMapKitMapControls3d.prototype._1.panDirection(0, 1);};
GMapKitMapControls3d.prototype._15 = function () {GMapKitMapControls3d.prototype._1.panDirection(1, 0);};
GMapKitMapControls3d.prototype._14 = function () {GMapKitMapControls3d.prototype._1.panDirection(-1, 0);};
GMapKitMapControls3d.prototype._13 = function () {GMapKitMapControls3d.prototype._1.panDirection(0, -1);};
GMapKitMapControls3d.prototype._12 = function () {GMapKitMapControls3d.prototype._1.zoomOut();};
GMapKitMapControls3d.prototype._11 = function () {GMapKitMapControls3d.prototype._1.zoomIn();};
GMapKitMapControls3d.prototype._10 = function (e) {var map = GMapKitMapControls3d.prototype._1;var mouseY = e.clientY;var slideStep = GMapKitMapControls3d.prototype._3;var maxZoom = GMapKitMapControls3d.prototype._4;var container = GMapKitMapControls3d.prototype._6;var ctrlPos = GMapKitMapControls3d.prototype._9(container);mouseY -= (ctrlPos.y + 91);var zoomLevel = Math.floor(maxZoom - mouseY / slideStep);zoomLevel = zoomLevel < 0 ? 0 : zoomLevel;map.setZoom(zoomLevel);};
GMapKitMapControls3d.prototype._9 = function (that) {var agt = navigator.userAgent.toLowerCase();var is_ie = agt.indexOf("msie") != -1 && agt.indexOf("opera") == -1;var is_gecko = agt.indexOf("gecko") != -1;var is_opera = agt.indexOf("opera") != -1;var targetEle = that;var pos = new function () {this.x = 0;this.y = 0;};while (targetEle) {pos.x += targetEle.offsetLeft;pos.y += targetEle.offsetTop;targetEle = targetEle.offsetParent;if (targetEle && is_ie) {pos.x += (parseInt(GMapKitMapControls3d.prototype.getElementStyle(targetEle, "borderLeftWidth", "border-left-width")) || 0);pos.y += (parseInt(GMapKitMapControls3d.prototype.getElementStyle(targetEle, "borderTopWidth", "border-top-width")) || 0);}}if (is_gecko) {var bd = document.getElementsByTagName("BODY")[0];pos.x += 2 * (parseInt(GMapKitMapControls3d.prototype.getElementStyle(bd, "borderLeftWidth", "border-left-width")) || 0);pos.y += 2 * (parseInt(GMapKitMapControls3d.prototype.getElementStyle(bd, "borderTopWidth", "border-top-width")) || 0);}return pos;};
GMapKitMapControls3d.prototype.getElementStyle = function (targetElm, IEStyleProp, CSSStyleProp) {var elem = targetElm;if (elem.currentStyle) {return elem.currentStyle[IEStyleProp];} else if (window.getComputedStyle) {var compStyle = window.getComputedStyle(elem, "");return compStyle.getPropertyValue(CSSStyleProp);}};
GMapKitMapControls3d.prototype.stopDefaultAndPropagation = function (e) {if (e.stopPropagation) {e.stopPropagation();}if (window.event) {window.event.cancelBubble = true;}if (e.preventDefault) {e.preventDefault();}if (window.event) {window.event.returnValue = false;}};
GMapKitMapControls3d.prototype._8 = function (e) {var maxZoom = GMapKitMapControls3d.prototype._4;var mouseY = GMapKitMapControls3d.prototype._2.top;var step = GMapKitMapControls3d.prototype._3;var zoomLevel = Math.floor(maxZoom - mouseY / step);zoomLevel = zoomLevel < 0 ? 0 : zoomLevel;GMapKitMapControls3d.prototype._1.setZoom(zoomLevel);};
GMapKitMapControls3d.prototype._7 = function () {GMapKitMapControls3d.prototype._1.returnToSavedPosition();};
GMapKitMapControls3d.prototype._5 = function (oldZoom, newZoom) {var maxZoom = GMapKitMapControls3d.prototype._4;var step = GMapKitMapControls3d.prototype._3;GMapKitMapControls3d.prototype._2.moveTo(new GPoint(0, (maxZoom - newZoom) * step));};
GMapKitMapControls3d.prototype.getDefaultPosition = function () {return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(10, 10));};
GMapKitMapControls3d.prototype.selectable = function () {return false;};
GMapKitMapControls3d.prototype.printable = function () {return true;};

