var ELO = {
	loaded : false,
	timer : null,
	functionsToCallOnload : [], 
	init : function (){
		if(ELO.loaded) return;
		ELO.loaded = true;
		ELO.load();
	},
	
	load : function (){
		if(this.timer){
			clearInterval(this.timer);
		}
		for(var i=0; i<this.functionsToCallOnload.length; i++){
			try{
				eval(this.functionsToCallOnload[i]);
			}
			catch(e){
				
			}
		}
	}
};

if (document.addEventListener) {
	document.addEventListener("DOMContentLoaded", ELO.init, false);
}

if(navigator.userAgent.search(/WebKit/i) != -1){
    ELO.timer = setInterval(function (){
		if(document.readyState.search(/loaded|complete/i) != -1) {
			ELO.init();
		}
	}, 10);
}

window.onload = ELO.init;
