var ScriptLoader = function(param_path , param_callback){
	this.path = param_path;
	this.callback = param_callback;
	this.data;	
};


ScriptLoader.prototype ={
		
	load:function(){
	
		var current = this;
		var head = document.getElementsByTagName('head')[0];	
		this.data = document.createElement('script');
		this.data.type = 'text/javascript';
		this.data.src = this.path;
		
		// most browsers
		this.data.onload = current.callback;
		
		// IE 6 & 7
		this.data.onreadystatechange = function() {
			if (this.readyState == 'complete') 
				current.callback();
		}

		head.appendChild(this.data);
	},
	
	
	getLoadedData:function(){
		return this.data;
	}
		
};
