function init() {
		if (window.event) {
   		if (document.captureEvents){
				document.captureEvents(Event.MOUSEMOVE);
			} else {
				window.captureEvents(Event.MOUSEMOVE);
			}
		}
		document.onmousemove = getXY;
}

init();

var mousex = 100;
var mousey = 100;
var offY = 250;
var div;

function getXY(e) {
    if(!e) e = window.event;
    var body = (window.document.compatMode && window.document.compatMode == "CSS1Compat") ?
    window.document.documentElement : window.document.body || null;
    
    mousey = offY + 20 +(e.pageY ? e.pageY : e.clientY + body.scrollTop);
    mousex = -125 + (e.pageX ? e.pageX : e.clientX + body.scrollLeft);
    //mousey = e.clientY;
	if(div != null) {    	
    	div.style.left = mousex+'px';
		div.style.top = mousey+'px';
    }
    
}

function showInfo(desc,f){
	
	//div = window.document.getElementById('event_nfo');
	div = parent.document.createElement('div');
	div.setAttribute('id','evt_nfo');
	parent.document.body.appendChild(div);
	offY = 250+(f*153);
	if(div != null) {
		div.innerHTML = buildInfo(desc);
		div.style.position = 'absolute';
		div.style.padding = '5px';
		div.style.left = mousex+'px';
		div.style.top = mousey+'px';
		div.style.visibility = 'visible';
		div.style.width= '250px';
		div.style.zIndex= '250'; 
		div.style.border= '2px solid #336699';
		div.style.backgroundColor = '#FFFFFF';
	}
}

function hideInfo(){
	//div = window.document.getElementById('event_nfo');
	//div = document.getElementById('evt_nfo');
	if(div != null) {
		div.style.visibility = 'hidden';
		parent.document.body.removeChild(div);
		div = null;
	}
}

function buildInfo(desc) {
	var template = "<table cellspacing='1' cellpadding='4' width='100%' border='0' style='border: solid 1px #336699;'>";
	
	template += "<tr>\n";
	template += "<td align='center'>";
	var title = window.document.getElementById('event_desc_'+desc+'_t');
	if(title) {
		template += title.innerHTML;
	} else {
		template += "&nbsp";
	}
	template += "</td>\n";
	template += "</tr>\n";
	template += "<tr>\n";
	var nfo = window.document.getElementById('event_desc_'+desc+'_b');
	var beschr = ""; 
	if(nfo) {
		beschr = nfo.innerHTML;
  	}
  	template += "<td align='left' valign='top'>"+beschr+"</td></tr>\n";
	template += "</table>";
	
	return template;
	
}

