/* 
	hash.js
	---------
*/
function HashNamespace() {

/*
	purpose:
	- creates a new hash map
*/
function Hash() {
	this.h={}
}

Hash.prototype.add = function(k,v){
	this.h[k]=v;
};

Hash.prototype.remove = function(k){
	delete this.h[k];
};

Hash.prototype.getItem = function(k){
	if(this.h.hasOwnProperty(k)){return this.h[k];}
	return undefined;
};

Hash.prototype.containsKey = function(k){
	return this.h.hasOwnProperty(k);
};

Hash.prototype.getKeys = function(){
	var ks=[];
	for(var k in this.h){if(this.h.hasOwnProperty(k)){ks.push(k);}}
	return ks;
};

Hash.prototype.getItems = function(){
	var ks=[];
	for(var k in this.h){if(this.h.hasOwnProperty(k)){ks.push(this.h[k]);}}
	return ks;
};

function makeInterface(a) {
    var b = a || window;
    b.Hash = Hash;
}

makeInterface();
}

HashNamespace();