xmlhttp=false;
pid = '0';
checkAlways = false;
modelController = null;

function createRequestObject() {
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	 try {
	  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	 } catch (e) {
	  try {
	   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch (E) {
	   xmlhttp = false;
	  }
	 }
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp=false;
		}
	}
	if (!xmlhttp && window.createRequest) {
		try {
			xmlhttp = window.createRequest();
		} catch (e) {
			xmlhttp=false;
		}
	}
}

function XMLHttpRequestCallback(obj, func) {
	return function() {
		/*alert(xmlhttp.readyState);*/
		if(xmlhttp.readyState != 4) return;
		/*alert("hello world!");*/
		func.call(obj, xmlhttp.responseText);
	}
}

function sendRequest(obj, callback, method, path, async, data) {
	if(xmlhttp == false)
		createRequestObject();
	if(xmlhttp == false)
		alert("Could not create AJAX request.");
	else {
		/*async = false;*/
		xmlhttp.onreadystatechange = XMLHttpRequestCallback(obj, callback);
		xmlhttp.open(method, path, async);
		xmlhttp.send(data);
		/*if(async===false) callback.call(obj, xmlhttp.responseText);*/
	}
	return false;
}

function OM_Callback(obj, func) {
	this.obj = obj;
	this.func = func;
	this.doCallback = function(sender, data) {
		this.func.call(this.obj, sender, data);
	}
}

function OM_URIDecompressor(ns) {
	this.base_uris = ns;
	this.decompressURI = function(uri) {
		var c = uri.charAt(0);
		if(c >= '0' && c <= '9') {
			var num = parseInt(uri.substring(0, uri.lastIndexOf('#')));
			var res = this.base_uris[num] + uri.substring(uri.lastIndexOf('#'));
			return res;
		}
		return uri;
	}
}

function OM_ModelClass(uri, label) {
	this.uri = uri;
	this.label = label;
	this.type = 'OM_ModelClass';
	this.iscached = false;
	this.properties = [];
	this.propvalues = [];
	this.hasProperty = function(uri) {
		if(typeof(uri)!="string") return uri;
		for(var i=0;i<properties.length;i++)
			if(this.properties[i][0] == uri)
				return i;
		return false;
	}
	this.addProperty = function(uri, label) {
		var index = this.hasProperty(uri);
		if(!(index===false)) return index;
		return properties.push(new Array(uri, label))-1;
	}
	this.addPropertyValue = function(prop_uri, insturi, instlabel, isdata) {
		var index = this.hasProperty(uri);
		if(index===false) return false;
		if(this.propvalues[index]===undefined) this.propvalues[index] = [];
		return this.propvalues[index].push(new Array(insturi, instlabel, isdata))-1;
	}
	this.getPropertyValues = function(uri) {
		var index;
		index = this.hasProperty(uri);
		if(index===false) return undefined;
		return this.propvalues[index];
	}
	this.setPropertyValues = function(uri, values) {
		var index = this.hasProperty(uri);
		if(index===false) return false;
		propvalues[index] = values;
		return true;
	}
	this.supers = [];
	this.subs = [];
	this.instances = [];
	this.clearSupers = function() { this.supers = []; }
	this.addSuper = function(uri, label) { return this.supers.push(new Array(uri, label))-1; }
	this.getSupers = function() { return this.supers; }
	this.clearSubs = function() { this.subs = []; }
	this.addSub = function(uri, label) { return this.subs.push(new Array(uri, label))-1; }
	this.getSubs = function() { return this.subs; }
	this.clearInstances = function() { this.instances = []; }
	this.addInstance = function(uri, label) { return this.instances.push(new Array(uri, label))-1; }
	this.getInstances = function() { return this.instances; }
	this.parseRequest = function(res) {
		if(res === undefined) return "A fatal error occurred.";
		while(res.charAt(res.length-1)=='\0' || res.charAt(res.length-1)=='\n')
			res = res.substring(0, res.length-1);
		var components = res.split("|");
		var result = components[0].split("=");
		if(result[0] == "ERROR") return result[1];
		this.clearSupers();
		this.clearSubs();
		this.clearInstances();
		for(i=1;i<components.length;i++) {
			var component = components[i].split("=");
			var objects = component[1].split(",");
			for(j=0;j<objects.length;j++) {
				if(-1<objects[j].search(/::/)) {
					object = objects[j].split("::");
					if(component[0] == "SUPERS")
						this.addSuper(object[0], object[1]);
					else if(component[0] == "SUBS")
						this.addSub(object[0], object[1]);
					else if(component[0] == "INSTANCES")
						this.addInstance(object[0], object[1]);
				}
			}
		}
		return false;
	}
}

