/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: JTricks.com :: http://www.jtricks.com/ */
function move_box(an, box,offestAmount) {
  var cleft = offestAmount;
  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_hide_box(an, width, height,newDivID,offsetDiv) {
  var href = an.href;
  var boxdiv = document.getElementById(newDivID);

  if (boxdiv != null) {
    if (boxdiv.style.display=='none') {
      move_box(an, boxdiv,offsetDiv);
      boxdiv.style.display='block';
    } else
      boxdiv.style.display='none';
    return false;
  }

  boxdiv = document.createElement('div');
  boxdiv.setAttribute('id', newDivID);
  boxdiv.style.display = 'block';
  boxdiv.style.position = 'absolute';
  boxdiv.style.zIndex = '500';
  boxdiv.style.width = width + 'px';
  boxdiv.style.height = height + 'px';
//  boxdiv.style.border = '2px solid';
  boxdiv.style.backgroundColor = '#FFF';
/*
  var contents = document.createElement('iframe');
  contents.scrolling = 'no';
  contents.frameBorder = '0';
  contents.style.width = width + 'px';
  contents.style.height = height + 'px';
  contents.src = href;
*/
 /* boxdiv.appendChild(contents);	*/
  document.body.appendChild(boxdiv);
  move_box(an, boxdiv,offsetDiv);
  jah(href,newDivID);	/* URL to call, DIV ID to send it to */
  return false;
}
/* four parameters. 1 = 'this',2= width, 3 = height, new DIV ID name
<a href="example.cfm" onClick="return show_hide_box(this,200,270,'rev#TrackID#')">review this</a>. */