function Vector(_1){
this.container=new Array();
this.type="Vector";
this.rootName=_1;
}
new Vector();
Vector.prototype.addElement=addElement;
Vector.prototype.addElements=addElements;
Vector.prototype.removeElement=removeElement;
Vector.prototype.removeElementAt=removeElementAt;
Vector.prototype.removeAllElements=removeAllElements;
Vector.prototype.insertElementAt=insertElementAt;
Vector.prototype.moveElement=moveElement;
Vector.prototype.elementAt=elementAt;
Vector.prototype.isEmpty=isEmptyVector;
Vector.prototype.size=size;
Vector.prototype.elements=elements;
Vector.prototype.contains=contains;
Vector.prototype.setRootName=setRootName;
Vector.prototype.getRootName=getRootName;
function addElement(_2,_3){
var _4=_2;
if(_3==null){
this.container[this.container.length]=_4;
}else{
_3.container[_3.container.length]=_4;
}
}
function addElements(_5,_6){
for(index in _5){
if(_6==null){
this.container[this.container.length]=_5[index];
}else{
_6.container[_6.container.length]=_5[index];
}
}
}
function insertElementAt(_7,_8,_9){
if(_9==null){
if((_8<0)||(_8>(this.container.length-1))){
return (false);
}else{
var _a=new Array();
var _b=0;
for(var i=0;i<this.container.length;i++){
if(i==_8){
_a[i]=_7;
_b=1;
}
_a[i+_b]=this.container[i];
}
this.container=_a;
return (true);
}
}else{
if((_8<0)||(_8>(_9.container.length-1))){
return (false);
}else{
var _a=new Array();
var _b=0;
for(var i=0;i<_9.container.length;i++){
if(i==_8){
_a[i]=_7;
_b=1;
}
_a[i+_b]=_9.container[i];
}
_9.container=_a;
return (true);
}
}
}
function elementAt(_d,_e){
if(_e==null){
if((_d<0)||(_d>(this.container.length-1))){
return (null);
}
return (this.container[_d]);
}else{
if((_d<0)||(_d>(_e.container.length-1))){
return (null);
}
return (_e.container[_d]);
}
}
function removeElementAt(_f,_10){
if(_10==null){
if((_f<0)||(_f>(this.container.length-1))){
return (false);
}else{
var _11=new Array();
for(var i=0;i<this.container.length;i++){
if(i==_f){
continue;
}
_11[_11.length]=this.container[i];
}
this.container=_11;
return (true);
}
}else{
if((_f<0)||(_f>(_10.container.length-1))){
return (false);
}else{
var _11=new Array();
for(var i=0;i<_10.container.length;i++){
if(i==_f){
continue;
}
_11[_11.length]=_10.container[i];
}
_10.container=_11;
return (true);
}
}
}
function removeElement(_13,_14){
if(_14==null){
var _15=new Array();
for(var i=0;i<this.container.length;i++){
if(this.container[i]==_13){
continue;
}
_15[_15.length]=this.container[i];
}
if(this.container.length==_15.length){
return (false);
}
this.container=_15;
return (true);
}else{
var _15=new Array();
for(var i=0;i<_14.container.length;i++){
if(this.container[i]==_13){
continue;
}
_15[_15.length]=_14.container[i];
}
if(_14.container.length==_15.length){
return (false);
}
_14.container=_15;
return (true);
}
}
function removeAllElements(){
this.container=new Array();
}
function moveElement(_17,to){
if((_17<0)||(_17>(this.container.length-1))){
return (false);
}else{
if((to<0)||(to>(this.container.length-1))){
alert("Vector error: Out of bounds error on destination");
return (false);
}else{
if(_17==to){
return (true);
}
}
}
var obj=this.elementAt(_17);
if(obj!=null){
this.removeElementAt(_17);
if(to==this.size()){
return (this.addElement(obj));
}else{
return (this.insertElementAt(obj,to));
}
}else{
return (false);
}
}
function elements(_1a){
var _1b=new Array();
if(_1a==null){
for(var i=0;i<this.container.length;i++){
_1b[_1b.length]=this.container[i];
}
}else{
for(var i=0;i<_1a.container.length;i++){
_1b[_1b.length]=_1a.container[i];
}
}
return (_1b);
}
function contains(_1d){
for(var i=0;i<this.container.length;i++){
if(this.container[i]==_1d){
return (true);
}
}
return (false);
}
function setRootName(_1f){
var obj;
this.rootName=_1f;
}
function getRootName(){
return (this.rootName);
}
function size(_21){
if(_21==null){
return (this.container.length);
}else{
return (_21.container.length);
}
}
function isEmptyVector(){
return ((this.container.length==0));
}

