/*******************************
*
* elcHashMap.js
* 
*******************************/

function elcHashMap(){
	this.Items = new Array();
}

elcHashMap.prototype.store = function(sKey,oValue){
	var entry = new String(sKey);
	entry.obj = oValue;
	this.Items[this.Items.length] = entry;
}

elcHashMap.prototype.fetch = function(sKey){
	for (var i=0;i<this.Items.length;i++){
		if (this.Items[i].toString() == sKey){
			return this.Items[i].obj;
		}
	}
	return null;
}

elcHashMap.prototype.exists = function(sKey){
	for (var i=0;i<this.Items.length;i++){
		if (this.Items[i].toString() == sKey){
			return true;
		}
	}
	return false;
}

elcHashMap.prototype.clear = function(){
	this.Items.length=0;
}

elcHashMap.prototype.remove = function(sKey){
	for (var i=0;i<this.Items.length;i++){
		if(this.Items[i].toString() == sKey) {
			var entry = this.Items[i];
			this.Items.splice(i,1);
			return entry.obj;
		}
	}
}

		