function OM_ModelClassList(res) {
	this.success = false;
	this.error = "The server did not respond in a timely fashion.";
	this.entry = [];
	this.length = 0;
	this.addClass = function(uri, label) { return this.entry.push(new OM_ModelClass(uri, label)); }
	this.getClass = function(i) { return this.entry[i]; }
	this.getClassInfoCallback = null;
	this.getClassInfo = function(i,callback) {
		if(this.entry[i] === undefined) {
			callback.doCallback(this, undefined);
		}
		else if(this.entry[i].iscached === false) {
			this.getClassInfoCallback = callback;
			var temp = function(text) {
				var result = this.entry[i].parseRequest(text);
				if(result === false) {
					if(checkAlways == false) this.entry[i].iscached = true;
					this.getClassInfoCallback.doCallback(this, this.entry[i]);
				}
				else this.getClassInfoCallback.doCallback(this, result);
			}
			sendRequest(this, temp, "GET", "getClassInfo.php?uri=" + URIencode(this.entry[i].uri) + "&pid=" + modelController.pid, true, "");
		}
		else {
			callback.doCallback(this, this.entry[i]);
		}
	}
	if(res === undefined) return;
	while(res.charAt(res.length-1)=='\0' || res.charAt(res.length-1)=='\n')
		res = res.substring(0, res.length-1);
	var components = res.split("|");
	var result = components[0].split("=");
	this.error = result[1];
	if(result[0] == "ERROR") return;
	this.success = true;
	var decomp = false;
	for(var i=1;i<components.length;i++) {
		var component = components[i].split("=");
		var objects = component[1].split(",");
		if(component[0] == "NS")
			decomp = new OM_URIDecompressor(objects);
		else for(j=0;j<objects.length;j++) {
			if(-1<objects[j].search(/::/)) {
				object = objects[j].split("::");
				if(component[0] == "DATA")
					this.addClass((decomp ? decomp.decompressURI(object[0]) : object[0]), object[1]);
			}
		}
	}
	this.length = this.entry.length;
}

