Trying to teach myself and ran into some math issues, was wondering if anyone could point out what I did wrong.

The program as far as I have gotten it, (don't laugh I'm learning :P )

http://lostrenegades.net/ET/index.html

The buy values are supposed to be 110% higher than the sell values so that in any 60 second cycle a player cant just buy and sell an imbalanced item over and over for fast cash.

The sell values are randomly changed every 60 seconds by a rate of 80-120% of their former value.

When it starts out everything looks right, 10/11, 20/22, 30/33, but as time goes on you can see that while the values do randomly change, the ratios do not stay with buy price at 110% of the sell price.

If anyone can point out what I did wrong, I would appreciate it.

thanks,

narfi

ps. is there a tutorial on how to have objects placed dynamically to fit the screen instead of at a set coordinates from the upper left corner?