// JavaScript Document
////////////////////////////////////////////
///these functions helps handling with the div
///////////////////////////////////////////

function findPos(displayBelowThisObject) {
/////finds position of object
	var x = displayBelowThisObject.offsetLeft;
  var y = displayBelowThisObject.offsetTop + displayBelowThisObject.offsetHeight ;
 
  // deal with elements inside tables and such
  var parent = displayBelowThisObject;
  while (parent.offsetParent) {
    parent = parent.offsetParent;
    x += parent.offsetLeft;
    y += parent.offsetTop ;
  }
  
  return [x,y];
}

function setPos(obj,objToShow)
////obj is element, which we will show second parameter below
{
	var coors = findPos(obj);
	//coors[1] -= 30;
	//coors[0] -= 8;
	//alert(coors[1]);
	objToShow.style.position = "absolute";
	objToShow.style.top = coors[1] + 'px';
	objToShow.style.left = coors[0] + 'px';
}