function OM_ModelProperty(uri, label) {
	this.uri = uri;
	this.label = label;
	this.type = 'OM_ModelProperty';
	this.proptype = "";
	this.iscached = false;
	this.properties = [];
	this.propvalues = [];
	this.hasProperty = function(uri) {
		if(typeof(uri)!="string") return uri;
		for(var i=0;i<properties.length;i++)
			if(this.properties[i][0] == uri)
				return i;
		return false;
	}
	this.addProperty = function(uri, label) {
		var index = this.hasProperty(uri);
		if(!(index===false)) return index;
		return properties.push(new Array(uri, label))-1;
	}
	this.addPropertyValue = function(prop_uri, insturi, instlabel, isdata) {
		var index = this.hasProperty(uri);
		if(index===false) return false;
		if(this.propvalues[index]===undefined) this.propvalues[index] = [];
		return this.propvalues[index].push(new Array(insturi, instlabel, isdata))-1;
	}
	this.getPropertyValues = function(uri) {
		var index;
		index = this.hasProperty(uri);
		if(index===false) return undefined;
		return this.propvalues[index];
	}
	this.setPropertyValues = function(uri, values) {
		var index = this.hasProperty(uri);
		if(index===false) return false;
		propvalues[index] = values;
		return true;
	}
	this.supers = [];
	this.subs = [];
	this.domain = "<i>Any</i>";
	this.range = "<i>Any</i>";
	this.inverse = "<i>None</i>";
	this.extras = [];
	this.clearSupers = function() { this.supers = []; }
	this.addSuper = function(uri, label) { return this.supers.push(new Array(uri, label))-1; }
	this.getSupers = function() { return this.supers; }
	this.clearSubs = function() { this.subs = []; }
	this.addSub = function(uri, label) { return this.subs.push(new Array(uri, label))-1; }
	this.getSubs = function() { return this.subs; }
	this.clearDomain = function() { this.domain = "<i>Any</i>"; }
	this.setDomain = function(uri, label) { this.domain = new Array(uri, label); }
	this.getDomain = function() { return this.domain; }
	this.clearRange = function() { this.range = "<i>Any</i>"; }
	this.setRange = function(uri, label) { this.range = new Array(uri, label); }
	this.getRange = function() { return this.range; }
	this.clearInverse = function() { this.inverse = "<i>None</i>"; }
	this.setInverse = function(uri, label) { this.inverse = new Array(uri, label); }
	this.getInverse = function() { return this.extras; }
	this.clearExtras = function() { this.extras = []; }
	this.addExtra = function(extra) { this.extras.push(extra); }
	this.getExtras = function() { return this.extras; }
	this.parseRequest = function(res) {
		if(res === undefined) return "A fatal error occurred.";
		while(res.charAt(res.length-1)=='\0' || res.charAt(res.length-1)=='\n')
			res = res.substring(0, res.length-1);
		var components = res.split("|");
		var result = components[0].split("=");
		if(result[0] == "ERROR") return result[1];
		this.clearSupers();
		this.clearSubs();
		this.clearDomain();
		this.clearRange();
		this.clearExtras();
		for(i=1;i<components.length;i++) {
			var component = components[i].split("=");
			if(component[0] == "TYPE") {
				this.proptype = component[1];
				continue;
			}
			var objects = component[1].split(",");
			for(j=0;j<objects.length;j++) {
				if(-1<objects[j].search(/::/)) {
					object = objects[j].split("::");
					if(component[0] == "SUPERS")
						this.addSuper(object[0], object[1]);
					else if(component[0] == "SUBS")
						this.addSub(object[0], object[1]);
					else if(component[0] == "DOMAIN")
						this.setDomain(object[0], object[1]);
					else if(component[0] == "RANGE")
						this.setRange(object[0], object[1]);
					else if(component[0] == "INVERSEOF")
						this.setInverse(object[0], object[1]);
					else if(component[0] == "EXTRAS")
						this.addExtra(object[0], object[1]);
				}
				else {
					if(component[0] == "DOMAIN")
						this.domain = component[1];
					else if(component[0] == "RANGE")
						this.range = component[1];
					else if(component[0] == "INVERSEOF")
						this.inverse = component[1];
				}
			}
		}
		return false;
	}
}

function OM_ModelPropertyList(res) {
	this.success = false;
	this.error = "The server did not respond in a timely fashion.";
	this.entry = [];
	this.length = 0;
	this.addProperty = function(uri, label) { return this.entry.push(new OM_ModelProperty(uri, label)); }
	this.getProperty = function(i) { return this.entry[i]; }
	this.getPropertyInfoCallback = null;
	this.getPropertyInfo = function(i,callback) {
		if(this.entry[i] === undefined) {
			callback.doCallback(this, undefined);
		}
		else if(this.entry[i].iscached === false) {
			this.getPropertyInfoCallback = callback;
			var temp = function(text) {
				var result = this.entry[i].parseRequest(text);
				if(result === false) {
					if(checkAlways == false) this.entry[i].iscached = true;
					this.getPropertyInfoCallback.doCallback(this, this.entry[i]);
				}
				else this.getPropertyInfoCallback.doCallback(result);
			}
			sendRequest(this, temp, "GET", "getPropertyInfo.php?uri=" + URIencode(this.entry[i].uri) + "&pid=" + modelController.pid, true, "");
		}
		else {
			callback.doCallback(this, this.entry[i]);
		}
	}
	if(res === undefined) return;
	while(res.charAt(res.length-1)=='\0' || res.charAt(res.length-1)=='\n')
		res = res.substring(0, res.length-1);
	var components = res.split("|");
	var result = components[0].split("=");
	this.error = result[1];
	if(result[0] == "ERROR") return;
	this.success = true;
	this.decomp = false;
	for(var i=1;i<components.length;i++) {
		var component = components[i].split("=");
		var objects = component[1].split(",");
		if(component[0] == "NS")
			decomp = new OM_URIDecompressor(objects);
		else for(j=0;j<objects.length;j++) {
			if(-1<objects[j].search(/::/)) {
				object = objects[j].split("::");
				if(component[0] == "DATA")
					this.addProperty((decomp ? decomp.decompressURI(object[0]) : object[0]), object[1]);
			}
		}
	}
	this.length = this.entry.length;
}

