function isMobile() { var uAgent = context.getUserAgent().getUserAgent(); if (((uAgent.match("iPhone") !== null || param.platform=="iphone") || (uAgent.match("Android") !== null || param.platform=="android") || uAgent.match("iPad") !== null) || isIframe == true) { return true; } else { return false; } } function isAndroidCheck() { var uAgent = context.getUserAgent().getUserAgent(); if ((uAgent.match("Android") !== null || param.platform=="android") || isAndroid == true) { return true; } else { return false; } } function isIpad() { var uAgent = context.getUserAgent().getUserAgent(); print(uAgent); if (uAgent.match("iPad") !== null || param.ipad == 'true') { return true; } else { return false; } } function isAndroidTablet() { var uAgent = context.getUserAgent().getUserAgent(); if ((uAgent.match("Android") !== null && uAgent.match("mobile") == null) || param.tablet == 'true') { return true; } else { return false; } } function isIphone() { var uAgent = context.getUserAgent().getUserAgent(); if (uAgent.match("iPhone") !== null || param.platform=="iphone") { return true; } else { return false; } } function isIOS5() { var uAgent = context.getUserAgent().getUserAgent(); if ((uAgent.match("iPhone") !== null || uAgent.match("iPad") !== null) && uAgent.match('OS 5') !== null) { return true; } else { return false; } }