jQuery.noConflict();

var startList = function() {
  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", "");
        }
      }
    }
  }
}
window.onload=startList;

function hintGetPos(src, was)
{
    var val;
    var elem;
    if (was == "Left")
    {
        val = src.offsetWidth;
    }
    if (was == "Top")
    {
        val = src.offsetHeight;
    }
    elem = src; //.offsetParent;
    while (elem != null)
    {
        val += elem["offset"+was];
        elem = elem.offsetParent;
    }
    return val;
}

function hintGetElement() {
    return document.getElementById("hintDiv");
}
function hintShow(show) {
    hintGetElement().style.visibility = show ? "visible" : "hidden";
}

var hintTimeoutId = false;
function hintMe(src, hintId)
{
    var box = hintGetElement();
    var cap = hints_cap[hintId];
    var text = hints_text[hintId];

    if (hintTimeoutId != false) {
        window.clearTimeout(hintTimeoutId);
        hintTimeoutId = false;
    }

    box.innerHTML = "<div class=hintTitle>" + cap + "</div><div class=hintText>" + text + "</div><div class=hintFooter>&nbsp;</div>";
    var v;
    v = hintGetPos(src,"Left") + 2; // 2px space between image and box
		if ((v+300)>window.innerWidth) {
			// 300px fensterbreite
			box.style.left = (v-300) + "px";
		} else {
			box.style.left = v + "px";
		}
    //box.style.left = v + "px";
    v = hintGetPos(src,"Top") - 11;    // img height
    box.style.top = v + "px";
    hintShow(true);
}
function hintZap()
{
    hintTimeoutId = window.setTimeout("hintShow(false)", 300);
}
