function resizeImages(maxW)
{
	var images = document.getElementById('rightcol').getElementsByTagName('img');
	
	
	for (i=0; i<images.length; i++) 
	{
	
		w=images[i].width;
		h=images[i].height;	
		newLink = document.createElement('a');
		newLink.href = images[i].src;
		newLink.target = "_blank";
		
		
	
					
		if (w > maxW) 
		{
		  f=1-((w - maxW) / w);
		  newWidth = w * f;
		  newHeight = h * f;
		}	
	
		newLink.innerHTML = "<img src='" + images[i].src + "' width='" + newWidth + "' height='" + newHeight + "' />";
		
		images[i].parentNode.replaceChild(newLink,images[i]);
	
	/*
	if (w > maxW) 
	{
	  f=1-((w - maxW) / w);
	  images[i].width=w * f;
	  images[i].height=h * f;
	}	
	*/
	
	}

	
	
}