// JavaScript Document

startList1 = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav1");
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", "");
   }
   }
  }
 }
}

startList2 = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav2");
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", "");
   }
   }
  }
 }
}

startList = function() { startList1(); startList2(); }

window.onload=startList;



function show_tooltip(id){
    var elm = document.getElementById(id);
    if (elm) {
        for (i=1; i<7; i++) {
            var el = document.getElementById('t'+i);
            if (el) {el.style.display = "none";}
        }
        elm.style.display = "block";
    }
}

function hide_tooltip(id){
    var elm = document.getElementById(id);
    if(elm) {elm.style.display = "none";}
}

function showMap() {
    var map = new YMaps.Map(document.getElementById("YMapsID"));
    map.setCenter(new YMaps.GeoPoint(83, 55), 3);
    map.enableScrollZoom();
    
    var ml = new YMaps.YMapsML("http://www.zdi-m.ru/address.xml");
    map.addOverlay(ml);

    map.addControl(new YMaps.TypeControl());
    map.addControl(new YMaps.ToolBar());
    map.addControl(new YMaps.Zoom());
    map.addControl(new YMaps.ScaleLine());
    
    YMaps.Events.observe(ml, ml.Events.Fault, function (ml, error) {
        alert("Îøèáêà: " + error);
    });
}
