
//' object that contains all references in a array
//' this object is able to add new references and to lookup a reference
function References() {
	//' arrReferences is used to contain all help ID's and corresponding document and content id's
	this.arrReferences= new Array();
}

References.prototype.add=References_add;
References.prototype.search=References_search;

//' adds a new reference
function References_add(strId, intRoomId, intDeskId, intBookId, intDoId, intCoId) {
	this.arrReferences[this.arrReferences.length]=new Reference(strId, intRoomId, intDeskId, intBookId, intDoId, intCoId);
}

//' searches for a help ID. If the help ID was not found, the function returns false
function References_search(strId) {
	//' loop through all helpID's 
	strId = new String(strId);
	for (var i=0; i<this.arrReferences.length; i++) {
		if (this.arrReferences[i].id.toLowerCase()==strId.toLowerCase())  {
			//' help ID was found, return the reference
			return this.arrReferences[i];
		}
	}
	return false;
}



