var timer = new Array(7);function highlightTMenu() {pth = document.location.pathname.toString();
if (pth.search("/^\/masters-consulting/") > -1) document.getElementById("tn1").firstChild.className = "tnact";
else if (pth.search("/^\/beratung/") > -1) document.getElementById("tn2").firstChild.className = "tnact";
else if (pth.search("/^\/ausbildung/") > -1) document.getElementById("tn3").firstChild.className = "tnact";
else if (pth.search("/^\/seminartermine/") > -1) document.getElementById("tn4").firstChild.className = "tnact";
else if (pth.search("/^\/wissen/") > -1) document.getElementById("tn5").firstChild.className = "tnact";
else if (pth.search("/^\/werkzeuge/") > -1) document.getElementById("tn6").firstChild.className = "tnact";
else if (pth.search("/^\/www.masters-consulting.de/kunden/index.php/") > -1) document.getElementById("tn7").firstChild.className = "tnact";

dv = document.getElementById('tn1'); dv.setAttribute("onmouseover", "clearTimer(1);closeAllSn();showSubMenu(1);"); dv.setAttribute("onmouseout", "setSnTimer('1');")
dv = document.getElementById('tn2'); dv.setAttribute("onmouseover", "clearTimer(2);closeAllSn();showSubMenu(2);"); dv.setAttribute("onmouseout", "setSnTimer('2');")
dv = document.getElementById('tn3'); dv.setAttribute("onmouseover", "clearTimer(3);closeAllSn();showSubMenu(3);"); dv.setAttribute("onmouseout", "setSnTimer('3');")
dv = document.getElementById('tn4'); dv.setAttribute("onmouseover", "clearTimer(4);closeAllSn();showSubMenu(4);"); dv.setAttribute("onmouseout", "setSnTimer('4');")
dv = document.getElementById('tn5'); dv.setAttribute("onmouseover", "clearTimer(5);closeAllSn();showSubMenu(5);"); dv.setAttribute("onmouseout", "setSnTimer('5');")
dv = document.getElementById('tn6'); dv.setAttribute("onmouseover", "clearTimer(6);closeAllSn();showSubMenu(6);"); dv.setAttribute("onmouseout", "setSnTimer('6');")
dv = document.getElementById('tn7'); dv.setAttribute("onmouseover", "clearTimer(7);closeAllSn();showSubMenu(7);"); dv.setAttribute("onmouseout", "setSnTimer('7');")
if (!document.getElementById("sn1")) {div = document.createElement("div");div.id='sn1'; div.setAttribute("onmouseover", "clearTimeout(timer[1]);"); div.setAttribute("onmouseout", "setSnTimer('1');"); document.getElementById("body").appendChild(div);addLink(div, "masters-consulting/wer-wir-sind.html", "Wer wir sind");addLink(div, "masters-consulting/unsere-philosophie.html", "Unsere Philosophie");addLink(div, "masters-consulting/unsere-leitsaetze.html", "Unsere Leitsätze");addLink(div, "masters-consulting/warum-masters.html", "Warum MASTERS?");addLink(div, "masters-consulting/portfolio.html", "Portfolio");addLink(div, "masters-consulting/methodik.html", "Methodik");addLink(div, "masters-consulting/mitarbeiter.html", "Mitarbeiter");addLink(div, "masters-consulting/case-studies.html", "Case Studies");addLink(div, "masters-consulting/partner.html", "Partner");addLink(div, "masters-consulting/wir-spenden.html", "Wir spenden");addLink(div, "sonderseiten/menueleiste/kontakt.html", "Kontakt");}
if (!document.getElementById("sn2")) {div = document.createElement("div");div.id='sn2'; div.setAttribute("onmouseover", "clearTimeout(timer[2]);"); div.setAttribute("onmouseout", "setSnTimer('2');"); document.getElementById("body").appendChild(div);addLink(div, "beratung/portfolio.html", "Überblick Beratungsleistungen");addSpan(div);addLink(div, "beratung/istanalyse.html", "Istanalyse");addLink(div, "beratung/prozessdesign.html", "Prozessdesign");addLink(div, "beratung/toolauswahl.html", "Toolauswahl");addLink(div, "beratung/zertifizierung-iso20k-27k.html", "Zertifizierung ISO20000 ISO27000");addSpan(div);addLink(div, "beratung/servicestrategie.html", "Servicestrategie");addLink(div, "beratung/scm.html", "Service Catalogue Management");addLink(div, "beratung/slm.html", "Service Level Management");addLink(div, "beratung/messen-und-berichten.html", "Messen und berichten");addLink(div, "beratung/change-management.html", "Change Management");addLink(div, "beratung/sacm-und-cmdb.html", "SACM und CMDB");addLink(div, "beratung/release-deploy-test.html", "Release and Test");addLink(div, "beratung/anwenderunterstuetzung.html", "Anwenderunterstützung");addLink(div, "beratung/availability-capacity.html", "Availability und Capacity Management");addLink(div, "beratung/csi.html", "CSI");addLink(div, "beratung/ism.html", "ISM");addLink(div, "beratung/itscm.html", "ITSCM");addSpan(div);addLink(div, "produkte/masters-coaching-card.html", "MASTERS coaching card");}
if (!document.getElementById("sn3")) {div = document.createElement("div");div.id='sn3'; div.setAttribute("onmouseover", "clearTimeout(timer[3]);"); div.setAttribute("onmouseout", "setSnTimer('3');"); document.getElementById("body").appendChild(div);addLink(div, "ausbildung/ausbildungsmethodik.html", "Methodik");addLink(div, "ausbildung/inhouse-seminare.html", "Inhouse-Seminare");addLink(div, "seminartermine.html", "Seminartermine");addLink(div, "ausbildung/seminarinhalte-itil.html", "seminarinhalte ITIL");addLink(div, "ausbildung/seminarinhalte-iso-20000.html", "seminarinhalte ISO 20000");addLink(div, "ausbildung/download-portfoliokatalog.html", "download portfoliokatalog");addLink(div, "ausbildung/seminarstandorte.html", "Seminarstandorte");addLink(div, "ausbildung/bestehensquoten-2010.html", "Bestehensquoten 2010");addLink(div, "ausbildung/testimonials.html", "Testimonials");}
if (!document.getElementById("sn5")) {div = document.createElement("div");div.id='sn5'; div.setAttribute("onmouseover", "clearTimeout(timer[5]);"); div.setAttribute("onmouseout", "setSnTimer('5');"); document.getElementById("body").appendChild(div);addLink(div, "wissen/it-service-management/das-neue-itil-v3.html", "Was ist ITIL?");addLink(div, "wissen/literatur.html", "Literatur");addLink(div, "wissen/pruefungsvorbereitung.html", "prüfungsvorbereitung");addLink(div, "http://www.itil-portal.org", "Deutsches ITIL-Portal");addLink(div, "masters-consulting/itil-glossar.html", "ITIL-Glossar");addLink(div, "wissen/itil-update-info-ogc.html", "itil update info OGC");}
if (!document.getElementById("sn6")) {div = document.createElement("div");div.id='sn6'; div.setAttribute("onmouseover", "clearTimeout(timer[6]);"); div.setAttribute("onmouseout", "setSnTimer('6');"); document.getElementById("body").appendChild(div);addLink(div, "werkzeuge/masters-toolbox-for-itsm.html", "MASTERS toolbox for ITSM");addLink(div, "http://www.masters-consulting.de/fileadmin/user_upload/infodateien/Smart_Scan.pdf", "MASTERS smart scan for ITSM");addLink(div, "http://www.masters-consulting.de/fileadmin/user_upload/infodateien/ISO20000_Scan.pdf", "MASTERS ISO 20000 scan for ITSM");}
if (!document.getElementById("sn7")) {div = document.createElement("div");div.id='sn7'; div.setAttribute("onmouseover", "clearTimeout(timer[7]);"); div.setAttribute("onmouseout", "setSnTimer('7');"); document.getElementById("body").appendChild(div);addLink(div, "http://www.masters-consulting.de/kunden/index.php", "übersicht");addLink(div, "http://www.masters-consulting.de/onlineseminare/index.php", "onlineseminare");addLink(div, "http://www.masters-consulting.de/admin/registrieren.php", "registrieren");}
}
function clearTimer(ID) {tim = timer[ID];if (tim) clearTimeout(tim);}
function closeAllSn() {for (c =0; c < 7; c++) {closeSubMenu(c);}}
function showSubMenu(mID) { sn = document.getElementById("sn" + mID);tn = document.getElementById("tn" + mID);  if (tn && sn) {sn.style.visibility = "visible";sn.style.zIndex = "400";otop = tn.offsetTop;olft = tn.offsetLeft;opar = tn.offsetParent;while(opar) {otop += opar.offsetTop;olft += opar.offsetLeft;opar = opar.offsetParent;}sn.style.top = (otop +22) + "px";sn.style.left = olft + "px";}}
function closeSubMenu(mID) {tn = document.getElementById("sn" + mID);if (tn) {tn.style.visibility = "hidden";tn.style.zIndex = "0";}}
function addMouseHandlers(tn, ID) {
tn.setAttribute("onmouseover", "clearTimer('" + ID + "');closeAllSn();showSubMenu('" + ID + "');");
tn.setAttribute("onmouseout", "setSnTimer('" + ID + "');");
}

function setSnTimer(ID) {
  timer[ID] = setTimeout("closeSubMenu('" + ID + "');", 250);}
function addLink(sn, target, caption) {lnk = document.createElement("a");lnk.href= target;lnk.appendChild(document.createTextNode(caption));sn.appendChild(lnk);}
function addSpan(sn) {lnk = document.createElement("span");lnk.appendChild(document.createTextNode(" "));sn.appendChild(lnk);}

