function addValue(id){
	document.getElementById(id).value = document.getElementById(id).value * 1 +  1;
}
function removeValue(id){
	document.getElementById(id).value = document.getElementById(id).value * 1 -  1;
}

window.onload = function(){
	var imgs = document.getElementsByTagName('img');
	for(i = 0; i < imgs.length; i++){
		if(imgs[i].getAttribute('rel') == 'groter'){
			imgs[i].onclick = popup;
			imgs[i].style.cursor = 'pointer';
		}
	}
}

function popup(){
var height = this.getAttribute('orheight');
var width = this.getAttribute('orwidth');
//for window height and width add 20px otherwise we get scroll bars...  
var height_window = height * 1 + 20;
var width_window = width * 1 + 20;
//but IE needs more ...
//But how...

//src 
var bron = this.src;
//open a window and add a img
var tmp = window.open('','','height='+height_window+',width='+width_window+',resizable=1,menubar=0,toolbar=0,location=0,directories=0,status=0');
tmp.document.title = 'Origineel';
//create a img
var x = tmp.document.createElement('img');
tmp.document.body.appendChild(x);
x.src= bron;
x.title = '';
x.width = width;
x.heigth = height;
x.title = 'click to close';
tmp.document.onclick = function (){
//window.close will close the opener instead of the popup from some strange reason... 
tmp.window.close();
}

} 

		function checkBox(a){
		if(a.checked == true){
		var b = 1;
		}else{
		var b = 0;
		}
			
		form = document.getElementById('checkbox');
		inputs = form.getElementsByTagName('input');
		for(i = 0; i < inputs.length; i++){
			input = inputs[i];
			
			if(input.type == 'checkbox' && input.name != 'all'){
					if(b == 0){
					input.checked = false;
					}else{					
					input.checked = true;
					}	
			}
		}
		}
