function init()
			{
				var image = document.getElementById('test');
				var all_img = image.getElementsByTagName("img");
				for (var i = 0; i<=all_img.length; i++)
				{
					var parent=all_img[i].parentNode;
					var maxWidth=parent.offsetWidth;
					var maxHeight=parent.offsetHeight;
					if(all_img[i].height>all_img[i].width)
					{
						var ratio=all_img[i].height/all_img[i].width;
						var newHeight=maxHeight;
						var newWidth=maxHeight/ratio;
						all_img[i].height=newHeight;
					all_img[i].width=newWidth;
					}
					else if(all_img[i].width>all_img[i].height)
					{
						var ratio=all_img[i].width/all_img[i].height;
						var newWidth=maxWidth;
						var newHeight=maxWidth/ratio;
						all_img[i].height=newHeight;
						all_img[i].width=newWidth;
					}
					else{}
				}
			}
