if(typeof(Array.prototype.push)=="undefined"){Array.prototype.push=function(){var m=IucundeWebMenuHelperUtils.ArrayHighestIndex(this);if(typeof(m)=="undefined"){m=-1;}for(var i=0;i<arguments.length;i++){this[++m]=arguments[i];}}}if(typeof(Array.prototype.pop)=="undefined"){Array.prototype.pop=function(){var m=IucundeWebMenuHelperUtils.ArrayHighestIndex(this);var v;if(typeof(m)!="undefined"){v=this[m];delete this[m];}return v;}}if(typeof(Array.prototype.shift)=="undefined"){Array.prototype.shift=function(){var val=this[0];for(var i=1;i<this.length;++i){this[i-1]=this[i];}this.length--;return val;}}if(typeof(Array.prototype.unshift)=="undefined"){Array.prototype.unshift=function(){var i=unshift.arguments.length;for(var j=this.length-1;j>=0;--j){this[j+i]=this[j];}for(j=0;j<i;++j){this[j]=unshift.argument[j];}}}function Hashtable(){this.Keys=new Array();this.Values=new Array();};Hashtable.prototype.Add=function(singleValue){if(!singleValue.ID){return;}var ItemKey=singleValue.ID;if(this.IsValidKey(ItemKey)){this.Values[this.Values.length]=singleValue;if(this.Keys[ItemKey]){this.Keys[ItemKey].length++;this.Keys[ItemKey][this.Keys[ItemKey].length-1]=(this.Values.length-1);}else{this.Keys[ItemKey]=new Array(1);this.Keys[ItemKey][0]=(this.Values.length-1);}}};Hashtable.prototype.gm=function(inputKey,inputObject){if(!inputKey||!inputObject){return;}if(this.IsValidKey(inputKey)){this.Values[this.Values.length]=inputObject;if(this.Keys[inputKey]){this.Keys[inputKey].length++;this.Keys[inputKey][this.Keys[inputKey].length-1]=(this.Values.length-1);}else{this.Keys[inputKey]=new Array(1);this.Keys[inputKey][0]=(this.Values.length-1);}}};Hashtable.prototype.AddRange=function(rangeArray){for(var i=0;i<rangeArray.length;i++){this.Add(rangeArray[i]);}};Hashtable.prototype.Remove=function(ItemKey){delete this.Values[this.Keys[ItemKey][0]];delete this.Keys[ItemKey];};Hashtable.prototype.Get=function(ItemKey){if(this.Keys[ItemKey]){return this.Values[(this.Keys[ItemKey][0])];}else{return null;}};Hashtable.prototype.Set=function(singleValue){var ItemKey=singleValue.ID;if(this.Keys[ItemKey]){this.Values[(this.Keys[ItemKey][0])]=singleValue;}};Hashtable.prototype.CopyTo=function(cloneArray){for(var i=0;i<this.Values.length;i++){cloneArray[i]=this.Values[i].toSource}};Hashtable.prototype.CopyKeysTo=function(cloneArray){for(var i=0;i<this.Keys.length;i++){}};Hashtable.prototype.IsUnique=function(ItemKey){if(this.Keys[ItemKey]){var HashedValues=this.Keys[ItemKey];HashedValues=this.Keys[ItemKey].length;return((HashedValues<=1)?true:false);}else{return true;}};Hashtable.prototype.IsValidKey=function(keyValue){var keyStrValue=""+keyValue;var testedValue=keyStrValue.charCodeAt(0);return((testedValue<48)||(testedValue>57));};Hashtable.prototype.Clear=function(){this.Values=[];this.Keys=[];};Hashtable.prototype.length=function(){return this.Values.length;}
