function getImgSize(imgSrc, divID, dim)
{
	var newImg = new Image();
	var dim = dim;
	var divID = divID;
	newImg.onload=function() {
		if (dim == "w") {
		var imgWidth = newImg.width;
		if (imgWidth == undefined) imgWidth = 67;
		//return(imgWidth);
		//instead of returning imgwidth we set size in div
		var thisDiv = document.getElementById(divID);
		thisDiv.style.width = imgWidth + "px";

		}
		if (dim == "h") {
			var imgHeight = newImg.height;
			if (imgHeight == undefined) imgHeight = 100;
			//return(imgHeight);
			var thisDiv = document.getElementById(divID);
			thisDiv.style.height = imgHeight + "px";
		}
	};
	newImg.src = imgSrc;
}