MouseX = 0;
MouseY = 0;
activeTip = 0;
lines = 0;
init_tooltip = 0; 

onload = hidetip; 
onunload = hidetip; 
document.write ('<div id="tooltip" style="position:absolute; top:-100px;left-100px">&nbsp;</div>'); 

function MousePosition(e) {

	if (init_tooltip == 0) return;

	if (document.all) {
		MouseX=event.x + document.body.scrollLeft;
		MouseY=event.y + document.body.scrollTop;
	}	else {
		MouseX=e.pageX;
		MouseY=e.pageY;
	}

	with (document.getElementById ('tooltip')) {
		style.top = MouseY +  10  - getBoxHeight() + 'px';
		style.left = MouseX +  10 + 'px';
	}
}


function getBoxHeight () {
	// line-height + padding-top + padding-bottom
	for (i=0,h=0; i < lines; i++)
	h += 12;
	return (h + 6);
}


function showtip (which) {

// alert(which); 

	if (init_tooltip == 0) {
		document.onmousemove = MousePosition;
		document.onmouseout = hidetip;

		t = Array();
		t[1] = 'Suchbeispiele:<br />- Lenovo T61<br />- Acer Travelmate<br />- Mac Book<br />- Dell 2GB Poweredge 1850';
		t[2] = 'Lieferzeit 1-2 Werktage!';
		t[3] = 'Klicken Sie hier, wenn Sie dieses Upgrade bestellen möchten oder<br />ein individuelles Angebot von uns wünschen.';
		t[4] = 'Sofort bestellen<br />Nur mit Login m&ouml;glich!';
		t[5] = 'Projektangebot anfordern<br />Frage zum Produkt<br />Aktuelle Preise finden Sie stets online';
		t[6] = 'Am einfachsten und sichersten ist, sie wählen das Upgrade mit der höchsten Taktfrequenz.<br />Genaueres erfahren Sie wenn Sie diesem Link folgen';
		l = Array();
		l[1] = 1;
		l[2] = 0;
		l[3] = 0;
		l[4] = 0;
		l[5] = 0;
		l[6] = 0;

		lines = l[which];
		with (document.getElementById ('tooltip')) {

			style.display = "inline";
			innerHTML = t[which];

			if (which!=1) {
				style.width = "auto";
				style.whiteSpace  = "nowrap";
			}
		}
	}
	activeTip = 1;
	init_tooltip = 1;
}

function hidetip () {
	init_tooltip=0;
	if (activeTip == 1) {
		document.getElementById('tooltip').style.display = "none";
		activeTip = 0;
		document.onmousemove = null;
		document.onmouseout = null;
	}
}

function showfixedtip (which, elmname) {

	if (init_tooltip == 0) {
		t = Array();
		t[1] = 'Suchbeispiele:<br />- Lenovo T61<br />- Acer Travelmate<br />- Mac Book<br />- Dell 2GB Poweredge 1850';
		l = Array();
		l[1] = 1;

		lines = l[which];

		poselm = document.getElementById (elmname);
		
		with (document.getElementById ('tooltip')) {

			style.top =  ttGetOffsetTop(poselm) + 20 +  'px';
			style.left = ttGetOffsetLeft(poselm) + 'px';
			style.display = "inline";
			innerHTML = t[which];

			if (which!=1) {
				style.width = "auto";
				style.whiteSpace  = "nowrap";
			}
		}
	}
	activeTip = 1;
	init_tooltip = 1;
}

function ttGetOffsetTop(oElement) {
	var iResult= oElement.offsetTop;
	while (oElement.offsetParent) {
		oElement = oElement.offsetParent; iResult += oElement.offsetTop;
	}
	return iResult;
}

function ttGetOffsetLeft(oElement) {
	var iResult= oElement.offsetLeft;
	while (oElement.offsetParent) {
		oElement = oElement.offsetParent;iResult += oElement.offsetLeft;
	}
	return iResult;
}
