Dictionary = Class.create();
Dictionary.prototype = {
	initialize: function(element) {
		this.keys = new Array();
		this.data = new Array();
	},
	at: function(key) {
		if (this.itemNotNull(this.data[key])) {
			return this.data[key];
		}
		return null;
	},
	put: function(key, value) {
		this.data[key] = value;
		if (this.keys.indexOf(key) == -1) {
			this.keys.push(key);
		}
	},
	itemNotNull: function(item) {
		return item != null && item != undefined;
	},
	allKeys: function() {
		return this.keys;
	},
	values: function() {
		var tmp = new Array();
		for(var i=0; i<this.keys.length; i++) {
			tmp.push(this.data[this.keys[i]]);
		}
		return tmp;
	},
	containsKey: function(key) {
		for(var i=0; i<this.keys.length; i++) {
			if (this.keys[i] == key) return true;
		}
		return false;
	},
	remove: function(key) {
		if (this.containsKey(key)) {
			var tmpData = new Array();
			for(var i=0; i<this.keys.length; i++) {
				if (this.keys[i] != key) tmpData[this.keys[i]] = this.data[this.keys[i]];
				//tmpData.push(this.data[this.keys[i]]);
			//	alert(this.keys[i]);
			}
		//	alert(tmpData);
			this.data = tmpData;
			this.keys.splice(this.keys.indexOf(key), 1);
		//	alert("keys");
		//	alert(this.keys);
		}
	},
	size: function() {
		return this.keys.length;
	}
};

Pair = Class.create();
Pair.prototype = { 
	initialize: function(first, second) {
		this._first 	= first;
		this._second 	= second;
	},
	first: function() {
		return this._first;
	},
	second: function() {
		return this._second;
	}
};