// JavaScript Document

function resizeImage(imageName,maxWidth){
	var ratioValue;
	
	tempWidth = eval("document."+imageName+".width");
	tempHeight = eval("document."+imageName+".height");

	if ( tempWidth > maxWidth ) {
		ratioValue = maxWidth / tempWidth;
		imageWidth = maxWidth;
		imageHeight = tempHeight * ratioValue;

		eval("document."+imageName+".width=imageWidth");
		eval("document."+imageName+".height=imageHeight");
	}

}