function OM_ModelIndividual(uri, label, typeuri, typelabel) {
	this.uri = uri;
	this.label = label;
	this.typeuri = typeuri;
	this.typelabel = typelabel;
	this.type = 'OM_ModelIndividual';
	this.iscached = false;
	this.properties = [];
	this.propvalues = [];
	this.hasProperty = function(uri) {
		if(typeof(uri)!="string") return uri;
		for(var i=0;i<this.properties.length;i++)
			if(this.properties[i][0] == uri)
				return i;
		return false;
	}
	this.clearProperties = function() {
		this.properties = [];
		this.propvalues = [];
	}
	this.addProperty = function(uri, label) {
		var index = this.hasProperty(uri);
		if(!(index===false)) return index;
		return this.properties.push(new Array(uri, label))-1;
	}
	this.addPropertyValue = function(prop_uri, insturi, instlabel, isdata) {
		var index = this.hasProperty(prop_uri);
		if(index===false) return false;
		if(this.propvalues[index]===undefined) this.propvalues[index] = [];
		return this.propvalues[index].push(new Array(insturi, instlabel, isdata))-1;
	}
	this.getPropertyByIndex = function(index) {
		return this.properties[index];
	}
	this.getPropertyValues = function(uri) {
		var index;
		index = this.hasProperty(uri);
		if(index===false) return undefined;
		return this.propvalues[index];
	}
	this.getPropertyValuesByIndex = function(index) {
		return this.propvalues[index];
	}
	this.setPropertyValues = function(uri, values) {
		var index = this.hasProperty(uri);
		if(index===false) return false;
		this.propvalues[index] = values;
		return true;
	}
	this.parseRequest = function(res) {
		if(res === undefined) return "A fatal error occurred.";
		while(res.charAt(res.length-1)=='\0' || res.charAt(res.length-1)=='\n')
			res = res.substring(0, res.length-1);
		var components = res.split("|");
		var result = components[0].split("=");
		if(result[0] == "ERROR") return result[1];
		this.clearProperties();
		for(i=1;i<components.length;i++) {
			var component = components[i].split("=");
			var objects = component[1].split(",");
			for(j=0;j<objects.length;j++) {
				if(-1<objects[j].search(/::/)) {
					var object = objects[j].split("::");
					if(component[0] == "Properties") {
						var index = this.hasProperty(object[0]);
						if(index === false) index = this.addProperty(object[0], object[1]);
						this.addPropertyValue(index, object[2], object[3], object[4]);
					}
				}
			}
		}
		return false;
	}
}

function OM_ModelIndividualList(res) {
	/*alert(res);
	alert(res.length);*/
	this.success = false;
	this.error = "The server did not respond in a timely fashion.";
	this.entry = [];
	this.length = 0;
	this.addIndividual = function(uri, label, typeuri, typelabel) { return this.entry.push(new OM_ModelIndividual(uri, label, typeuri, typelabel)); }
	this.getIndividual = function(i) { return this.entry[i]; }
	this.getIndividualInfoCallback = null;
	this.getIndividualInfo = function(i,callback) {
		if(this.entry[i] === undefined) {
			callback.doCallback(this, undefined);
		}
		else if(this.entry[i].iscached === false) {
			this.getIndividualInfoCallback = callback;
			var temp = function(text) {
				var result = this.entry[i].parseRequest(text);
				if(result === false) {
					if(checkAlways == false) this.entry[i].iscached = true;
					this.getIndividualInfoCallback.doCallback(this, this.entry[i]);
				}
				else this.getIndividualInfoCallback.doCallback(this, result);
			}
			sendRequest(this, temp, "GET", "getIndividualInfo.php?uri=" + URIencode(this.entry[i].uri) + "&pid=" + modelController.pid, true, "");
		}
		else {
			callback.doCallback(this, this.entry[i]);
		}
	}
	if(res === undefined) return;
	while(res.charAt(res.length-1)=='\0' || res.charAt(res.length-1)=='\n')
		res = res.substring(0, res.length-1);
	var components = res.split("|");
	var result = components[0].split("=");
	this.error = result[1];
	if(result[0] == "ERROR") return;
	this.success = true;
	this.decomp = false;
	for(var i=1;i<components.length;i++) {
		var component = components[i].split("=");
		var objects = component[1].split(",");
		if(component[0] == "NS")
			decomp = new OM_URIDecompressor(objects);
		else for(j=0;j<objects.length;j++) {
			if(-1<objects[j].search(/::/)) {
				object = objects[j].split("::");
				if(component[0] == "DATA") {
					/*alert("URI: " + object[0] + 
					      "\nLabel: " + object[1] + 
					      "\nTypeURI: " + object[2] + 
					      "\nTypeLabel: " + object[3]);*/
					this.addIndividual((decomp ? decomp.decompressURI(object[0]) : object[0]), object[1],
									   (decomp ? decomp.decompressURI(object[2]) : object[2]), object[3]);
				}
			}
		}
	}
	this.length = this.entry.length;
}

