// JavaScript Document

function OpenVenster(url,breedte,hoogte) {
  window.showModelessDialog(url, "", "dialogHeight: " + hoogte + "px; dialogWidth: " + breedte + "px;  edge: Raised; center: Yes; help: no; resizable: no; status: no;"); 
}



function gotopage(pagina,extend) {
  window.location.href= "index.php?pn=" + pagina + '&' + extend;
 }


function gotopage_submit(frm,pagina,extend) {
  frm.pn.value = pagina;
  frm.extend.value =  extend;
	frm.submit();
 }


function changeScreenSize(w,h){
  window.resizeTo( w,h );
}


function setball(image) {
  image.src='images/ball-red.gif';
}

function setarrow(image) {
  image.src='images/pfeil-r.gif';
}


function movr(obj) {
  obj.style.background='#e7e7e7';
}

function mout(obj) {
  obj.style.background='#fac606';
}


function moutmi(obj) {
  obj.style.background='#ffffff';
}


function setVariables()
{
   v  = ".pixelTop=";
   dS ="";
   sD =".style";
   y  ="document.body.scrollTop"
}

function checkLocation()
{
    object = "object1";
    yy = eval(y) + 125;
    eval( dS + object + sD + v + yy );
    setTimeout( "checkLocation()", 10);
}

function currenty()
{
    object = "object1";
    yy     =eval(y) + 125;
    return yy;
}

function getRealTop(el_id)
{
	var el = document.getElementById(el_id);
	yPos = el.offsetTop;
	tempEl = el.offsetParent;
	while (tempEl != null)
	{
		yPos += tempEl.offsetTop;
		tempEl = tempEl.offsetParent;
	}
	return yPos;
}

function submit_opdracht(obj,pn_waarde,extend_waarde,target) {
  obj.pn.value = pn_waarde;
  obj.extend.value = extend_waarde;
  obj.target= target;
  obj.submit();
  obj.target='_self';
};



function findPosX(obj) {
  var curleft = 0;
  if (obj.offsetParent) {
    while (obj.offsetParent) {
      curleft += obj.offsetLeft
      obj = obj.offsetParent;
    }
  }
  else if (obj.x) curleft += obj.x;
  return curleft;
}
function findPosY(obj) {
  var curtop = 0;
  if (obj.offsetParent) {
    while (obj.offsetParent) {
      curtop += obj.offsetTop
      obj = obj.offsetParent;
    }
  }
  else if (obj.y) curtop += obj.y;
  return curtop;
}
function goto(objID) {
		window.scrollTo(findPosX(document.getElementById(objID)),findPosY(document.getElementById(objID)) - 10);
}













