" + oneRecord[1] + " | " + ShowCaptain(oneRecord[4]));
if (i == 0 && coach && coach.length > 0) {
arrHtml.push('' + oneRecord[2 + dataLang] + '');
} else {
arrHtml.push('' + oneRecord[2 + dataLang] + '');
}
arrHtml.push(" | " + dateToTime(oneRecord[5]) + " | " + (DefaultStr(oneRecord[6]) == '-' ? DefaultStr(oneRecord[6]) : DefaultStr(oneRecord[6]) + _locModel.T.T_CM) + " | " + (DefaultStr(oneRecord[7]) == '-' ? DefaultStr(oneRecord[7]) : DefaultStr(oneRecord[7]) + _locModel.T.T_KG) + " | " + oneRecord[8] + " | " + oneRecord[9 + dataLang] + " | £" + DefaultStr(toExp(oneRecord[11]), _locModel.T.T_Million) + " | " + dateToTime(DefaultStr(oneRecord[12])) + " | " + DefaultStr(oneRecord[13], oneRecord[14], "/") + " | " + DefaultStr(oneRecord[15], oneRecord[16], '/') + " | " + DefaultStr(oneRecord[17]) + " |
");
}
document.getElementById("main_dt").innerHTML = arrHtml.join('');
}
function toExp(val) {
if (/(\d)/.test(val)) {
return (parseFloat(val) / 100).toFixed(4);
}
return val;
};
function MathHelp() {
this.Sum = function(list) {
return eval(list.join("+"));
}
this.Avg = function(list, fixed) {
return Divide(this.Sum(list), list.length, fixed);
}
this.Divide = function(dividend, divisor, fixed) {
if (isNaN(divisor) || divisor == 0 || dividend == 0)
return 0;
var reValue = dividend / divisor;
if (isNaN(fixed))
return reValue;
else return reValue.toFixed(fixed);
}
}
Number.prototype.toFixed = function (s) {
changenum = (parseInt(this * Math.pow(10, s) + 0.5) / Math.pow(10, s)).toString();
return changenum;
}
function VerifyHelp() {
this.IsArray=function(o) {
return Object.prototype.toString.call(o) === '[object Array]';
}
this.IsNum=function (s) {
if (s != null && s != "") {
return !isNaN(s);
}
return false;
}
}
function $_(q, o) {
if (typeof (q) !== 'string' || q == '') return [];
var ss = q.split(' ');
var attr = '';
var s = ss[0].split(':')[0];
if (s != ss[0])
attr = ss[0].split(':')[1];
var val = s.split('[')[0];
if (val != s)
val = s.split('[')[1].replace(/[",\]]/g, '');
else
val = '';
s = s.split('[')[0];
var obj = [];
var sObj = null;
o = o || document;
switch (s.charAt(0)) {
case '#':
sObj = document.getElementById(s.substr(1));
if (sObj) obj.push(sObj);
break;
case '.':
var l = o.getElementsByTagName('*');
var c = s.substr(1);
for (var i = 0; i < l.length; i++)
if (l[i].className.search('\\b' + c + '\\b') != -1) obj.push(l[i]);
break;
default:
obj = o.getElementsByTagName(s);
break;
}
if (val) {
var l = [];
var a = val.split('=');
for (var i = 0; i < obj.length; i++) {
switch (a.length) {
case 1: if (obj[i].getAttribute(a[0]) != null) l.push(obj[i]); break;
case 2: if (obj[i].getAttribute(a[0]) == a[1]) l.push(obj[i]); break;
}
}
obj = l;
}
if (attr) {
var l = [];
for (var i = 0; i < obj.length; i++)
if (obj[i][attr]) l.push(obj[i]);
obj = l;
}
if (ss.length > 1) {
var l = [];
for (var i = 0; i < obj.length; i++) {
var ll = arguments.callee(q.substr(ss[0].length + 1), obj[i]);
if (ll.tagName) l.push(ll);
else
for (var j = 0; j < ll.length; j++) l.push(ll[j]);
}
obj = l;
}
if (sObj && ss.length == 1) {
obj = sObj;
if (obj) obj.length = 1;
} else {
var l = [];
for (var i = 0; i < obj.length; i++) obj[i].$isAdd = false;
for (var i = 0; i < obj.length; i++) {
if (!obj[i].$isAdd) {
obj[i].$isAdd = true;
l.push(obj[i]);
}
}
obj = l;
}
return obj;
};