function doLoad(page) {
	if (page=="index") {
		setSize("aanb1");
		setSize("aanb2");
		setSize("aanb3");
		setSize("aanb4");
	}
}

function setSize(imageName){
  var maxWidth = 100;
  var maxHeight = 100;
 
  var img = arguments[0][0];
 
  var newWidth = img.width;
  var newHeight = img.height;
 
  if(img.width > img.height && img.width>maxWidth){
    newWidth = maxWidth;
    newHeight = parseInt(img.height + (maxWidth - img.width)/img.width*img.height); 
  }
  else if(img.width < img.height && img.height>maxHeight){
    newHeight= maxHeight;
    newWidth = parseInt(img.width + (maxHeight - img.height)/img.height*img.width); 
  }
 
  document.getElementById(imageName).style.width = newWidth + "px";
  document.getElementById(imageName).style.height = newHeight + "px"
  document.getElementById(imageName).src = img.src;
 
}