function Hashtable(){
	this.a = new Array();
	this.b = new Array();
	this.size = 0;
	this.put = Hashtable_put;
	this.get = Hashtable_get;
	this.keys = this.a;
	this.values = this.b;
	this.remove = Hashtable_remove;
	this.removeAll = Hashtable_removeAll;	
}
function Hashtable_removeAll(){
	with(this){
		a = new Array();
		b = new Array();
		size = this.a.length
		keys = this.a
		values = this.b
	}	
}
function Hashtable_remove(x){
	n = this.size;
	for(i=0;i<n;i++){
		if(x == this.a[i])
			break;
	}
	if(i == n)
		return;
	tKeys = new Array();
	tValues = new Array();
	count = 0
	for(j=0;j<n;j++){		
		if(j!= i){
			tKeys[count] = this.a[j]
			tValues[count] = this.b[j]
			count++;
		}
	}	
	this.a = tKeys
	this.b = tValues
	this.size = this.a.length
}
function Hashtable_get(x){
	n = this.size;
	for(i=0;i<n;i++){
		if(x == this.a[i])
			return this.b[i];
	}
	return null;
}
function Hashtable_put(x,y){
	n = this.size;
	for(i=0;i<n;i++){
		if(x == this.a[i]){
			this.b[i] = y;
			return;
		}
	}
	this.a[this.a.length] = x
	this.b[this.b.length] = y
	this.size = this.a.length;
}
