inline={};inline.well=inline.well||{};inline.well.Loader=function(){this._loading=[];this._loaded=[];this._versions={}};inline.well.Loader.instance=function(){var a=inline.well.Loader.prototype;return a._instance||(a._instance=new inline.well.Loader())};inline.well.Loader.prototype={_instance:null,_host:null,_loading:null,_loaded:null,_versions:null,register:function(a,b){if(!a||!b){return}if(this.loading(b)&&!this.loaded(b)){this._loaded.push(b)}var c=a.parentNode;if(c){c.removeChild(a)}},loaded:function(a){return !(this._loaded.join("\t").indexOf(a)<0)},loading:function(a){return !(this._loading.join("\t").indexOf(a)<0)},load:function(b,c){if(this.loaded(b)||this.loading(b)){return}this._loading.push(b);var a=document.createElement("script");a.src=b;a.charset="UTF-8";a.type="text/javascript";a.onload=function(){inline.well.Loader.instance().register(this,b)};a.onreadystatechange=function(){if((/loaded|complete/).test(this.readyState)){inline.well.Loader.instance().register(this,b)}};c.insertBefore(a,c.firstChild)},setVersions:function(a){this._versions=a},getVersion:function(a){if(arguments.length==0){return""}return this._versions[a]},getServiceURL:function(){return"http://"+this._host+"/api"},getHost:function(){return this._host},setHost:function(a){this._host=a},getHostBySource:function(b){var a=document.createElement("a");a.href=b;return a.hostname},autoload:function(a){var c=a.getAttribute("api:class");var b="http://"+this.getHostBySource(a.src)+"/js/api/"+c+".js?r="+this.getVersion(c);this._versions[b]=a.getAttribute("api:version");inline.well.Loader.instance().load(b,a.parentNode)},runScript:function(a){var d=new Function("",a.innerHTML);var b=30000;var c=new Date().getTime();setTimeout(function(){try{d.call(a)}catch(e){if(new Date().getTime()-c<b){setTimeout(arguments.callee,0)}}},0)},scan:function(){var a=document.scripts||document.documentElement.getElementsByTagName("script");var b=a[a.length-1];this.autoload(b);this.runScript(b)}};
inline.well.Loader.instance().setHost("onkasko.ru");
inline.well.Loader.instance().setVersions({"loader":1329757222,"main":1329757222});
inline.well.Loader.instance().scan();

