var scriptLoad = {
    library: 'effects,Accordion,SlideNav,BannerShow,grmscript,calendar,swfobject,skoda,nav', //preload library

    require: function(libraryName) {
        // inserting via DOM fails in Safari 2.0, so brute force approach
        document.write('\n\t<script type="text/javascript" src="' + libraryName + '"></script>');

    },

    load: function() {
        if (
			(typeof Prototype == 'undefined') ||
			(typeof Element == 'undefined') ||
			(typeof Element.Methods == 'undefined') ||
			parseFloat(Prototype.Version.split(".")[0] + "." + Prototype.Version.split(".")[1]) < 1.5
		)
            throw ("scriptLoad requires the Prototype JavaScript framework >= 1.5.0");

        $A(document.getElementsByTagName("script")).findAll(function(s) {
            return (s.src && s.src.match(/scriptload\.js(\?.*)?$/))
        }).each(function(s) {
            var path = s.src.replace(/scriptload\.js(\?.*)?$/, '');
            var includes = s.src.match(/\?.*load=([a-z,]*)/);
            (includes ? includes[1] : scriptLoad.library).split(',').each(function(include) {

                scriptLoad.require(path + include + '.js')
            });
        });
    }
}

scriptLoad.load();