	// === Инициализация ===	function init2(i) {		var s = document.createElement('SCRIPT');		s.type = 'text/javascript';		s.src = '/js/data.php?id=' + i;		document.body.appendChild(s);	}	function init(n) {		// === Добавляем точки тюнинга ===		document.links.innerHTML = "";//		alert(typeof(tuningpoints));		var n = tuningpoints.length;//		alert(n);		var UserBrowser=navigator.appName;		if (UserBrowser == 'Microsoft Internet Explorer') {			n--;		}		//alert(n);		//YMapsID.innerHTML = "";		for (var i = 0; i < n; i++) {			if (typeof(tuningpoints[i].point) != 'undefined') {				//map.addOverlay(createOverlay(tuningpoints[i]));			}			//alert(tuningpoints[i].point);		}		//alert('15 of ' + n + ' = ' + tuningpoints[15].point + ' // ' + tuningpoints[15].name);
	}
	function SimpleOverlay (geoPoint, name, link, type) {		var map, _this = this, offset = new YMaps.Point(-10, -29);		this.onAddToMap = function (pMap, parentContainer) {			map = pMap;			parentContainer.appendChild(getElement(type));			this.onMapUpdate();		};
		this.onRemoveFromMap = function () {			if (getElement().parentNode) {				getElement().parentNode.removeChild(getElement());			}		};
		this.onMapUpdate = function () {			var position = map.converter.coordinatesToMapPixels(geoPoint).moveBy(offset);			getElement().style.left = position.x + 'px';			getElement().style.top = position.y + 'px';		};
		this.openBalloon = function () {			link.className = "active";			//getElement().style.display = "none";			map.openBalloon(geoPoint, name, {onClose: function () {				link.className = "el";				//getElement().style.display = "";			}});		};
		function getElement (type) {			if (typeof(type) == 'undefined') {				type = 'shop';			}			var element = document.createElement('div');			element.className = type;			element.onclick = function () {				_this.openBalloon();			}			return (getElement = function () {return element})();		}	}
	function createOverlay (tunobject)  {		var link = document.createElement('a');		//alert(tunobject.point);		var newOverlay = new SimpleOverlay(tunobject.point, tunobject.desc, link, tunobject.type);		link.href = '#';		link.className = 'el';		link.innerHTML = tunobject.name;		link.onclick = function () {			if (link.className == "active") return;			newOverlay.openBalloon();		};		//document.getElementById('links').appendChild(link);		return newOverlay;	}

    function initDD() {		// ========== DropDown Menu for stupid IE :) ========= //		if (document.all&&document.getElementById) {			navRoot = document.getElementById("nav");			for (i=0; i<navRoot.childNodes.length; i++) {				node = navRoot.childNodes[i];				if (node.nodeName=="LI") {					node.onmouseover=function() {						this.className+=" over";					}					node.onmouseout=function() {						this.className=this.className.replace(" over", "");					}				}			}			navRoot2 = document.getElementById("mnu2");			for (i=0; i<navRoot2.childNodes.length; i++) {				node2 = navRoot2.childNodes[i];				if (node2.nodeName=="LI") {					node2.onmouseover=function() {						this.className+=" over";					}					node2.onmouseout=function() {						this.className=this.className.replace(" over", "");					}				}			}		}		// ====================================================== //	}
	window.onload = initDD;
