The problem is in your conditions:
if (dbMouseX( ) < 52)
{
dbSprite (PLAYER, 50, 722, 13);
dbSprite (SPRING, 57, 707, 14);
dbPositionMouse (50, mouseY);
}
else
{
dbSprite (PLAYER, mouseX, 722, 13);
dbSprite (SPRING, mouseX + 7, 707, 14);
}
if (dbMouseX( ) > 661)
{
dbSprite (PLAYER, 661, 722, 13);
dbSprite (SPRING, 668, 707, 14);
dbPositionMouse (662, mouseY);
}
else
{
dbSprite (PLAYER, mouseX, 722, 13);
dbSprite (SPRING, mouseX + 7, 707, 14);
}
Because you have your conditions set so that if the mouse's x position is less than 52, it gets re-positioned to 50 (ie. less than 52, thus making the second 'if' statement useless because, since it got re-positioned, it will never be greater than 661). And vice versa.
The second problem comes from pretty much the same conditional flaw.