A better description of the problem you're having with your window would help, but I wouldn't necessarily replace the window motor as the first step, as there's always the possibility it's a problem with the window regulator; that's the mechanism that the window motor drives that moves the window up and down. The connecting belt or cable can wear out or break, and the tracks can get out of alignment which can bind up the window in certain parts of its travel. Those possibilities should be investigated as well, along with the possibility that it could be an issue with the window switch rather than the window motor.