function Image(imgObj){
	this.maxWidth = 100;
 	this.imgObj = imgObj;
 	this.scale = function() {
		if (typeof this.imgObj.naturalWidth == 'undefined')
			this.imgObj.naturalWidth = this.imgObj.width;
		if (typeof this.imgObj.naturalHeight == 'undefined')
			this.imgObj.naturalHeight = this.imgObj.height;
		if (this.imgObj.naturalWidth > this.maxWidth){
			var deler = this.imgObj.naturalWidth/this.maxWidth;
			this.imgObj.width = this.maxWidth;
			this.imgObj.height = this.imgObj.naturalHeight / deler;
			this.imgObj.style.maxWidth = this.imgObj.naturalWidth + 'px';
			this.imgObj.style.maxWidth = this.imgObj.naturalHeight + 'px';
			this.imgObj.title = "Klik voor een groter plaatje";
			this.imgObj.className = 'resized';
		}
		else{
			this.imgObj.className = 'border';
		}
 	}
 	this.show_full_image = function(){
		var showMaxWidth = screen.width/1.25;
		var showMaxHeight = screen.height/1.25;
		var x;
		var y;
		var locx;
		var locy;
		var deler;
		if (typeof this.imgObj.naturalWidth == 'undefined')
			this.imgObj.naturalWidth = this.imgObj.width;
		if (typeof this.imgObj.naturalHeight == 'undefined')
			this.imgObj.naturalHeight = this.imgObj.height;
		if (this.imgObj.naturalWidth > this.maxWidth)	{
			x = this.imgObj.naturalWidth;
			y = this.imgObj.naturalHeight;
			if(x > showMaxWidth) {
				deler = x/showMaxWidth;
				x = x/deler;
				y = y/deler;
			}
			if(y > showMaxHeight)	{
				deler = y/showMaxHeight;
				x = x/deler;
				y = y/deler;
			}
			locx = (screen.width - x)/2;
			locy = (screen.height - y)/2-50;
			popup_window = window.open("","","height="+y+",width="+x+",left="+locx+",top="+locy+',scrollbars=no,status=no,resize=no, toolbar=no');
			popup_window.document.write("<html><title>Autocentrum van Vliet</title><body style=\"margin:0px\"><a href=\"javascript:;\"><img src="+this.imgObj.src+" width=\""+x+"\" height=\""+y+"\" onclick=\"window.close()\" border=\"0\" alt=\"Klik op het plaatje om het venster te sluiten\"></a></body></html>");
		}
 	}
}
