rem: if (imageDiv) { currentHeight = imageDiv.offsetHeight; currentWidth  = imageDiv.offsetWidth;  if (currentHeight > maxHeight) { ratio = maxHeight / currentHeight; imageDiv.style.width = (currentWidth*ratio) + 'px'; imageDiv.style.height = (currentHeight*ratio) + 'px';  } } 
add: if (imageDiv) { currentHeight = imageDiv.offsetHeight; currentWidth  = imageDiv.offsetWidth;  if (currentHeight > maxHeight) { ratio = maxHeight / currentHeight; imageDiv.style.width = (currentWidth*ratio) + 'px'; imageDiv.style.height = (currentHeight*ratio) + 'px';  } } 
context: function single() {	var imageDiv = document.getElementById("singleimage");	if (imageDiv) {		currentHeight = imageDiv.offsetHeight;		currentWidth  = imageDiv.offsetWidth;				if (currentHeight > maxHeight) {			ratio = maxHeight / currentHeight;			imageDiv.style.width = (currentWidth*ratio) + 'px';			imageDiv.style.height = (currentHeight*ratio) + 'px';				}	}}
meta: 752	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/752/6124048972a690b293ec27ca743a3c0f869217d2/jstemplate.js/buggy/mod/data/preset/Image Gallery/jstemplate.js