jslt.OnLoadQueue=function(){
	this.calledOnLoad=false
		//TODO Zrobić napsisywanie przez id
		this.onLoadFunctions=[]	
		window.thisOnLoadQueue=this
		window.onload=function(){
			window.thisOnLoadQueue.onLoadActions.call(window.thisOnLoadQueue)
		}
	this.onLoadActions=function(){
		this.calledOnLoad=true
		for(var i=0;i<this.onLoadFunctions.length;i++){
			this.onLoadFunctions[i].call(window)
		}
	}
	this.appendOnLoad=function(fun,id){
		if(this.calledOnLoad){
			tracer.instance.trace("calledOnLoad")
			fun.call(window)
		}else{
			this.onLoadFunctions.push(fun)
		}
		
	}

}
onLoadQueue=new jslt.OnLoadQueue()