<!--
	
	var iframetag='<iframe name="masterdiv" id="masterdiv" src="leeg.php" width="0px" height="0px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" style="position: absolute; left: 150px; top: 150px;"></iframe>'
 
	var masterdivright="150px"
	var masterdivtop="150px"
	document.write(iframetag)
	



	
function openiframe() {
  if (document.getElementById) {
    elmt = document.getElementById('masterdiv');
  } else if (document.all) {
    elmt = document.all['masterdiv'];
  }
  
   elmt.style.width = "400px";
   elmt.style.height = "150px";
}


function openiclose(){
  if (document.getElementById) {
    elmt = document.getElementById('masterdiv');
  } else if (document.all) {
    elmt = document.all['masterdiv'];
  }

   elmt.style.width = "0px";
   elmt.style.height = "0px";
}
	
	
	
	
	
	//globale var client wordt een reference naar de te openen window
	var client=0;
			
	/*Functie sluit het client venster*/
	function sluit() {
		if(client!=0) { //als het client window bestaan heeft
			if(!client.closed) { //en het bestaat nog steeds
				client.close();
			}
		}
	}
			
	/*Functie opent het client venster */
	function openen(url, width, height) {
		var mag_openen=false;
		if(client==0) { 			//als de window nog nooit geopend is
			mag_openen=true; 		//dan mag deze geopend worden
		}
		else {
			if(client.closed) {	//als de window al eens geopend is, maar weer gesloten	
				mag_openen=true;	//dan mag deze geopend worden
			}
			else {
				client.focus(); 	//anders krijgt deze de focus
			}
		}
		if(mag_openen) {			//de window openen 
			var x,y;
			if(screen) {
				x=screen.availWidth/2-width/2;
				y=screen.availHeight/2-height/2;
			}
			else {
				x=window.pageXOffset+ window.outerWidth/2-width/2;
				y=window.pageYOffset+ window.outerHeight/2-height/2;
			}
			client=window.open(url,"client","location=no,menubar=no,toolbar=no,status=no,width="+width+",height="+height+",screenX="+x+",screenY="+y+",top="+y+",left="+x+",scrollbars=yes,resizable=yes");
		}
	}	
	
	function wwtoevoegen(form, id, width, height, vlag) {
		var aantal=eval("document."+form+".aantal.value");
		//openen('ww/ww.php?actie=toevoegen&vlag='+vlag+'&id='+id+'&aantal='+aantal,width,height);
		
		
		openiframe();
		
		masterdiv.location = 'ww/ww.php?actie=toevoegen&vlag='+vlag+'&id='+id+'&aantal='+aantal;
			
		//window.location='ww/ww.php?actie=toevoegen&vlag='+vlag+'&id='+id+'&aantal='+aantal;
		eval("document."+form+".aantal.value=1");
		
		positionit();
	}
	
	function printensluiten(pad) {
		if(document.all) {
			document.all.hide.style.visibility='hidden';
		}
		else {
			document.hide.style.visibility='hidden';
		}
		window.print();
		window.opener.location=pad;
		window.close();
	}
	
	
	
	
	
	
var ie=(document.all || window.opera) && document.getElementById
var iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body


function positionit(){
	masterdivobj=document.getElementById("masterdiv")
	 var window_width=ie && !window.opera? iebody.clientWidth : window.innerWidth-20
	  window_height=ie && !window.opera? iebody.clientHeight : window.innerHeight
	   var dsocleft=ie? iebody.scrollRight : pageXOffset
	    var masterdivwidth=masterdivobj.width
	     masterdivheight=masterdivobj.height
	      masterdivobj.style.left=(masterdivright=="right")? window_width-masterdivwidth-10 : masterdivright
		setInterval("repositionit()", 100)
}

function repositionit(){
	if (ie){
		dsoctop=ie? iebody.scrollTop : pageYOffset
		masterdivobj.style.top=(masterdivtop=="bottom")? window_height-masterdivheight-14+dsoctop : parseInt(masterdivtop)+dsoctop
	}
}

	
	
// -->
