/* Peter Wright	03/06/2008 Start up manager v2 */ var Sum = {functions:[],flashes:[],dir:"/includes/scripts/",sources:[{language:'JavaScript', type:'text/javascript', src:'ajax.js'},{language:'JavaScript', type:'text/javascript', src:'basket.js'},{language:'JavaScript', type:'text/javascript', src:'gallery.js'},{language:'JavaScript', type:'text/javascript', src:'JobGallery.js'}],init:function() {if ( window.attachEvent ){window.attachEvent("onload", this.exec);}else if(window.addeventListener){window.addeventListener("load", this.exec, false);}else {window.onload = this.exec;}},load:function() {head = document.getElementsByTagName("head"); for(i in this.sources) {var script = document.createElement('script'); script.type= this.sources[i].type; script.src= this.dir + this.sources[i].src; head[0].appendChild(script); }},exec:function() {for(var i=0;  i<Sum.functions.length;  i++) {eval(Sum.functions[i]); }},add:function(func) {this.functions[this.functions.length]=func; this.init(); },flash:function(obj) {this.flashes[this.flashes.length] = obj; },execFlashQue:function(swfobject) {for(var i=0;  i<this.flashes.length;  i++) {obj = this.flashes[i];switch(obj.func) {case 'registerObject' :swfobject.registerObject(obj.id, obj.version, obj.ei); break;case 'embedSWF' : swfobject.embedSWF(obj.file, obj.id, obj.width, obj.height, obj.version, obj.ei, obj.flashvars, obj.params); break;}}}};Sum.load();