// Array Extensions  v1.0.6// documentation: http://www.dithered.com/javascript/array/index.html// license: http://creativecommons.org/licenses/by/1.0/// code by Chris Nott (chris[at]dithered[dot]com)//=======================================================\\//                    13thparallel.org                   \\//                   Copyright (c) 2002                  \\ //   see (13thparallel.org/?title=about) for more info   \\//=======================================================\\// 2004.01.14 - Andrew Tetlaw - Some cross browser code added for blighvollernield.com.au// 2004.03.24 - AT - added addClass, removeClass & containsClassvar undefined;function isUndefined(property){return(typeof property=='undefined');};if(isUndefined(Array.prototype.concat)==true){Array.prototype.concat=function(secondArray){var firstArray=this.copy();for(var i=0;i<secondArray.length;i++){firstArray[firstArray.length]=secondArray[i];}return firstArray;};};if(isUndefined(Array.prototype.copy)==true){Array.prototype.copy=function(){var copy=new Array();for(var i=0;i<this.length;i++){copy[i]=this[i];}return copy;};};if(isUndefined(Array.prototype.pop)==true){Array.prototype.pop=function(){var lastItem=undefined;if(this.length>0){lastItem=this[this.length-1];this.length--;}return lastItem;};};if(isUndefined(Array.prototype.push)==true){Array.prototype.push=function(){var currentLength=this.length;for(var i=0;i<arguments.length;i++){this[currentLength+i]=arguments[i];}return this.length;};};if(isUndefined(Array.prototype.shift)==true){Array.prototype.shift=function(){var firstItem=this[0];for(var i=0;i<this.length-1;i++){this[i]=this[i+1];}this.length--;return firstItem;};};if(isUndefined(Array.prototype.slice)==true){Array.prototype.slice=function(start,end){var temp;if(end==null||end=='')end=this.length;else if(end<0)end=this.length+end;if(start<0)start=this.length+start;if(end<start){temp=end;end=start;start=temp;}var newArray=new Array();for(var i=0;i<end-start;i++){newArray[i]=this[start+i];}return newArray;};};if(isUndefined(Array.prototype.splice)==true){Array.prototype.splice=function(start,deleteCount){if(deleteCount==null||deleteCount=='')deleteCount=this.length-start;var tempArray=this.copy();for(var i=start;i<start+arguments.length-2;i++){this[i]=arguments[i-start+2];}for(var i=start+arguments.length-2;i<this.length-deleteCount+arguments.length-2;i++){this[i]=tempArray[i+deleteCount-arguments.length+2];}this.length=this.length-deleteCount+(arguments.length-2);return tempArray.slice(start,start+deleteCount);};};if(isUndefined(Array.prototype.unshift)==true){Array.prototype.unshift=function(the_item){for(loop=this.length-1;loop>=0;loop--){this[loop+1]=this[loop];}this[0]=the_item;return this.length;};};var px=document.layers||window.opera?"":"px";function make(id){var agent=navigator.userAgent.toLowerCase();this.is_mac=agent.indexOf('mac')!=-1;this.is_win=!this._mac;this.is_khtml=agent.indexOf('khtml')!=-1||agent.indexOf('safari')!=-1;this.is_dom=document.getElementById;this.is_iex=document.all;this.is_ns4=document.layers;this.elm=this.is_dom?document.getElementById(id):(this.is_iex?document.all[id]:(this.is_ns4?this.getElmNS4(document,id):null));if(!this.elm)return null;this.css=this.is_ns4?this.elm:this.elm.style;this.obj=id+'Obj';try{eval(this.obj+' = this');}catch(e){}this.x=this.elm.offsetLeft?this.elm.offsetLeft:0;this.y=this.elm.offsetTop?this.elm.offsetTop:0;this.w=this.getW();this.h=this.getH();};make.prototype.getElmNS4=function(elm,id){var lyrs=elm.layers;var tmpObj;var rtrnObj;for(var i=0;i<lyrs.length;i++){if(lyrs[i].id==id){result=lyrs[i];}else if(lyrs[i].layers.length){var tmpObj=this.getElmNS4(lyrs[i],id);}if(tmpObj){rtrnObj=tmpObj;}}return rtrnObj;};make.prototype.show=function(){this.setCSS('visibility','visible');};make.prototype.hide=function(){this.setCSS('visibility','hidden');};make.prototype.setCSS=function(prop,val){if(!this.is_ns4){this.css[prop]=val;if(this.is_iex&&this.is_mac){}if(this.is_khtml){}}};make.prototype.containsClass=function(cl){return(this.elm.className.indexOf(cl)>-1)?true:false;};make.prototype.removeClass=function(cl){if(this.elm.className==null||this.elm.className==""||!this.containsClass(cl)){return true;}var classNames=this.elm.className.split(" ");var newClassNames="";for(var x=0,cnl=classNames.length;x<cnl;x++){if(classNames[x]!=cl){newClassNames+=(classNames[x]+" ");}}this.elm.className=newClassNames.substring(0,newClassNames.length-1);};make.prototype.addClass=function(cl){if(!this.containsClass(cl))this.elm.className+=" "+cl;return true;};make.prototype.onMove=function(x,y){};make.prototype.moveTo=function(x,y){if(this.is_ns4){this.elm.moveTo(x,y);if(x!=null)this.x=x;if(y!=null)this.y=y;}else{if(x!=null){x=Math.round(x);this.x=x;this.setCSS('left',x+px);}if(y!=null){y=Math.round(y);this.y=y;this.setCSS('top',y+px);}this.onMove(x,y);}};make.prototype.moveBy=function(x,y){this.moveTo(this.x+x,this.y+y);};make.prototype.getW=function(){if(this.is_ns4){return this.elm.document.width}else if(this.elm.offsetWidth){return this.elm.offsetWidth;}else if(parseInt(this.css.width)){return parseInt(this.css.width);}else{return 0;}};make.prototype.setW=function(num){this.css.width=num+px;};make.prototype.getH=function(){if(this.is_ns4){return this.elm.document.height}else if(this.elm.offsetHeight){return this.elm.offsetHeight;}else if(parseInt(this.css.height)){return parseInt(this.css.height);}else{return 0;}};make.prototype.setH=function(num){this.css.height=num+px;};function getCanvas(){if(document.width){this.w=document.width;this.h=document.height}else if(document.documentElement&&document.documentElement.clientWidth){this.w=document.documentElement.clientWidth;this.h=document.documentElement.clientHeight}else if(document.body&&document.body.clientWidth){this.w=document.body.clientWidth;this.h=document.body.clientHeight}else if(window.innerWidth){this.w=window.innerWidth;this.h=window.innerHeight}else{this.w=0;this.h=0;}};make.prototype.getPageX=function(){var elm=this.elm;var x=0;while(elm.offsetParent&&typeof elm.offsetLeft!="undefined"){x+=elm.offsetLeft;elm=elm.offsetParent;}return x;};make.prototype.getPageY=function(){var elm=this.elm;var y=0;while(elm.offsetParent&&typeof elm.offsetTop!="undefined"){y+=elm.offsetTop;elm=elm.offsetParent;}return y;};
