/**
 * Read XMLFile
 * Reads any XML file
 * 
 * Version 1.0
 * Created 08/03/2010
 *
 * Author: henworx-ASA 
 *
 */

JSONReader=function(){
	this.readFor;
	this.callerObject
	this.read=function(jsonFile,objectRef,readFor){
	_this=this
			this.callerObject=objectRef;
			this.readFor=readFor;
			jQuery.ajax({
				url: jsonFile,
				dataType: 'json',
				success: _this.sendBack,
				async:false
			});
			
	}

		this.sendBack=function(data){
				_callerObj=_this.callerObject;
				_callerObj.afterJSONRead(data,_this.readFor)
			
		}
}
