function HashTable()
{
	var _keys=new Array();
	var _values=new Array();

	this.keys=function(){return _keys;}
	this.values=function(){return _values;}
	this.length=function(){return _keys.length;}
	this.add=function(key,value){var id=this.indexOf(key); if (id>-1) throw "Duplicate key"; _keys.push(key); _values.push(value);}
	this.set=function(key,value){var id=this.indexOf(key); if (id==-1) throw "Inexistent key"; _values[id]=value;}
	this.remove=function(key){var id=this.indexOf(key); if (id==-1) throw "Inexistent key"; _keys.splice(id,1); _values.splice(id,1);}
	this.removeValue=function(value){var id=this.indexOfValue(value); if (id==-1) throw "Inexistent value"; _keys.splice(id,1); _values.splice(id,1);}
	this.item=function(key){var id=this.indexOf(key); if (id==-1) throw "Inexistent key"; return _values[id];}
	this.key=function(value){var id=this.indexOfValue(value); if (id==-1) throw "Inexistent value"; return _keys[id];}
	this.contains=function(key){return this.indexOf(key)>-1;}
	this.containsValue=function(value){return this.indexOfValue(value)>-1;}
	this.indexOf=function(key){return _keys.indexOf(key);}
	this.indexOfValue=function(value){return _values.indexOf(value);}
	this.toString=function()
	{
		var text="HashTable v. 1.0 ; length = "+this.length();
		for(var num1=0;num1<this.length();num1++) text+=" ; "+_keys[num1]+" = "+_values[num1];
		return text;
	}
}

function HashObject(){}
HashObject.keys=function(hashObject){var array1=new Array();for (var key in hashObject) array1.push(key); return array1;}
HashObject.values=function(hashObject){var array1=new Array();for (var key in hashObject) array1.push(hashObject[key]); return array1;}
HashObject.getLength=function(hashObject){var num1=0;for (var key in hashObject) num1++; return num1;}
HashObject.hasItems=function(hashObject){for (var key in hashObject) return true; return false;}
HashObject.remove=function(hashObject,key){delete hashObject[key];}
HashObject.removeValue=function(hashObject,value){for (var key in hashObject) if (hashObject[key]===value) {delete hashObject[key]; break;}}
HashObject.contains=function(hashObject,key){for (var key1 in hashObject) if (key1===key) return true; return false;}
HashObject.containsValue=function(hashObject,value){for (var key in hashObject) if (hashObject[key]===value) return true; return false;}
HashObject.toString=function(hashObject)
{
		var text="HashObject v. 1.0 ; length = "+HashObject.length(hashObject);
		for (var key in hashObject) text+=" ; "+key+" = "+hashObject[key];
		return text;
}