I don't think you can detect a connection speed, but what you could do if your server will allow it is to ping the user, output the value to a text file & then read in the value. If the value was above a certain point it would be safe to assume a slow connection and redirect accordingly.
this method could also be used to detect broadband access resonably accurately.
Hope this helps
Neil