This question has been answered by sottwell. See the first response.

Sure, anything is possible with a budget
The way things have been moving is towards fluid layouts, so my guess is that's where the biggest bang for the buck is, not in the server-side detection scripts, but yes, it would of course be possible to update the script. It actually requires periodic upgrading because there are always going to be new browser agents that come along.
$(window).load(function() {
var windowSize = $(window).width();
if (windowSize <= 767) {
//alert("screen width is less than 767 // MOBILE");
Show all MOBILE 'id-ed' elements of the template HTML, and hide all TABLET/DESKTOP elements of the template HTML
}
else if (windowSize <= 979) {
// alert("screen width is less than 979 but greater than or equal to 768 // TABLET");
Show all TABLET 'id-ed' elements of the template HTML, and hide all MOBILE/DESKTOP elements of the template HTML
}
else if (windowSize >= 980) {
//alert("screen width is greater than or equal to 980 // DESKTOP");
Show all DESKTOP 'id-ed' elements of the template HTML, and hide all MOBILE/TABLET elements of the template HTML
}
});
Yep, exactly: it's all moving towards Javascript, and that's arguably the better place to handle it. You can't read screen size with a server-side language like PHP.
Personally, I'd go the AJAX route. Have a basic common page, then have bits that get loaded via AJAX according to the device size.
Each of these "bits" for a given page could all be in divs on one resource with no template; the JQuery load() function allows you to specify which element to load. However, this would require the browser to download the whole "bits" page even though only one "bit" would be displayed, so it might be better to have separate resources to supply each "bit". I'd store them under each main page in the Tree just to make it easier to maintain. If this were Revo, I'd use a MIGXdb TV to manage the "bits" resources for a given page.