// ******************************************************* // replacements for unsupported array functions (because arrayname.push(var) // and arrayname.pop() are not implemented in IE until version 5.5) function thearrayisgood(thearray,i) { if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null)) return false; else return true; }
function getarraysize(thearray) { // replacement for arrayname.length property for (i = 0; i < thearray.length; i++) { if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null)) return i; } return thearray.length; }
function arraypush(thearray,value) { // replacement for arrayname.push(value) thearraysize = getarraysize(thearray); thearray[thearraysize] = value; return thearray[thearraysize]; }
function arraypop(thearray) { // replacement for arrayname.pop() thearraysize = getarraysize(thearray); retval = thearray[thearraysize - 1]; delete thearray[thearraysize - 1];