var m_tooltip = null;

// setup event handler for tooltip on mouse position
document.onmousemove = msh_update_tooltip;

function msh_update_tooltip(e) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (m_tooltip != null) {
		m_tooltip.style.left = (x + 15) + "px";
		m_tooltip.style.top 	= (y + 15) + "px";
	}
};

function msh_show_tooltip(id) {
	m_tooltip = document.getElementById(id);
	m_tooltip.style.display = "block"
};

function msh_hide_tooltip() {
	m_tooltip.style.display = "none";
};

function msh_create_tooltip(id,text)
{
	document.write('<div style="position:absolute; display:none; background-color:#FFFFFF;" id="'+id+'">');
	document.write(text);
	document.write('</div>');	
};

function msh_set_tooltip_style(id, backgroundColor, textColor, borderWidth, borderStyle, borderColor, padding, width)
{
	if ( document.getElementById(id) ) {
		var obj = document.getElementById(id);
				obj.style.backgroundColor = backgroundColor;
				obj.style.color 					= textColor;
				obj.style.borderWidth 		= borderWidth;
				obj.style.borderStyle 		= borderStyle;
				obj.style.borderColor 		= borderColor;
				obj.style.padding			 		= padding;
				obj.style.width			 			= width;
	}
};

function msh_update_tooltip_text(id,text)
{
	try { document.getElementById(id).innerHTML = text; } catch(e) { } finally { };
};


function einblenden( zielId ){
if (document.getElementById){
ziel = document.getElementById( zielId );
if (ziel.style.display == "none"){
ziel.style.display = "";
}
}
}  
function ausblenden( zielId ){
if (document.getElementById){
ziel = document.getElementById( zielId );
if (ziel.style.display == ""){
ziel.style.display = "none";
}
}
}  