CSS has supported media queries for some time. All browsers in current use will recognise simple media queries such as 'screen' or 'handheld'. More modern browsers even allow for more complex media tests such as testing the width of the viewport.
There are three parts to the scripting that you need to do this.
For example if we want to load screen800.js when the media query "screen and (max-width:800px)" is supported by the browser then all we need to call to do this is to use the following with the first two functions:
if (isMedia("screen and (max-width:800px)")
Simply repeat that code substituting the desired queries and the names of the scripts to include to dynamically include whatever scripts you want with whatever media queries you want.