function init_help(n, size) {
	var x = document.getElementsByTagName('img')
	if(x)
		for(var i=0; i<x.length; i++) {
			if(	x[i].getAttribute('help_id')) {
				if(n) {
					x[i].onmouseover = showhelp;
				} else {
					x[i].onmouseover = hilitehelp;
					x[i].onclick = showhelp;
				}
				x[i].onmouseout = hidehelp;
			}
		}
}
function showhelp(e) {
	var x = document.getElementById(this.getAttribute('help_id'));
	if(pos=getMouse(e)) {
		x.style.top = (pos.y+1) +'px';
		x.style.left = Math.min(pos.x+20, document.documentElement.clientWidth-x.style.left-20) + 'px';
	}
	x.style.display='block';
}

function hidehelp() {
	var x = document.getElementById(this.getAttribute('help_id'));
	x.style.display='none';
	this.style.background ='url(../images/question.png)';
}

function hilitehelp() {
	this.style.background ='url(../images/hi_question.png)';
}

function getMouse(e)
{
	var pos = new Object();
	
	if(!e) e=window.event;
	if(!e) return false;
	
	if(e.offsetX) {
		pos.x = e.offsetX;
		pos.y = e.offsetY;
	} else {
		pos.x = e.pageX ;
		pos.y = e.pageY ;
	}
	if (isNaN(pos.x) || isNaN(pos.y)) pos= false;
	return pos;
}