function OM_ModelOntologyInfo(res) {
	this.success = false;
	this.error = "The server did not respond in a timely fashion.";
	this.classcount = 0;
	this.datapropcount = 0;
	this.objpropcount = 0;
	this.instcount = 0;
	this.invalid = false;
	while(res.charAt(res.length-1) == '\0' || res.charAt(res.length-1)=='\n')
		res = res.substring(0, res.length-1);
	var components = res.split("|");
	var result = components[0].split("=");
	this.error = result[1];
	if(result[0] == "ERROR") return;
	this.success = true;
	for(var i=1;i<components.length;i++) {
		var component = components[i].split("=");
		if(component[0] == "ClassCount")
			this.classcount = parseInt(component[1]);
		else if(component[0] == "DataPropertyCount")
			this.datapropcount = parseInt(component[1]);
		else if(component[0] == "ObjectPropertyCount")
			this.objpropcount = parseInt(component[1]);
		else if(component[0] == "IndividualPropertyCount")
			this.instcount = parseInt(component[1]);
		else if(component[0] == "InvalidAfterAdd")
			if(component[1] == "true") this.invalid = true;
	}
}

function OM_ModelOntology() {
	this.uri = "";
	this.info = null;
	this.oid = 0;
	this.getInfoCallback = null;
	this.getInfo = function(callback) {
		if(this.info == null) {
			sendRequest(this, function(text) { }, "GET", "getOntologyInfo.php?pid=" + modelController.pid + "&oid=" + this.oid, false, "");
			this.info = new OM_ModelOntologyInfo(xmlhttp.responseText);
			callback.doCallback(this, this.info);
		}
		else {
			callback.doCallback(this, this.info);
		}
	}
}

function OM_ModelOntologyManager() {
	this.ontologies = [];
	this.curoid = 1;
	this.ontcount = 0;
	this.loadOntologyCallback = null;
	this.loadOntology = function(uri, name, callback) {
		this.loadOntologyCallback = callback;
		var myoid = this.curoid;
		this.curoid++;
		var url = "loadOntology.php?oid=" + myoid + "&name=" + name + "&pid=" + modelController.pid + "&uri=" + URIencode(uri);
		var temp = function(text) {
			var res = new RequestResults(text);
			if(!res.success) {
				this.loadOntologyCallback.doCallback(this, res.error);
				return;
			}
			this.ontologies[this.ontcount] = new OM_ModelOntology();
			this.ontologies[this.ontcount].uri = res.getComponent("URI")[0];
			this.ontologies[this.ontcount].oid = myoid;
			this.ontcount++;
			modelController.resetCaching();
			this.loadOntologyCallback.doCallback(this, this.ontologies[this.ontcount-1]);
		}
		sendRequest(this, temp, "GET", url, true, "");
	}
	this.removeOntologyCallback = null;
	this.removeOntology = function(oid, callback) {
		this.removeOntologyCallback = callback;
		var temp = function(text) {
			var res = new RequestResults(text);
			if(!res.success) {
				this.removeOntologyCallback.doCallback(this, res.error);
				return;
			}
			for(var i=0;i<this.ontcount;i++) {
				if(this.ontologies[i].oid == oid) {
					for(var j=i+i;j<this.ontcount;i++,j++) {
						this.ontologies[i] = this.ontologies[j];
					}
					this.ontologies[this.ontcount-1] = undefined;
					this.ontcount--;
					modelController.resetCaching();
					this.removeOntologyCallback.doCallback(this, null);
				}
			}
		}
		sendRequest(this, temp, "GET", "removeOntology.php?pid=" + modelController.pid + "&oid=" + oid, false, "");
	}
	this.getOntologyCount = function() { return this.ontologies.length; }
	this.getOntology = function(index) { return this.ontologies[index]; }
	this.getOntologyById = function(index) {
		for(var i=0;i<this.ontologies.length;i++)
			if(index == this.ontologies[i].oid)
				return this.ontologies[i];
		return undefined;
	}
}

