
function init_html() {
	init_pop('aspop','astatement');
	init_pop('abpop','aabout');
	document.onmouseover = hide_pop;
}

function init_pop(aPhrase,toPop) {
	var aSpan = document.getElementById(aPhrase);
	var aDiv = document.getElementById(toPop);
	aSpan.popDiv = aDiv;
	aSpan.onmouseover = show_text;
	aSpan.onmouseout = ignore_text;
	aDiv.popDiv = aDiv;
 	aDiv.onmouseover = keep_pop;
}

var popShowing = null;
var popWaiting = null;

function show_text(ev) {
	if (!ev) {ev = window.event}
	ev.cancelBubble = true;
	hide_pop(ev);
	popWaiting = this.popDiv;
	delayTimer = setTimeout(pop_text,200);
	return false;
}

function ignore_text(ev) {
	if (!delayTimer) return false;
	clearTimeout(delayTimer);
	popWaiting = null;
	return false;
}

function pop_text() {
	popShowing = popWaiting;
	popShowing.style.visibility="visible";
}

function keep_pop(ev) {
	if (!ev) {ev = window.event}
	ev.cancelBubble = true;
	return false;
}

function hide_pop(ev) {
	if (!ev) {ev = window.event}
	ev.cancelBubble = true;
	if (!popShowing) return false;
	popShowing.style.visibility="hidden";
	popShowing = null;
	return false;
}


