/*
	INIT QUEUE
	
	(c) Copyright 2003 - Ruben Daniëls, Virtual Cowboys C.V.
*/

InitQueue = {
	queue : [],
	
	add : function(func, o){
		if(this.inited) func.call(o);
		else if(func) this.queue.push([func, o]);
	},
	
	Init : function(){
		this.inited = true;

		for(var i=0;i<this.queue.length;i++){
			this.queue[i][0].call(this.queue[i][1]);
		}
	}
}

window.onload = function(){
	InitQueue.Init();
}