var width = "200";
var widthInt = 200;
var height = "200";
var textcolor = "#000000";
var captioncolor = "#FFFFFF";
var maincolor = "#BBDDFF";
var backcolor = "#000080";
var title = "Toelichting";
var spacing = 5

function showInfo(pDay, pObj) {
  var positions = $(pDay).positionedOffset();
  var scrollOffset = $(pDay).cumulativeScrollOffset();
  var containerOffset = $("middleRightContainer").cumulativeScrollOffset();

  x = positions[0] - scrollOffset[0] + containerOffset[0];
  y = positions[1] - scrollOffset[1] + containerOffset[1];
  x = x - $(pObj).getWidth() - spacing;
  y = y + spacing;
 
  $(pObj).setStyle( {
    display: 'block',
	left: x+'px',
	top: y+'px'
  });
}

function closeInfo(pObj) {
  $(pObj).setStyle( {
    display: 'none'
  });
}

function cclose(){
  overdiv = new getObj("overDiv");
  overdiv.style.visibility = hideValue;
}



if (!document.getElementById && document.layers) {
  ns4 = true;
  hideValue = "hide";
  showValue = "show";
}
else {
  ns4=false;
  hideValue = "hidden";
  showValue = "visible";
}

function getObj(name) {
  if (document.getElementById) {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else
    if (document.all) {
      this.obj = document.all[name];
	  this.style = document.all[name].style;
    }
    else
      if (document.layers) {
        this.obj = document.layers[name];
        this.style = document.layers[name];
      }
}

function findPosX(pObj) {
var curleft = 0;
  if (pObj.offsetParent) {
    while (pObj.offsetParent) {
      curleft += pObj.offsetLeft;
      pObj = pObj.offsetParent;
    }
  }
  else if (obj.x) {
         curleft = pObj.x;
       }
  return curleft;  
}

function findPosY(pObj) {
var curtop = 0;
  if (pObj.offsetParent) {
    while (pObj.offsetParent) {
      curtop += pObj.offsetTop;
      pObj = pObj.offsetParent;
    }
  }
  else if (obj.y) {
         curtop = pObj.y;
       }
  return curtop;  
}
