dltgs.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621
  1. var chi = new Array();
  2. chi[0] = "和";
  3. chi[1] = "或";
  4. chi[2] = "前后区的类型选择出现错误!";
  5. chi[3] = "您选择的";
  6. chi[4] = "号码不足,";
  7. chi[5] = "数据分析范围,";
  8. chi[6] = "请继续选择";
  9. chi[7] = "根据大乐透历史 ";
  10. chi[8] = "—";
  11. chi[9] = "期";
  12. chi[10] = "分析:";
  13. chi[11] = "全按";
  14. chi[12] = "跟随";
  15. chi[13] = "数量";
  16. chi[14] = "排序";
  17. chi[15] = "号码";
  18. chi[16] = "开出";
  19. chi[17] = "同时";
  20. chi[18] = "后";
  21. chi[19] = "统计:";
  22. chi[20] = "按照";
  23. chi[21] = "出现";
  24. chi[22] = "合计";
  25. chi[23] = "第";
  26. chi[24] = "看详情";
  27. chi[25] = "的数据列表:";
  28. chi[26] = "前区";
  29. chi[27] = "后区";
  30. for (var i = 0; i < chi.length; i++) { chi[i] = unescape(chi[i]); }
  31. var current = h2b[0];
  32. var f1 = document.getElementById("fm1");
  33. function show_num() {
  34. bulid_ri();
  35. }
  36. function check_s1() {
  37. document.getElementById("result").style.display = "none";
  38. for (var i = 1; i < 36; i++) {
  39. var zeroi = add_zero(i);
  40. document.getElementById("chk_red" + zeroi).checked = false;
  41. document.getElementById("btn_red" + zeroi).className = "bigball grey";
  42. }
  43. for (var j = 1; j < 13; j++) {
  44. var zeroj = add_zero(j);
  45. document.getElementById("btn_blue" + zeroj).className = "bigball grey";
  46. document.getElementById("cir_blue" + zeroj).checked = false;
  47. }
  48. document.getElementById("nums").value = "";
  49. }
  50. function bulid_ri() {
  51. for (var i = 0; i < h2b.length; i++) {
  52. document.getElementById("r5").options[i] = new Option(h2b[i][2], i);
  53. document.getElementById("r6").options[i] = new Option(h2b[i][2], i);
  54. }
  55. document.getElementById("r5").options[i - 1].selected = true;
  56. }
  57. function bulid_ci(type) {
  58. var obj, innerHTML, limit;
  59. innerHTML = "";
  60. limit = (type == "red") ? "1:35" : "1:12";
  61. limit = limit.split(":");
  62. for (var i = limit[0]; i <= limit[1]; i++) {
  63. innerHTML += "<input type='button' class='bigball grey' id='btn_" + type + add_zero(i) + "' name='bt_" + type + "' value='" + add_zero(i) + "' onclick='check_c1(this);'>";
  64. innerHTML += "<input type='checkbox' name='c1_" + type + "' id='chk_" + type + add_zero(i) + "' value='" + add_zero(i) + "' style='display:none'>";
  65. switch (type) {
  66. case "0": if (i % 11 == 0) innerHTML += "<br/>"; break;
  67. case "1": if (i % 8 == 0) innerHTML += "<br/>"; break;
  68. }
  69. }
  70. obj = document.getElementById("sel_" + type);
  71. obj.innerHTML = innerHTML;
  72. }
  73. function bulid_ciradio(type) {
  74. var obj, innerHTML, limit;
  75. innerHTML = "";
  76. limit = (type == "0") ? "1:35" : "1:12"; limit = limit.split(":");
  77. for (var i = limit[0]; i <= limit[1]; i++) {
  78. innerHTML += "<input type='button' class='bigball grey' id='btn_" + type + add_zero(i) + "' name='bt_" + type + "' value='" + add_zero(i) + "' onclick='check_c1radio(this);'>";
  79. innerHTML += "<input type='radio' name='c1_" + type + "' id='cir_" + type + add_zero(i) + "' value='" + add_zero(i) + "' style='display:none' >";
  80. switch (type) {
  81. case "0": if (i % 11 == 0) innerHTML += "<br>"; break;
  82. case "1": if (i % 8 == 0) innerHTML += "<br>"; break;
  83. }
  84. }
  85. obj = document.getElementById("sel_" + type);
  86. obj.innerHTML = innerHTML;
  87. }
  88. function check_c1(obj) {
  89. var type = get_radio(document.getElementsByName("s1"));
  90. var num = document.getElementById("nums").value.split(",").length - 1;
  91. if (type == "red") {
  92. if (document.getElementById("chk_" + type + obj.value).checked == false) {
  93. obj.className = "bigball redball";
  94. document.getElementById("chk_" + type + obj.value).checked = true;
  95. } else {
  96. obj.className = "bigball grey";
  97. document.getElementById("chk_" + type + obj.value).checked = false;
  98. }
  99. if (document.getElementById("chk_" + type + obj.value).checked) {
  100. if (document.getElementById("nums").value.search(obj.value) < 0) document.getElementById("nums").value += obj.value + ",";
  101. } else {
  102. document.getElementById("nums").value = document.getElementById("nums").value.replace(obj.value + ",", "");
  103. }
  104. }
  105. if (document.getElementById("nums").value.length > 18) {
  106. alert("最多只能选择6个红球号!");
  107. obj.className = "bigball grey";
  108. document.getElementById("nums").value = document.getElementById("nums").value.replace(obj.value + ",", "");
  109. return false;
  110. }
  111. }
  112. function check_c1radio(obj) {
  113. var type = get_radio(document.getElementsByName("s1"));
  114. if (type == "blue") {
  115. if (document.getElementById("btn_" + type + obj.value).className != "bigball redball") {
  116. for (var i = 1; i < 13; i++) {
  117. var zeroi = add_zero(i);
  118. document.getElementById("btn_" + type + zeroi).className = "bigball grey";
  119. }
  120. if (document.getElementById("cir_" + type + obj.value).checked == false) {
  121. obj.className = "bigball redball";
  122. document.getElementById("cir_" + type + obj.value).checked = true;
  123. document.getElementById("nums").value = obj.value + ",";
  124. }
  125. }
  126. }
  127. //alert(document.getElementById("nums").value);
  128. }
  129. function input_t1(obj) {
  130. var type = $("input[name='r1']:checked").val();
  131. var limit;
  132. limit = (type == "0") ? "1:35" : "1:12"; limit = limit.split(":");
  133. obj.value = obj.value.replace(/\D/gi, "");
  134. try {
  135. if (obj.value.length == 2) {
  136. if (Math.round(obj.value) >= limit[0] && Math.round(obj.value) <= limit[1]) {
  137. f1.start.focus();
  138. } else {
  139. obj.value = "";
  140. }
  141. }
  142. } catch (e) { }
  143. }
  144. function leave_t1() {
  145. var type = $("input[name='r1']:checked").val();
  146. var obj = eval("f1.t1_" + type);
  147. var num = "";
  148. for (var i = 0; i < obj.length; i++) {
  149. if (obj[i].value != "" && num.search(obj[i].value + ",") < 0) num += obj[i].value + ",";
  150. }
  151. f1.nums.value = num;
  152. //check_input();
  153. }
  154. function change_s2(str) {
  155. var obj = document.all.s3;
  156. for (var i = 0; i < obj.length; i++) { obj[i].innerHTML = (str == "or") ? chi[1] : chi[0]; }
  157. }
  158. function check_input() {
  159. var obj;
  160. var type = $("input[name='s1']:checked").val();
  161. var nums = f1.nums.value.split(",");
  162. obj = (type == "red") ? f1.c1_red : f1.c1_blue;
  163. alert(obj.length);
  164. for (var i = 0; i < obj.length; i++) {
  165. obj[i].checked = false;
  166. obj[i].nextSibling.className = "";
  167. }
  168. for (var i = 0; i < nums.length - 1; i++) {
  169. obj[Math.round(nums[i]) - 1].checked = true;
  170. obj[Math.round(nums[i]) - 1].nextSibling.className = "check_" + type;
  171. }
  172. obj = (type == "red") ? f1.t1_red : f1.t1_blue;
  173. switch (type) {
  174. case "red": for (var i = 0; i < obj.length; i++) { obj[i].value = ""; } break;
  175. case "blue": obj.value = ""; break;
  176. }
  177. switch (type) {
  178. case "red": for (var i = 0; i < nums.length - 1; i++) { obj[Math.round(i)].value = nums[i]; } break;
  179. case "blue": obj.value = nums[0]; break;
  180. }
  181. }
  182. function check_start() {
  183. var type = $("#c1").attr("class");
  184. if (type != "hide") {
  185. type = "0";
  186. } else {
  187. type = "1";
  188. }
  189. var ball = "";
  190. if (type == 0) {
  191. var items = $("input[name=" + "gs" + "]");
  192. for (var i = 0; i < items.length; i++) {
  193. if ($(items[i]).prop("checked"))
  194. ball = ball + $(items[i]).val().replace("\n", "").trim() + ",";
  195. }
  196. ball = ball.substr(0, ball.length - 1);
  197. } else {
  198. var items = $("input[name=" + "hgs" + "]");
  199. for (var i = 0; i < items.length; i++) {
  200. if ($(items[i]).prop("checked"))
  201. ball = ball + $(items[i]).val().replace("\n", "").trim() + ",";
  202. }
  203. ball = ball.substr(0, ball.length - 1);
  204. }
  205. var r1 = $("input[name='r1']:checked").val();
  206. var isstart = true;
  207. if (type != "0" && type != "1") { alert(chi[2]); isstart = false; }
  208. if (ball == "") { alert(chi[3] + chi[4] + chi[6]); isstart = false; }
  209. if (r1 == "") { alert(chi[3] + chi[5] + chi[6]); isstart = false; }
  210. if (isstart) {
  211. num_start();
  212. }
  213. }
  214. var result = new Array();
  215. function format_result() {
  216. for (var i = 0; i <= 35; i++) {
  217. result[i] = new Array();
  218. for (var j = 0; j <= 35; j++) {
  219. result[i][j] = "";
  220. }
  221. }
  222. }
  223. function num_start() {
  224. format_result();
  225. document.getElementById("result").style.display = "none";
  226. var type = $("#c1").attr("class");
  227. if (type != "hide") {
  228. type = "0";
  229. } else {
  230. type = "1";
  231. }
  232. var ball = "";
  233. if (type == 0) {
  234. var items = $("input[name=" + "gs" + "]");
  235. for (var i = 0; i < items.length; i++) {
  236. if ($(items[i]).prop("checked"))
  237. ball = ball + $(items[i]).val().replace("\n", "").trim() + ",";
  238. }
  239. ball = ball.substr(0, ball.length - 1);
  240. } else {
  241. var items = $("input[name=" + "hgs" + "]");
  242. for (var i = 0; i < items.length; i++) {
  243. if ($(items[i]).prop("checked"))
  244. ball = ball + $(items[i]).val().replace("\n", "").trim() + ",";
  245. }
  246. ball = ball.substr(0, ball.length - 1);
  247. }
  248. var nums = ball.split(",").sort();
  249. var s2 = (type == "0") ? "or" : "and";
  250. switch (s2) {
  251. case "and": analy_start(type, 0, nums); break;
  252. case "or": for (var i = 0; i < nums.length; i++) { analy_start(type, i, ("," + nums[i]).split(",")); } break;
  253. }
  254. //iframe.location.href = "tools_count.asp?act=follow";
  255. detail = "";
  256. sort_start();
  257. show_result();
  258. }
  259. function analy_start(type, id, nums) {
  260. var isTrue = true;
  261. var num_red;
  262. var r1 = $("input[name='r1']:checked").val();
  263. var h2b_limit;
  264. switch (r1) {
  265. case "1": h2b_limit = h2b.length - 1 + ":" + 0; break;
  266. case "2": h2b_limit = 100 + ":" + 0; break;
  267. case "3": var r2 = get_select('r2'); var r3 = get_select('r3'); h2b_limit = r2 + ":" + r3; break;
  268. }
  269. h2b_limit = h2b_limit.split(":");
  270. h2b_limit[0] = Math.round(h2b_limit[0]);
  271. h2b_limit[1] = Math.round(h2b_limit[1]);
  272. for (var i = h2b_limit[0]; i > h2b_limit[1]; i--) {
  273. switch (type) {
  274. case "0":
  275. isTrue = balance_start(nums, h2b[i][0]);
  276. if (isTrue) {
  277. num_red = h2b[i - 1][0].split(",");
  278. for (var j = 0; j < num_red.length; j++) {
  279. result[id][Math.round(num_red[j])] += i + ",";
  280. }
  281. }
  282. break;
  283. case "1":
  284. isTrue = balance_start(nums, h2b[i][1]);
  285. if (isTrue) {
  286. num_red = h2b[i - 1][1].split(",");
  287. for (var j = 0; j < num_red.length; j++) {
  288. result[id][Math.round(num_red[j])] += i + ",";
  289. }
  290. }
  291. break;
  292. }
  293. }
  294. }
  295. function balance_start(u_nums, h_nums) {
  296. var isTrue = false;
  297. for (var i = 0; i < u_nums.length; i++) {
  298. if (Math.round(u_nums[i]) > 0) {
  299. if (h_nums.search(u_nums[i]) < 0) {
  300. isTrue = false;
  301. break;
  302. } else {
  303. isTrue = true;
  304. }
  305. }
  306. }
  307. return isTrue;
  308. }
  309. function sort_start() {
  310. var type = $("#c1").attr("class");
  311. if (type != "hide") {
  312. type = "0";
  313. } else {
  314. type = "1";
  315. }
  316. var limit = (type == "0") ? "1:35" : "1:12"; limit = limit.split(":");
  317. for (var i = 0; i < result.length; i++) {
  318. for (var j = limit[0]; j <= limit[1]; j++) {
  319. result[i][0] += add_zero(result[i][j].split(",").length - 1) + "," + add_zero(j) + "||";
  320. }
  321. result[i][0] = result[i][0].split("||").sort();
  322. for (var j = 1; j < result[i][0].length; j++) {
  323. result[i][0][j] = result[i][0][j].split(",");
  324. result[i][0][j] = Math.round(result[i][0][j][1]);
  325. }
  326. result[i][0] = result[i][0].join(",");
  327. }
  328. }
  329. function show_result() {
  330. var type = $("#c1").attr("class");
  331. if (type != "hide") {
  332. type = "0";
  333. } else {
  334. type = "1";
  335. }
  336. var typelimit = (type == "0") ? "1:35" : "1:12"; typelimit = typelimit.split(":");
  337. var qiu = (type == "0") ? chi[26] : chi[27];
  338. var s2 = (type == "0") ? "or" : "and";
  339. var ball = "";
  340. if (type == 0) {
  341. var items = $("input[name=" + "gs" + "]");
  342. for (var i = 0; i < items.length; i++) {
  343. if ($(items[i]).prop("checked"))
  344. ball = ball + $(items[i]).val().replace("\n", "").trim() + ",";
  345. }
  346. ball = ball.substr(0, ball.length - 1);
  347. } else {
  348. var items = $("input[name=" + "hgs" + "]");
  349. for (var i = 0; i < items.length; i++) {
  350. if ($(items[i]).prop("checked"))
  351. ball = ball + $(items[i]).val().replace("\n", "").trim() + ",";
  352. }
  353. ball = ball.substr(0, ball.length - 1);
  354. }
  355. var nums = ball.split(",").sort();
  356. var limit = (s2 == "or") ? "1:" + (nums.length) : "1:0"; limit = limit.split(":");
  357. var r1 = $("input[name='r1']:checked").val();
  358. var h2b_limit;
  359. switch (r1) {
  360. case "1": h2b_limit = h2b[h2b.length - 1][2] + ":" + h2b[0][2]; break;
  361. case "2": if (h2b.length - 1 > 100) h2b_limit = h2b[99][2] + ":" + h2b[0][2];
  362. else h2b_limit = h2b[h2b.length - 1][2] + ":" + h2b[0][2];
  363. break
  364. case "3": var r2 = get_select('r2'); var r3 = get_select('r3'); h2b_limit = h2b[r2][2] + ":" + h2b[r3][2]; break;
  365. }
  366. h2b_limit = h2b_limit.split(":");
  367. var innerHTML = "";
  368. innerHTML += "<div class=\"snavbox\">";
  369. innerHTML += "<div class=\"snav\">";
  370. if (type != "0") {
  371. innerHTML += "<a class=\"active\">跟随";
  372. for (var i = 0; i < nums.length; i++) {
  373. if (i == 0) {
  374. innerHTML += nums[i];
  375. } else {
  376. innerHTML += "+" + nums[i];
  377. }
  378. }
  379. innerHTML += "</a>";
  380. }
  381. else {
  382. for (var i = 0; i < nums.length; i++) {
  383. if (i == 0) {
  384. innerHTML += "<a class=\"active\">跟随" + nums[i] + "</a>";
  385. } else {
  386. innerHTML += "<a class=\"\">跟随" + nums[i] + "</a>";
  387. }
  388. }
  389. }
  390. innerHTML += "</div><div class=\"button\"><a class=\"left\"></a><a class=\"right\"></a></div></div>";
  391. for (var i = limit[0] - 1; i <= limit[1]; i++) {
  392. show_concrete(i, "id");
  393. }
  394. detail += "</div>";
  395. innerHTML += detail;
  396. $("#result").html(innerHTML);
  397. $("#result").show();
  398. $(".snav").find("a").click(function () {
  399. $(".snav").find("a").attr('class', '');
  400. $(".num-result").find("ul").attr('class', 'hide');
  401. $(".swiper").find("section").attr('class', 'hide');
  402. $(this).attr('class', 'active');
  403. $(".swiper").find("section").eq($(this).index()).attr('class', '');
  404. $(".num-result").find("ul").eq($(this).index()).attr('class', '');
  405. });
  406. $(".snav").find("a").click(function () {
  407. $(".snav").find("a").attr('class', '');
  408. $(".ssq-gs").find("ul").attr('class', 'hide');
  409. $(this).attr('class', 'active');
  410. $(".snav").offset({ left: "4rem" });
  411. $(".ssq-gs").find("ul").eq($(this).index()).attr('class', '');
  412. });
  413. $('.hidden').hide();
  414. $(".ssq-gs").find("li").click(function () {
  415. $(this).next().siblings("li").find("a").attr('class', '');
  416. $(this).find("dl").slideDown();
  417. $(this).find("a").attr('class', 'blue');
  418. $(this).siblings("li").find("dl").slideUp();
  419. });
  420. location.hash = "#href_result";
  421. }
  422. function show_type(i, type) {
  423. show_concrete(i, type);
  424. var content = detail;
  425. var n = "list" + i;
  426. $("ul[name='" + n + "']").html(content);
  427. }
  428. function show_alltype(b, e, type) {
  429. if (b == '0' && e == '0') {
  430. show_type(0, type);
  431. } else {
  432. for (var i = b; i <= e; i++) {
  433. show_type(i, type);
  434. }
  435. }
  436. }
  437. var detail = "";
  438. function show_concrete(h, type) {
  439. var ctype = $("#c1").attr("class");
  440. if (ctype != "hide") {
  441. ctype = "0";
  442. } else {
  443. ctype = "1";
  444. }
  445. var limit = "";
  446. var ball = "";
  447. if (ctype == 0) {
  448. var items = $("input[name=" + "gs" + "]");
  449. for (var i = 0; i < items.length; i++) {
  450. if ($(items[i]).prop("checked"))
  451. ball = ball + $(items[i]).val().replace("\n", "").trim() + ",";
  452. }
  453. ball = ball.substr(0, ball.length - 1);
  454. } else {
  455. var items = $("input[name=" + "hgs" + "]");
  456. for (var i = 0; i < items.length; i++) {
  457. if ($(items[i]).prop("checked"))
  458. ball = ball + $(items[i]).val().replace("\n", "").trim() + ",";
  459. }
  460. ball = ball.substr(0, ball.length - 1);
  461. }
  462. var nums = ball.split(",").sort();
  463. switch (ctype) {
  464. case "0": for (var j = 35; j >= 1; j--) { limit += "," + j; } break;
  465. case "1": for (var j = 12; j >= 1; j--) { limit += "," + j; } break;
  466. }
  467. if (type == "num") limit = result[h][0];
  468. limit = limit.split(",");
  469. if (h == 0) {
  470. detail += "<div class=\"ssq-gs\"><ul>"
  471. } else {
  472. detail += "<ul class=\"hide\">"
  473. }
  474. for (var j = limit.length - 1; j > 0; j--) {
  475. detail += "<li>";
  476. detail += add_zero(limit[j]);
  477. switch (ctype) {
  478. case "1":
  479. detail += (ctype == "1") ? " " + chi[12] + " " : " " + chi[12] + chi[17] + chi[21]
  480. detail += nums.join("+").substr(0, nums.join("+").length);
  481. break;
  482. default:
  483. detail += " " + chi[12] + " " + nums[h];
  484. break;
  485. }
  486. detail += chi[22] + "<span>";
  487. detail += (result[h][limit[j]].split(",").length - 1);
  488. detail += "</span>" + chi[9];
  489. detail += "<a class=\"bold\">" + chi[24] + "</a>";
  490. show_resultlist(h + 1, limit.length - j)
  491. detail += info;
  492. detail += "</li>";
  493. }
  494. detail += "</ul>";
  495. }
  496. var info;
  497. function show_resultlist(i, j) {
  498. info = "";
  499. var type = $("#c1").attr("class");
  500. if (type != "hide") {
  501. type = "0";
  502. } else {
  503. type = "1";
  504. }
  505. var s2 = (type == "0") ? "or" : "and";
  506. var ball = "";
  507. if (type == 0) {
  508. var items = $("input[name=" + "gs" + "]");
  509. for (var y = 0; y < items.length; y++) {
  510. if ($(items[y]).prop("checked"))
  511. ball = ball + $(items[y]).val().replace("\n", "").trim() + ",";
  512. }
  513. ball = ball.substr(0, ball.length - 1);
  514. } else {
  515. var items = $("input[name=" + "hgs" + "]");
  516. for (var y = 0; y < items.length; y++) {
  517. if ($(items[y]).prop("checked"))
  518. ball = ball + $(items[y]).val().replace("\n", "").trim() + ",";
  519. }
  520. ball = ball.substr(0, ball.length - 1);
  521. }
  522. var nums = ball.split(",").sort();
  523. var list = result[i-1][j].split(",");
  524. var temp_nums1, temp_num2;
  525. var temp_red, temp_blue, temp_orders;
  526. temp_nums1 = (i == 0) ? nums : ("," + nums[i-1]).split(",");
  527. temp_nums2 = add_zero(j);
  528. var innerHTML = "<dl>";
  529. for (var i = 0; i < list.length - 1; i++) {
  530. temp_orders = h2b[list[i]][2];
  531. temp_red = h2b[list[i]][0];
  532. temp_blue = h2b[list[i]][1];
  533. for (var j = 1; j < temp_nums1.length; j++) {
  534. switch (type) {
  535. case "0": temp_red = temp_red.replace(temp_nums1[j], "<b class=\"wred\">" + temp_nums1[j] + "</b>"); break;
  536. case "1": temp_blue = temp_blue.replace(temp_nums1[j], "<b class=\"wred\">" + temp_nums1[j] + "</b>"); break;
  537. }
  538. }
  539. innerHTML += "<dt>";
  540. innerHTML += chi[23] + " " + temp_orders + " " + chi[9] + " ";
  541. innerHTML += temp_red.split(",").join(" ") + " + " + temp_blue.split(",").join(" ");
  542. innerHTML += "</dt><dt>";
  543. temp_orders = h2b[list[i] - 1][2];
  544. temp_red = h2b[list[i] - 1][0];
  545. temp_blue = h2b[list[i] - 1][1];
  546. switch (type) {
  547. case "0": temp_red = temp_red.replace(temp_nums2, "<b class=\"wred\">" + temp_nums2 + "</b>"); break;
  548. case "1": temp_blue = temp_blue.replace(temp_nums2, "<b class=\"wblue\">" + temp_nums2 + "</b>"); break;
  549. }
  550. innerHTML += chi[23] + " " + temp_orders + " " + chi[9] + " ";
  551. innerHTML += temp_red.split(",").join(" ") + " + " + temp_blue.split(",").join(" ");
  552. innerHTML += "</dt>";
  553. }
  554. innerHTML += "</dl>";
  555. info = innerHTML;
  556. }
  557. function add_zero(vars) {
  558. var tempVars = new String(vars).split(",");
  559. for (var i = 0; i < tempVars.length; i++) {
  560. tempVars[i] = (Math.round(tempVars[i]) <= 9) ? "0" + Math.round(tempVars[i]) : tempVars[i];
  561. }
  562. return tempVars.join(",");
  563. }
  564. function get_select(obj) {
  565. var qi = $("select[name='" + obj + "'] option:selected").val();
  566. return qi;
  567. }
  568. function chinese_type(str) {
  569. switch (str) {
  570. case "0": return chi[26]; break;
  571. case "1": return chi[27]; break;
  572. }
  573. }