function ResizeImage (ImgControl, NewWidth, NewHeight)
{
	if (ImgControl.width > NewWidth)
	{
		OldWidth = ImgControl.width 
		OldHeight = ImgControl.height
		ImgControl.width = NewWidth
		ImgControl.height = (OldHeight) * (NewWidth / OldWidth)
	}
	if (ImgControl.height > NewHeight)
	{
		OldWidth = ImgControl.width 
		OldHeight = ImgControl.height
		ImgControl.height = NewHeight
		ImgControl.width = (OldWidth) * (NewHeight / OldHeight)
	}
}