function OM_ModelController() {
	this.pid = '0';
	this.getPID = function() { return this.pid; }
	this.initializeCallback = null;
	this.initialize = function(callback) {
		this.initializeCallback = callback;
		var temp = function(text) {
			var res = new RequestResults(text);
			if(!res.success) {
				this.initializeCallback.doCallback(this, res);
				return;
			}
			this.pid = res.getComponent("PID")[0];
			/*alert(this.pid);*/
			this.initializeCallback.doCallback(this, res);
		}
		sendRequest(this, temp, "GET", "startProcess.php", true);
	}
	this.ontologyManager = new OM_ModelOntologyManager();
	this.classList = null;
	this.propertyList = null;
	this.individualList = null;
	this.resetCaching = function() {
		this.classList = null;
		this.propertiesList = null;
		this.individualList = null;
	}
	this.getClassListCallback = null;
	this.getClassList = function(callback) {
		if(checkAlways || this.classList == null) {
			this.getClassListCallback = callback;
			var temp = function(text) {
				xmlhttp.onreadystatechange = null;
				this.classList = new OM_ModelClassList(text);
				this.getClassListCallback.doCallback(this, this.classList);
			}
			sendRequest(this, temp, "GET", "listClasses.php?pid=" + this.pid, false, "");
		}
		else callback.doCallback(this, this.classList);
	}
	this.getPropertyListCallback = null;
	this.getPropertyList = function(callback) {
		if(checkAlways || this.propertyList == null) {
			this.getPropertyListCallback = callback;
			var temp = function(text) {
				this.propertyList = new OM_ModelPropertyList(text);
				this.getPropertyListCallback.doCallback(this, this.propertyList);
			}
			sendRequest(this, temp, "GET", "listProperties.php?pid=" + this.pid, false, "");
		}
		else callback.doCallback(this, this.propertyList);
	}
	this.getIndividualListCallback = null;
	this.getIndividualList = function(callback) {
		if(checkAlways || this.individualList == null) {
			this.getIndividualListCallback = callback;
			var temp = function(text) {
				this.individualList = new OM_ModelIndividualList(text);
				this.getIndividualListCallback.doCallback(this, this.individualList);
			}
			sendRequest(this, temp, "GET", "listIndividuals.php?pid=" + this.pid, false, "");
		}
		else callback.doCallback(this, this.individualList);
	}
}

function RequestResults(res) {
	while(res.charAt(res.length-1)=='\0' || res.charAt(res.length-1)=='\n')
		res = res.substring(0, res.length-1);
	this.success = false;
	this.error = "The server did not respond in a timely fashion.";
	this.information = [["ERROR", ["The server did not respond in a timely fashion."]]];
	this.getComponent = function(cmp) {
		for(i=0;i<this.information.length;i++) {
			if(this.information[i][0].toUpperCase() == cmp.toUpperCase())
				return this.information[i][1];
		}
	}
	if(res === undefined) {
		this.success = false;
		this.error = "The server did not respond in a timely fashion.";
		return;
	}
	components = res.split("|");
	result = components[0].split("=");
	if(result[0] == "ERROR") {
		this.success = false;
		this.error = result[1];
		this.information[0][1][0] = result[1];
		return;
	}
	else {
		this.success = true;
		this.error = result[1];
	}
	this.information[0][0] = result[0];
	this.information[0][1][0] = result[1];
	for(i=1;i<components.length;i++) {
		component = components[i].split("=");
		component[1] = component[1].split(",");
		this.information[i] = component;
	}
}

