ssqgs.js 21 KB

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