function HashMap(){this.list = new Array();}
new HashMap();
HashMap.prototype.find = function(f){for (var i = 0; i < this.list.length; i++) {if (this.list[i].code == f) return this.list[i];} return null;}
HashMap.prototype.add = function (o) {this.list[this.list.length] = o};
HashMap.prototype.sort = function(fld){var changed = false;if (this.list.length < 2) return;if (fld == null) fld = 'name';do {for (var i = 1; i < this.list.length; i++) {if (this.list[i][fld] < this.list[i-1][fld]) {var tmp = this.list[i-1];this.list[i-1] = this.list[i];this.list[i] = tmp;changed = true;}}} while (changed);}
      
function DateArray(){this.list = new Array();}                          
new DateArray();
DateArray.prototype.add = function(o) {this.list[this.list.length] = o};

function getSelectedDate() {return createDate(prepare_date($('OutDay'), $('OutMon'), $('OutYear')));}
function setDate(strDate) {var dtDate = createDate(strDate);setDropDown($('OutYear'), dtDate.getFullYear());setDropDown($('OutMon'), dtDate.getMonth()+1); setDropDown($('OutDay'), dtDate.getDate());}

