In this script, change the $location attribute to the page you want your users to see if they are using one of the mobile devices listed in the if(stristr.. string.
This is a simpler script to detect Windows CE browsers (although you can detect any browser with this script.) Simply change the window.location URL to your mobile friendly site.
In both of these cases, I'm redirecting the site to the mobile version of this site- http://www.2mlearn.mobi/
I will be adding this script to http://www.mlearning-world.com/ in the next few days
to help all our visitors with mobile devices.
mlearning m-learning mobile-learning mobile+learning podcasting iphone apple web+2.0 learing+2.0 eLearning