Mc x and y min and max parameters

I have a script that loads a movie clip at a different location every time on the stage:

**photo1._x = Math.random() * 600;
photo1._y = Math.random() * 600;

**This works fine. All I would like to do now is add a minimum and maximum of some kind so that my clip never load hanging half off of the stage. I tried this among other things:

**photo1 = Math.min(stage.width - 100, stage.width - 100);
photo1 = Math.max(stage.width - 100, stage.width - 100);

**I tried a number of other ways to add x and y parameters but never got the result I wanted. Any ideas? Much appreciated.