function move_box(an, box) {
  var cleft = 0;
  var ctop = 0;
  var obj = an;
  while (obj.offsetParent) {
    cleft += obj.offsetLeft;
    ctop += obj.offsetTop;
    obj = obj.offsetParent;
  }
  box.style.left = cleft + 'px';
  ctop += an.offsetHeight + 8;
  if (document.body.currentStyle &&
    document.body.currentStyle['marginTop']) {
    ctop += parseInt(
      document.body.currentStyle['marginTop']);
  }
  box.style.top = ctop + 'px';
}

function show_box(an, id) {
	
 	var boxdiv = document.getElementById(id);
	
	if (boxdiv != null) {
 		move_box(an, boxdiv);
		if (boxdiv.style.display == 'none') {
 			boxdiv.style.display='block';	
		} else {
			boxdiv.style.display='none';
		}
		
    	return false;
		
	}

	return false;
}

function hide_box(id) {

 	var boxdiv = document.getElementById(id);

	if (boxdiv != null) {
		boxdiv.style.display='none';
    	return false;
	}

	return false;
}