/* 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,pos) {
  var cleft = 400;
  var ctop = pos;
  var obj = an;
  /*while (obj.offsetParent) {
    cleft += obj.offsetLeft;
    ctop += obj.offsetTop;
    obj = obj.offsetParent;
  }*/
  box.style.left = cleft + 'px';
  ctop += an.offsetHeight + 0;
  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, borderStyle,k) {
  var href = an.href;
  var boxdiv = document.getElementById(href);
  
  

  if (boxdiv != null) {
    if (boxdiv.style.display=='none') {
      move_box(an, boxdiv);
      boxdiv.style.display='block';
    } else
      boxdiv.style.display='none';
    return false;
  }

  boxdiv = document.createElement('div');
  boxdiv.setAttribute('id', href);
  boxdiv.style.display = 'block';
  boxdiv.style.position = 'absolute';
  boxdiv.style.width = width + 'px';
  boxdiv.style.height = height + 'px';
  boxdiv.style.border = borderStyle;
  boxdiv.style.backgroundColor = '#0066FF';
  boxdiv.style.left = 400 + 'px';
  

  var contents = document.createElement('iframe');
  contents.scrolling = 'si';
  contents.frameBorder = '1';
  contents.style.width = width + 'px';
  contents.style.height = height + 'px';
  contents.src = href;

  boxdiv.appendChild(contents);
  document.body.appendChild(boxdiv);
 
 // boxdiv.style.top=-50+'px';


	var posarrow=0;
	switch (k)
	{
		case 1:
			posarrow=100;
			break;
		case 2:
			posarrow=185;
			break;
		case 3:
			posarrow=275;
			break;
		case 4:
			posarrow=365;
			break;
		case 5:
			posarrow=435;
			break;
		case 6:
			posarrow=515;
			break;
	}
	document.getElementById('arrow').style.top=posarrow+"px";
	move_box(an, boxdiv, posarrow);
	boxdiv.style.left=400 +'px';





  return false;
}

