What your code will do is resize 200 -> 250 -> 300 -> 350 -> 400 -> 450 -> 500 -> 450 as intended, but after that, the size is less than 500, so it will increase again. It will oscillate 500 -> 450 -> 500 -> 450 -> 500 -> 450, etc.
You need to remember whether you are in a going up or a going down phase. The simplest way (other folks may disagree) is to add an attribute to the image tag. e.g.
function Increase_Decrease() {
var img = document.getElementById("img");
var w = img.width;
var h = img.height;
if (w <= 200 && h <= 200) {
img.changeSize = 50;
} else if (w >= 500 && h >= 500) {
img.changeSize = -50;
}
img.width += 1 * img.changeSize;
img.height += 1 * img.changeSize;
}
This is all from the top of my head. It is totally untested.