this is a safety device incase a someone should get their hand or anything else stuck in the window, it probably just needs the runners lubricating, try spraying some furniture polish/silicone spray(back to black) onto the runners with the window open then try closing the m again, please let us know how you get on.
Ok you need to have ignition on and hold the button so it does the window up, keep your finger on it untill the window goes up and then resets itself and then goes back down by itself.