//MKS - reduce an image and add link to view the original
function shrink(oImage) {
	//???try {
		var iMaxWidth = 600
		if ((oImage.width > iMaxWidth && oImage.height > 10) || (oImage.width == 0 && oImage.src.indexOf('forum/uploads') > 0)) {
			oImage.height = (oImage.height / oImage.width) * iMaxWidth //maintain aspect ratio
			oImage.width = iMaxWidth
			if (window.addEventListener) { //Mozilla, Netscape or Firefox
				oImage.addEventListener('click', function() {window.open(oImage.src, '_blank', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=-1,resizable=-1')}, false)
				oImage.setAttribute('style', 'cursor:pointer;border-left:3px solid blue')
				oImage.setAttribute('title', 'Click to view image full size')
			}
			else { //IE
				oImage.attachEvent('onclick', function() {window.open(oImage.src, '_blank', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=-1,resizable=-1')})
				oImage.setAttribute('alt', 'Click to view image full size')
				oImage.style.cursor = 'hand'
				oImage.style.borderLeft = '3px solid blue'
				window.status = 'Click on photos to view full-size'
			}
		}
	//}
	//catch(e) {
		//ignore
	//}
}

