function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		} // wend
	} // endif
	return [curleft, curtop];
} // end func.
// ****************************************************************************************************************************************
function getMouseCoordinates(event) {
	var ev = event || window.event;
	return [ev.pageX, ev.pageY];
} // end func.
function initProgramma() {
	var lpTips = document.getElementsByTagName("DIV");
	for (var k = 0; k < lpTips.length; k++) {
		if (lpTips[k].className) {
			if (lpTips[k].className == "prgtip") {
				lpTips[k].style.display = "none";
				if (lpTips[k].parentNode) {
					lpTips[k].id = "prgchild" + (k + 1);
					var lpPar = lpTips[k].parentNode;
					lpPar.setAttribute('id',  "prgparen" + (k + 1));
					var lpLnks = document.getElementsByTagName("SPAN");
					for (var l = 0; l < lpLnks.length; l++) {
						if (lpLnks[l].className) {
							if (lpLnks[l].className == "prgk") {
								if (lpLnks[l].parentNode) {
									if (lpLnks[l].parentNode.id) {
										if (lpLnks[l].parentNode.id == "prgparen" + (k + 1)) {
											lpLnks[l].href = "";
											lpLnks[l].style.textDecoration = "none";
											lpLnks[l].style.color = "black";
											var pos = findPos(lpLnks[l]);
											lpTips[k].style.left = (pos[0] - 70) + "px";
											lpTips[k].style.top  = (pos[1] - 20) + "px";
											lpTips[k].onmouseout = function (e) {
												if (!e) { d = window.event.srcElement; } else { d = e.target; } // endif
												if (!d) return;
												if (d.className) {
													if (d.className == "sticky") {
														return;
													} // endif
												} // endif
												d.style.display = "none";
												for (var i = 1; i < 10; i++) {
													if (document.getElementById("prgtipsh" + i)) document.getElementById("prgtipsh" + i).style.display = "none";
												} // next
											}; // end func.
											lpPar.style.background = '#ffffff';
											if (lpPar.parentNode) {
												if (lpPar.parentNode.className) {
													if (lpPar.parentNode.className.toLowerCase().indexOf("incellhigh") != -1) {
														lpPar.style.background = '#e0e0e0';
													} // endif
												} // endif
											} // endif
											lpPar.style.cursor = "pointer";
											lpPar.onmouseover = function (e) {
												if (!e) { d = window.event.srcElement; } else { d = e.target; } // endif
												if (!d) return;
												var myid = 0;
												if (!d.id) return;
												myid = parseInt(d.id.substring(8));
												if (myid < 1) return;
												hideProgramma("-");
												document.getElementById("prgchild" + myid).style.display = "";
												if (document.getElementById('prgtipsh1')) {
													var pxs  = findPos(document.getElementById("prgchild" + myid));
													var lmax = 7; lfact = 1; lstep = 1;
													for (var i = 1; i < lmax; i = i + lstep) {
														document.getElementById('prgtipsh' + i).style.left = (pxs[0] + (lmax - i * lfact)) + "px";
														document.getElementById('prgtipsh' + i).style.top = (pxs[1] + (lmax - i * lfact)) + "px";
														document.getElementById('prgtipsh' + i).style.display = "";
														document.getElementById('prgtipsh' + i).style.zIndex  = 1100 + i;
														document.getElementById('prgtipsh' + i).style.height  = (parseInt(document.getElementById("prgchild" + myid).offsetHeight) + 0) + "px";
														document.getElementById('prgtipsh' + i).style.width   = (parseInt(document.getElementById("prgchild" + myid).offsetWidth)  + 0) + "px";
														document.getElementById('prgtipsh' + i).style.display = "";
														if (lstep == 1 && i / 2 == Math.round(i / 2)) {
															document.getElementById('prgtipsh' + i).style.opacity = 0.05;
															document.getElementById('prgtipsh' + i).style.filter  = "alpha(opacity=5)";
														} // endif
													} // next
													document.getElementById("prgchild" + myid).style.zIndex  = 1110;
												} // endif
											}; // end func.
										} // endif
									} // endif
								} // endif
							} // endif
						} // endif
					} // next
/*
					var lPos = findPos(lpPar);
					if ((lPos[0] > 0) && (lPos[1] > 0)) {
						lpTips[k].style.left = (lPos[0] - 10) + "px";
						lpTips[k].style.top  = (lPos[1] - 10) + "px";
					} // endif
					var sTxt = "";
					sTxt = lpTips[k].innerHTML;
					sTxt = sTxt.replace(/ /, ""); sTxt = sTxt.replace(/&nbsp;/, ""); sTxt = sTxt.replace(/&NBSP;/, ""); sTxt = sTxt.replace(/\t/, "");
					if (sTxt.length > 5) {
						lpPar.style.cursor = "pointer";
						lpPar.style.color = "#000000";
						lpTips[k].onmouseout = function (e) {
							if (!e) { d = window.event.srcElement; } else { d = e.target; }
							if (!d) return;
							d.style.display = "none";
						}; // end func.
						lpPar.onmouseover = function (e) {
							if (!e) {
								d = window.event.srcElement;
								x = window.event.clientX;
								y = window.event.clientY;
							} else {
								d = e.target;
								x = e.x; y = e.y;
							} // endif
							if (!d) return;
							var myid = 0;
							if (!d.id) return;
							myid = parseInt(d.id.substring(8));
							if (myid < 1) return;
							showProgramma(myid, x, y);
						}; // end func.
						lpPar.style.zIndex = 999;
					} else {
						lpPar.style.color = "#555555";
					} // endif
*/
				} // endif
			} // endif
		} // endif
	} // next
} // end func.
var lpProgTime;
function showProgramma(myid, x, y) {
	window.clearTimeout(lpProgTime);
	hideProgramma("-");
	if (document.getElementById("prgchild" + myid)) {
/*
		if ((x > 0) && (y > 0)) {
			document.getElementById("prgchild" + myid).style.left = (x - 5) + "px";
			document.getElementById("prgchild" + myid).style.top  = (y - 5) + "px";
		} // endif
*/
		document.getElementById("prgchild" + myid).style.display = "";
		document.getElementById("prgchild" + myid).style.cursor = "default";
		lpProgTime = window.setTimeout('hideProgramma("-");', 60000);
	} // endif
} // end func.
function hideProgramma(exid) {
	window.clearTimeout(lpProgTime);
	var lpTips = document.getElementsByTagName("DIV");
	for (var k = 0; k < lpTips.length; k++) {
		if (lpTips[k].className) {
			if (lpTips[k].className == "prgtip") {
				if (lpTips[k].id) {
					if (lpTips[k].id != exid) lpTips[k].style.display = "none";
				} else {
					lpTips[k].style.display = "none";
				} // endif
			} // endif
		} // endif
	} // next
} // end func.
// ****************************************************************************************************************************************
initFloat = function () {
	if (document.getElementById("progtable")) initProgramma();
};
if (document.addEventListener) {
	document.addEventListener("DOMContentLoaded", initFloat, false);
} else {
	window.onload = initFloat;
} // endif
// ****************************************************************************************************************************************

