/* 3 kb   aktuell: http://webmatze.de/webdesign/javascript/tooltips.htm
   16 kb  funktioniert derzeit nicht: http://www.walterzorn.de/tooltip/tooltip.htm#docu
   - ist aber browserübergreifend aufgebaut 16 kb
*/
// id .. muss als div-container im angezeigten Bereich gesetzt werden
// onmousemove .. überwacht die mausbewegung
// updateWWTT(e) setzt die aktuelle mausposition
wmtt = null;
idADMIN="";
i_vorschau=0;
function updateWMTT(e) {

	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (wmtt != null) {
                if (idADMIN=="kataloghelp"||idADMIN=="produkttext"||idADMIN=="vorschau_sublinks"||idADMIN=="PDF"){
                    if (idADMIN=="kataloghelp"){
                      wmtt.style.left = (x - 200) + "px";
		      wmtt.style.top  = (y - 20) + "px";
		    }
		    if (idADMIN=="produkttext"){    //Bestellungs-System
                      wmtt.style.left = (x + -300) + "px";
		      wmtt.style.top  = (y - 200) + "px";
		    }
		    if (idADMIN=="vorschau_sublinks"){
                      wmtt.style.left = (x + -40) + "px";
		      wmtt.style.top  = (y - 20) + "px";
                      if (navigator.userAgent.indexOf("Firefox") > 0){
                         wmtt.style.left = (x + -100) + "px";
		         wmtt.style.top  = (y - 175) + "px";
                      }
		    }
		    if (idADMIN=="PDF"){
                      wmtt.style.left = (x + 250) + "px";
                      y = 2;  //fixpostion   270
		      wmtt.style.top  = y + "px";
                      if (navigator.userAgent.indexOf("Firefox") > 0){
                         wmtt.style.left = (x + 250) + "px";
                         y = 12;
		         wmtt.style.top  = y  + "px";
                      }
		    }
                }
                else{
  	          wmtt.style.left = (x - 400) + "px";
		  wmtt.style.top  = (y + 20) + "px";
		}
	}
}
function showWMTT(admin,id,content) {
        idADMIN = admin;
        //alert(admin+"--"+id+"--"+content);
        if (idADMIN=="vorschau_sublinks") {
            i_vorschau = content;
            content = info_tab[i_vorschau];
        }
        document.onmousemove = updateWMTT; //mauszeiger dynamisch positionieren
	wmtt = document.getElementById(id);
        wmtt.innerHTML = content;
	wmtt.style.display = "block"
}

function hideWMTT() {
	wmtt.style.display = "none";
}