var HsEtuLoader=function(a){this.data={domain:"",path:"",ssl:false,timeout:10,load_timeout:10,uncompressed:false};if(a&&(typeof a==="object")){if(a.domain){this.data.domain=a.domain}if(a.path){this.data.path=a.path}if(a.ssl){this.data.ssl=true}if(a.timeout&&typeof a.timeout==="number"&&a.timeout>0){this.data.timeout=a.timeout}if(a.load_timeout&&typeof a.load_timeout==="number"&&a.load_timeout>=100){this.data.load_timeout=a.load_timeout}if(a.uncompressed&&typeof a.uncompressed==="boolean"){this.data.uncompressed=a.uncompressed}}};HsEtuLoader.scripts=["HsEtuTools.js","HsEtuOp.js","HsEtuException.js","HsEtuCatalog.js","HsEtuBase.js","HsEtuHandler.js","HsEtuBase/HsEtuAddress.js","HsEtuBase/HsEtuBuilding.js","HsEtuBase/HsEtuConsumption.js","HsEtuBase/HsEtuContact.js","HsEtuBase/HsEtuDevice.js","HsEtuBase/HsEtuDeviceUnit.js","HsEtuBase/HsEtuElement.js","HsEtuBase/HsEtuEnergySource.js","HsEtuBase/HsEtuInsulation.js","HsEtuBase/HsEtuInvestmentCosts.js","HsEtuBase/HsEtuPlant.js","HsEtuBase/HsEtuReference.js","HsEtuBase/HsEtuRoom.js","HsEtuBase/HsEtuStock.js","HsEtuBase/HsEtuStorey.js","HsEtuBase/HsEtuDevice/HsEtuHeatingDevice.js","HsEtuBase/HsEtuDevice/HsEtuPump.js","HsEtuBase/HsEtuDevice/HsEtuStorage.js","HsEtuBase/HsEtuDevice/HsEtuVentilation.js","HsEtuBase/HsEtuDevice/HsEtuHeatingDevice/HsEtuFlowHeater.js","HsEtuBase/HsEtuDevice/HsEtuHeatingDevice/HsEtuHeatingBoiler.js","HsEtuBase/HsEtuDevice/HsEtuHeatingDevice/HsEtuHeatingBurner.js","HsEtuBase/HsEtuDevice/HsEtuHeatingDevice/HsEtuStorageHeater.js","HsEtuBase/HsEtuElement/HsEtuWall.js","HsEtuBase/HsEtuElement/HsEtuWindow.js","HsEtuBase/HsEtuEnergySource/HsEtuFuel.js","HsEtuBase/HsEtuEnergySource/HsEtuFuel/HsEtuFireWood.js","HsEtuBase/HsEtuEnergySource/HsEtuFuel/HsEtuHeatingOil.js","HsEtuBase/HsEtuEnergySource/HsEtuFuel/HsEtuNaturalGas.js","HsEtuBase/HsEtuEnergySource/HsEtuSolarPower.js","HsEtuBase/HsEtuReference/HsEtuStoreyWall.js","HsEtuTest.js","HsEtuTestBase.js","HsEtuTest/HsEtuAPITest.js","HsEtuTest/HsEtuDemandTest.js","HsEtuTest/HsEtuConsumptionTest.js"];HsEtuLoader.compressed_scripts=["HsEtuCompressed.js"];HsEtuLoader.prototype.currentIndex=0;HsEtuLoader.prototype.load=function(){this.initEvents();this.loadFile()};HsEtuLoader.prototype.initEvents=function(){var a=this;jQuery(document).bind("File.Loaded.HsEtuEvent",function(){a.currentIndex++;a.loadFile()})};HsEtuLoader.prototype.loadFile=function(){var d=this;if(d.currentIndex<(this.data.uncompressed?HsEtuLoader.scripts:HsEtuLoader.compressed_scripts).length){var c=(this.data.uncompressed?HsEtuLoader.scripts:HsEtuLoader.compressed_scripts)[d.currentIndex];var b=d.getURL(c);var e=function(g,h){var f=function(){jQuery(document).trigger("File.Loaded.HsEtuEvent")};setTimeout(f,d.data.timeout)};jQuery.getScript(b,e)}else{d.currentIndex=0;var a=function(){jQuery(document).trigger("Loaded.HsEtuEvent")};setTimeout(a,d.data.load_timeout)}};HsEtuLoader.prototype.getURL=function(a){return"http"+(this.data.ssl?"s":"")+"://"+this.data.domain+this.data.path+"/"+a};
