function fitImage(img, div) {
//	if(img.complete){
	if (1) {
		var shrinkW, shrinkH;
		shrinkW = 0.7 * (document.body.clientWidth/div) / img.width;
		shrinkH = 0.8 * (document.body.clientHeight-50) / img.height;
		window.status=shrinkW;

		if(shrinkW < shrinkH) {
			img.width *= Math.min(shrinkW, 1.4);
			//img.height *= shrinkW;
		} else {
			img.width *= Math.min(shrinkH, 1.4);
			//img.height *= shrinkH;
		}
	}else{
		alert(img.width+','+img.height);
	}

		//img.visibility="visible";
}
