function Client() {  
}  
  
Client.prototype.mobileClients = [  
    "midp",  
    "240x320",
	"400x240",
    "blackberry",
	"blazer",
    "netfront",  
    "nokia",  
    "panasonic",  
    "portalmmm",  
    "sharp",  
    "sie-",  
    "sonyericsson",  
    "symbian",  
    "windows ce",  
    "benq",  
    "mda",  
	"lg",
	"lge",
	"mot-",  
    "opera mini",  
    "philips",  
    "palm-",
	"pocket pc",  
    "sagem",  
    "samsung",  
    "sda",  
    "sgh-",  
    "vodafone",  
    "xda",  
    "iphone",  
    "android"  
];  
  
Client.prototype.isMobileClient = function(userAgent)  
{  
    userAgent=userAgent.toLowerCase();  
    for (var i in this.mobileClients) {  
        if (userAgent.indexOf(this.mobileClients[i]) != -1) {  
            return true;  
        }  
    }  
    return false;  
}  
  
var client = new Client();  
client.isMobileClient(navigator.userAgent);  

function doTest(){
var client = new Client();
var blnIsMobile=client.isMobileClient(navigator.userAgent);  
/*
alert(blnIsMobile);
*/

if (blnIsMobile==true){
 if (confirm('Click OK for the JLARC Mobile site, click Cancel for the standard site. Bookmark JLARC Mobile to avoid this message.')) location.href='mobile/welcome.htm';

}



}
