Javascript clues needed!

Hey folks, Smart Bitch Sarah, who y’all may know of as one half of the fine duo of Smart Bitches Trashy Books, has put out a call asking for assistance at Javascript. She needs code that can choose between 3-4 ads with associated URLs, for a mobile app, each time the app is refreshed.

Now, this seems like a reasonably easy Javascript problem to me, and I know how I’d go about doing it on a web page. But what I don’t know is how you’d go about integrating this into a mobile app. Anybody out there know offhand of any extant scripts that could accomplish this? Alternately, any specific tips on how to plug code I’d whip up on my own into whatever she’s already got for the app?

(Note: what I’ve described here is pretty much all I know of what Sarah needs; she’s not technically inclined, so she pretty much needs a nice simple solution for this.)

Thanks in advance for any tips, all!