 // resize imgs right
 var rimgs = document.getElementById('contentright').getElementsByTagName('img');
 var maxwr = 200;
 var maxw = 500;
 var maxt = 800;
 
 for(var i=0;i<rimgs.length;i++)

 {
	 
		if (rimgs[i].width > maxwr)
		{
			newh = parseInt((rimgs[i].height / rimgs[i].width)*maxwr);
			var oldw = rimgs[i].width;
			
			if (oldw > maxt)
			{
				oldw = maxt;
			}
			rimgs[i].width = maxwr;
			rimgs[i].height = newh;
			
			if (oldw > 2* maxwr)
			{
				rimgs[i].alt += ' (klik om te vergroten)';
				
				rimgs[i].onmouseover = function () {
					this.style.cursor = 'pointer';
				}
				
				rimgs[i].onclick = function () {
					document.getElementById('vergroot').innerHTML= '<IMG width="'+oldw+'" ALT="Klik om de vergroting te sluiten" src="'+this.src+'" /><a href="#">x</a>';
					document.location.hash = 'boven';
				}
			}
		}
		if (1==0&&rimgs[i].alt != '')
		{
			var thediv = document.createElement('div');
			thediv.setAttribute('class','subtitle');
			var theitalic = document.createElement('i');
			var thetxt = document.createTextNode(rimgs[i].alt);
			var thesmall = document.createElement('small');
			thesmall.appendChild(thetxt);
			theitalic.appendChild(thesmall);
			thediv.appendChild(theitalic);
			rimgs[i].parentNode.appendChild(thediv);
		}
	
 }
 
 // resize img mid
 var imgs = document.getElementById('content').getElementsByTagName('img');
 
 for(var i=0;i<imgs.length;i++)

 {
	 
		if (imgs[i].width > maxw)
		{
			newh = parseInt((imgs[i].height / imgs[i].width)*maxw);
			var oldw = imgs[i].width;
			if (oldw > maxt)
			{
				oldw = maxt;
			}
			imgs[i].width = maxw;
			imgs[i].height = newh;
			if (oldw > 150 + maxw)
			{
				imgs[i].alt += ' (klik om te vergroten)';
				imgs[i].onmouseover = function () {
					this.style.cursor = 'pointer';
				}
				
				imgs[i].onclick = function () {
					document.getElementById('vergroot').innerHTML= '<IMG width="'+oldw+'" ALT="Klik om de vergroting te sluiten" src="'+this.src+'" /><a href="#">x</a>';
					document.location.hash = 'boven';

				}
			}
		}
	
 }
 
 document.getElementById('vergroot').onclick = function() {
	 this.innerHTML = '';
 }
 
 


