/* ab hier validierung von felix */
function show_tooltip(id, text) {
	var element = $(id);
	var offset = element.cumulativeOffset();

	var windowOffset = document.viewport.getHeight();

	var hint = '<div class="h" style="top:-800px;left:' + (offset[0] - 22) + 'px"><div class="head">&nbsp;</div><div class="body">' + text + '</div><div class="foot">&nbsp;</div></div>';


	new Insertion.Bottom('body', hint)
	var new_height = $$('div.h')[0].getHeight() - $$('div.h')[0].getHeight() - 14;

	$$('.h')[0].setStyle({
		'top':  offset[1] - (new_height) + 'px'
	});

}

function hide_tooltip() {
	$$('div.h')[0].remove();
}


/* für den kalender */
function show_tooltip_event(id, title, text) {
	var element = $(id);
	var offset = element.cumulativeOffset();

	var windowOffset = document.viewport.getHeight();

	var hint = '<div class="h-event" style="top:-800px;left:' + (offset[0] - 215) + 'px"><div class="head"><br /><span>' + title + '</span></div><div class="body">' + text + '</div><div class="foot">&nbsp;</div></div>';


	new Insertion.Bottom('body', hint)
	var new_height = $$('div.h-event')[0].getHeight() - $$('div.h-event')[0].getHeight() - 5;

	$$('.h-event')[0].setStyle({
		'top':  offset[1] - (new_height) + 'px'
	});

}

function hide_tooltip_event() {
	$$('div.h-event')[0].remove();
}