Auto Detecting iPhone Web Browser

I want to make my website auto-detect if a person is using an iPhone to browse the site and if so it pulls from a different set of files to be displayed… any tips or tutorials on how to do this?

Thanks.

Try something like this…

var agent=navigator.userAgent.toLowerCase();
var is_iphone = ((agent.indexOf('iPhone')!=-1);
if (is_iphone) { conditional code goes here }

[QUOTE=jderosa3;2326870]I want to make my website auto-detect if a person is using an iPhone to browse the site and if so it pulls from a different set of files to be displayed… any tips or tutorials on how to do this?

Thanks.[/QUOTE]