function postResize(img){
	img.style.visibility = "visible";
}


function resetImage(img, size, callback){
	var width = img.clientWidth;
	var height = img.clientHeight;
	
	if(width < size && height < size){
		//
	}
	else if(width > height){
		var rate = width / size;
		img.style.width = size + "px";
		img.style.height = Math.round(height / rate) + "px";
	}
	else{
		var rate = height / size;
		img.style.height = size + "px";
		img.style.width = Math.round(width / rate) + "px";
	}
	callback(img);
}
