// core.js function core() { this.force_trace = true; this.searchInterval = false; this.Fields = []; //field name reference [not too clever here] this.ActiveFields = []; //maintain data state for inline edits }// core.prototype = { // * * * $:function() { // returns object reference || array of object references var loElements = new Array(); for (var i = 0; i < arguments.length; i++) { var loElement = arguments[i]; if (typeof(loElement) == 'string') { loElement = (document.getElementById(loElement)||false); } if (arguments.length==1) { return loElement; } loElements.push(loElement); } return loElements; }, // * * * insertAfter:function (oInsertThisElement,oAfterThisElement) { //why is there no DOM.insertAfter? if(oAfterThisElement.nextSibling) { return (oAfterThisElement.parentNode.insertBefore(oInsertThisElement,oAfterThisElement.nextSibling)); } else { return (oAfterThisElement.parentNode.appendChild(oInsertThisElement)); } }, // * * * repeat:function (sFunction, iTime) { //used for list filter... clearInterval(this.interval); this.interval = setInterval(sFunction, iTime); //fire whatever function this.remove_interval = setTimeout('core.clearRepeat('+this.interval+')',iTime); //clear after firing return this.interval; }, // * * * clearRepeat:function (interval) { if(!interval) {return;} trace("clearing::"+ interval); clearInterval(interval); }, // * * * spacer:function (loContainer) { //returns a reference to a spacer object (used frequently in drag and drop routines as a UI trigger) var loSpacer = loContainer.nextSibling; if(loSpacer=='[object Text]') { //while? loSpacer = loContainer.nextSibling.nextSibling; if(loSpacer=='[object Text]') { //screw it loSpacer = loContainer.nextSibling.nextSibling.nextSibling; } } else { loSpacer = loContainer.nextSibling; } if (ClassFX.hasClass(loSpacer,'spacer')) { return loSpacer; } return false; //no spacer where in places where it should be. }, // * * * RID:function () { //Scrappy Random ID Generator, Interstitial Dependency var result, i, j; result = ''; for(j=0; j<32; j++) { if( j == 8 || j == 12|| j == 16|| j == 20) result = result + '-'; i = Math.floor(Math.random()*16).toString(16).toUpperCase(); result = result + i; } return result; }, // * * * functionBroker:function () { //used for brokering function requests (development) if(typeof(this[arguments[0]])=='function') { var loArguments = arguments[0]; for (var a=1;a