/**
 * JScript Loader
 *
 * Load all needed scripts. subsetting is possible by providing ?load=<scriptname>
 * Since we use prototype, wich itself tries to load scripts by ?load=, we have to eliminate this
 * in the scriptaculous.js source-code. see 'scriptaculous.js'.
 *
 * @version 1.00
 * @author C. Dölling
 *
 */

var allscripts = "prototype,core,effects,scriptaculous,finanzierungsrechner,tooltip";
var scripts = document.getElementsByTagName("script")[0].src;
var path = scripts.replace(/script\.js(\?.*)?$/,'');
var includes = scripts.match(/\?.*load=([a-z_,]*)/);
var incall = includes ? includes[1].match(/all([a-z,_]*)/) : null;
if ( incall ) includes[1] = allscripts + incall[1];
allscripts = (includes ? includes[1] : allscripts).split(",");
for ( var i=0; i< allscripts.length; i++ )
	document.write("<script src='" + path + allscripts[i] + ".js' type='text/javascript'></script>");