b = a[2]; a[2] = a[5]; a[5] = b;
var remValue = tabsArray[elIndex]; tabsArray.splice(elIndex,1); tabsArray.splice(i,0, remValue);