function return_info_box(id, aa){
	var pos= findPosition(id);
	var xtop = pos[1];
	var xleft = pos[0];
	var browserName=navigator.appName; 
	if (browserName=="Microsoft Internet Explorer") {xleft=(pos[0]+20);}
	else{xleft=(pos[0]+22);}
 	addElement(aa, (xtop-3) , xleft);
}

function findPosition(id){
	var off=document.getElementById(id)
	if (off.offsetParent) {
		curleft = off.offsetLeft;
		curtop = off.offsetTop;
		while (off) {
			curleft += off.offsetLeft;
			curtop += off.offsetTop;
			off=off.offsetParent;
		}
	}
	return [curleft,curtop];
}

function addElement(aa,top, left) {	
	var newdiv = document.createElement('div');
	var divIdName = 'testDiv';
	newdiv.setAttribute('id',divIdName);
	//newdiv.style.left = left+"px";
	newdiv.style.left = left+"px";
	newdiv.style.top = top+"px";
	newdiv.className='info-blok';
	newdiv.innerHTML = aa;
	document.body.appendChild(newdiv); 
}

function removeElement() {
  var d = document.getElementById('testDiv');
  document.body.removeChild(d); 
}
