/*______________
|       ______  |   U I Z E     J A V A S C R I P T     A P I
|     /      /  |   -----------------------------------------
|    /    O /   |    MODULE : Uize.Data Package (version 1.0.0)
|   /    / /    |    AUTHOR : Chris van Rensburg (http://www.tomkidding.com)
|  /    / /  /| |    ONLINE : http://www.tomkidding.com/uize/uize-js-api
| /____/ /__/_| | COPYRIGHT : (c)2005-2006 Chris van Rensburg
|           |__ |   LICENSE : Distributed under the terms of the GNU General Public License
|_______________|             http://www.gnu.org/licenses/gpl.txt
*/
(function(){if(typeof Uize=='undefined')Uize={};var _a=Uize.Data={},_b=true,_c=false,_d=null;_a.clone=function(_e){var _f;if(typeof _e=='object'&&_e){if(typeof _e.length=='number'){_f=[];_f.length=_e.length;}else{_f={};}for(var _g in _e)_f[_g]=_a.clone(_e[_g]);}else{_f=_e;}return _f;};_a.identical=function(_h,_i){var _j=typeof _h==typeof _i;if(_j){if(typeof _h=='object'&&_h&&_i){if(typeof _h.length=='number')_j=_h.length===_i.length;if(_j){
var _k=_l=0,_m={};for(var _g in _h)_k++;for(var _g in _i){_l++;_m[_g]=_b;}_j=_k==_l;if(_j){for(var _g in _h){_j=_m[_g]===_b&&_a.identical(_h[_g],_i[_g]);if(!_j)break;}}}}else{_j=_h==_i;}}return _j;};_a.conjoined=function(_h,_i){function _n(_e){function _o(_e,_p){if(typeof _e=='object'){var _q=_c;for(var _r=0;_r<_p.length&& !_q;_r++)_q=_p[_r]==_e;if(!_q){_p.push(_e);for(var _g in _e)_o(_e[_g],_p);}}}var _p=[];_o(_e,_p);return _p;}var _s=_c,_t=_n(_h),_u=_n(_i);for(var _v=0;_v<_t.length&& !_s;_v++){var _w=_t[_v];for(var _x=0;_x<_u.length&& !_s;_x++)_s=_w==_u[_x];}return _s;};_a.clones=function(_h,_i){return _a.identical(_h,_i)&& !_a.conjoined(_h,_i);};_a.swapArrayElements=function(_y,_z,_A){var _B=_y[_z];_y[_z]=_y[_A];_y[_A]=_B;};_a.reorderArray=function(_y,_C){var _D=_y.concat();if(_C=='jumbled'){_D.sort(function(){return Math.random()*2-1});}else if(_C=='reverse'){_D.reverse();}else if(_C=='inside out'||_C=='outside in'){_D=[];var _E=_y.length,_F=Math.floor((_E-1)/2),_G;function _H(){_D.push(_y[_G]);
if(_G!=_E-1-_G)_D.push(_y[_E-1-_G]);}if(_C=='inside out'){for(_G=_F;_G>=0;_G--)_H();}else{for(_G=0;_G<=_F;_G++)_H();}}return _D;};})();