function reloadImage(Obj,mw,mh)
{
		if(mw<=0||mh<=0){
			return;
		}
		var image=new Image();
    image.onload=function(){
		var scale=image.width/image.height;
		var scale2=mw/mh;
		if(image.width<=mw && image.height<=mh) {
			Obj.style.width=image.width;
			Obj.style.height=image.height;
			return;
		}
		if(scale>=scale2) {
			if(image.width<=mw) {
				return;
			}
			Obj.style.width=mw;
			Obj.style.height=Math.floor(image.height*mw/image.width);
			return;
		}
		else {
			if(image.height<=mh) {
				return;
			}
			Obj.style.height=mh;
			Obj.style.width=Math.floor(image.width*mh/image.height);
			return;
		}
	}
	image.src=Obj.src;
}
