function autofitIframe(id,name) 

{ 
	


if (!window.opera && !document.mimeType && document.all && document.getElementById) 

{ 

parent.document.getElementById(id).style.height=this.document.body.offsetHeight+"px"; 

} 

else if(document.getElementById) 

{ 
	
	
	

		if(id == "vespa"){
			
			
	       	parent.document.getElementById('rechtsmidden').style.height=parent.document.body.clientHeight - 180 - 40 ;
			        document.getElementById('gallerytable').style.height =  parent.document.body.clientHeight - 180 - 40 ;
		}
		else if(id ==  "gallerij"){
		 //   parent.document.getElementById('rechtsmidden').style.height=this.document.body.scrollHeight+"px";
			//alert(parent.document.getElementById('rechtsmidden').style.height);
			//parent.document.getElementById('rechtsmidden').style.height = parent.document.body.clientHeight - 180 - 40 ;
			//parent.document.getElementById(id).style.height= this.document.body.scrollHeight + 100 + "px" ;
			//document.getElementById('gallerytable').style.height  = this.document.body.scrollHeight + 100 + "px" ;
		
		
			//alert(parent.document.body.clientHeight);
			if((parent.document.body.clientHeight - 100 - 40) < '550' ){
				
				//alert('te weinig plaats voor gallerij');
				//alert((550 - (parent.document.body.clientHeight - 100 - 40)) + (parent.document.body.clientHeight - 100 - 40) );
				parent.document.getElementById('rechtsmidden').style.height = '600px';
			   // document.getElementById('gallerytable').style.height = '550px';
				
			}else{
				
				//alert('genoeg plaats voor gallerij');
				parent.document.getElementById('rechtsmidden').style.height = parent.document.body.clientHeight - 100 - 40 ;
			    document.getElementById('gallerytable').style.height =  parent.document.body.clientHeight - 100 - 40 ;
					
			}
		
		
		
		}
		
		
		else {
			parent.document.getElementById(id).style.height=this.document.body.scrollHeight+"px";
			//alert(parent.document.body.clientHeight - 180 - 40);
			
			
			if((parent.document.body.clientHeight - 180 - 40) < this.document.body.scrollHeight ){
				
			//	alert('nietgallerij1');
				
					parent.document.getElementById(id).style.height=this.document.body.scrollHeight + 10 + "px" ;
				
			}else{
			
				 	parent.document.getElementById(id).style.height=parent.document.body.clientHeight - 180 - 40 ;
			       // document.getElementById('gallerytable').style.height =  parent.document.body.clientHeight - 180 - 40 ;
			}
		
			
			
		}
		
		
	
			
		
		



} 

} 




