// Either embed this funtion in the <head>, or load it from an external file.
// <body onload="set_iframe_source();">
function set_iframe_source() {
    var args = new Object(  );
    // Get query string
    var query = location.search.substring(1);     
    
    if (query == "") {
        document.getElementById('books_frame').src = "http://www.jsworldwide.com/books/illo_feed.html";
    }
    else {
        // Break at ampersand, in case there are other parameters
        var pairs = query.split("&");
        for(var i = 0; i < pairs.length; i++) {
            // Look for "name=value"
            var pos = pairs[i].indexOf('=');
            // If not found, skip
            if (pos == -1) continue;
            // Extract the name
            var argname = pairs[i].substring(0,pos);
            // Extract the value
            var value = pairs[i].substring(pos+1);
            // Store as a property
            args[argname] = unescape(value);
        }
        document.getElementById('books_frame').src = args["iframe_source"];
    }
    alert(getElementById('books_frame').src);
}