// Prototypes String.prototype.trim = function() { return( this.replace(/^\s*([\s\S]*\S+)\s*$|^\s*$/,'$1') ); // example: str=str.trim(); } // Compatability functions function js_setText ( obNode, stText ) { if (obNode.textContent != undefined) { obNode.textContent = stText; } else { obNode.innerText = stText; } } function js_getText ( obNode ) { if (obNode.textContent != undefined) { return obNode.textContent; } else { return obNode.innerText; } } // Formatting functions function js_formatAsMoney(mnt) { mnt -= 0; mnt = (Math.round(mnt*100))/100; return (mnt == Math.floor(mnt)) ? mnt + '.00' : ( (mnt*10 == Math.floor(mnt*10)) ? mnt + '0' : mnt); } // stupid plugin work around function js_documentwrite( st ) { document.write( st ) }