Cameron Ford, Academic Advisor, SFU Chemistry Department answered on December 2, 2009, A:If you found this answer useful, please consider making a small donation to science.ca.
There are two key considerations: the coefficient of friction between the objects and the window and the strength of the magnets. The magnets will determine the force that the object will experience in the direction of the window. This will then determine the force from the window on the object (we call this the normal force as it is normal, or perpendicular, to the surface). The coefficient of friction multiplied by the normal force determines the maximum static friction force. As long as the static friction force is greater than the weight force (mass in kg multiplied by 9.8 m/s^2), the objects will not slide down the window. You can always increase the coefficient of friction in a situation like this by introducing a piece of rubber between the object and the window.