// Helper Layer - view / model / contoller helpers and snippets scope

var Util = new Class({
	initialize: function(){
		window.util = this;
	},
	
	random: function(max) {
		return ((Math.random()*100)*max/100).toInt();
	},
	
	callLater: function(func, wait) {
		func.delay(wait);
	},
	
	startLater: function(fx, startVal, wait) {
		var clos = function() {
			fx.start(startVal);
		}.delay(wait);
	},
	
	setCallback: function(component, func, scope) {
		component.callBack = func;
		component.callBackThis = scope;
	},
	
	clearCallback: function(component) {
		component.callBack, component.callBackThis = null;
	}
});

window.loadedAssetLength +=1;