                // not a comprehensive list, but should work for most mobiles

                var agents = new Array("iphone", "ipod", "series60", "symbian", "android", "windows ce", "blackberry", "palm");

               

                var userAgent = navigator.userAgent.toLowerCase();


               

                function isMobile() {

                                for (i=0;i<agents.length;i++) {

                                                if (userAgent.indexOf(agents[i]) != -1) {

                                                                return true;

                                                }

                                }

                }

 

                //redirect to wherever it should go

                if (isMobile()) {

                                window.location = "http://www.camhouse.co.za/mobile/index.html"

                }
