// JS by lixiaoyi // the global functions // Get All elements of the DOM that matches the class name // cname: the class that the elements match function lxy_getElementsByClassName(cname) { var el = [], _el = document.getElementsByTagName('*'); for (var i=0; i<_el.length; i++ ) { if (_el[i].className == cname ) { el[el.length] = _el[i]; } } return el; } // Hide one row of a list of table // table: destination table list // rowIndex: index of destination row function lxy_hideRow(tableList, rowIndex) { for (i = 0; i < tableList.length; i++) { tableList[i].rows[rowIndex].style.display = "none"; } } // add the trim function to the String // the function "trim" returns a copy of the string, // with leading and trailing whitespace omitted String.prototype.trim = function() { return this.replace(/(^s*)|(s*$)/g, ""); } // preLoad some pic to a image array named 'lxy_imageArray' which is set to // a attribute of documetn function simplePreload() { var args = simplePreload.arguments; document.lxy_imageArray = new Array(args.length); for(var i=0; i