var chi = new Array(); chi[0] = "和"; chi[1] = "或"; chi[2] = "红蓝的类型选择出现错误!"; chi[3] = "您选择的"; chi[4] = "号码不足,"; chi[5] = "数据分析范围,"; chi[6] = "请继续选择"; chi[7] = "根据七乐彩历史 "; chi[8] = "—"; chi[9] = "期"; chi[10] = "分析:"; chi[11] = "全按"; chi[12] = "跟随"; chi[13] = "数量"; chi[14] = "排序"; chi[15] = "号码"; chi[16] = "开出"; chi[17] = "同时"; chi[18] = "后"; chi[19] = "统计:"; chi[20] = "按照"; chi[21] = "出现"; chi[22] = "合计"; chi[23] = "第"; chi[24] = "看详情"; chi[25] = "的数据列表:"; chi[26] = "红球"; chi[27] = "蓝球"; for (var i = 0; i < chi.length; i++) { chi[i] = unescape(chi[i]); } var current = h2b[0]; var f1 = document.getElementById("fm1"); function show_num() { bulid_ri(); } function check_s1() { document.getElementById("result").style.display = "none"; for (var i = 1; i < 33; i++) { var zeroi = add_zero(i); document.getElementById("chk_red" + zeroi).checked = false; document.getElementById("btn_red" + zeroi).className = "bigball grey"; } for (var j = 1; j < 17; j++) { var zeroj = add_zero(j); document.getElementById("btn_blue" + zeroj).className = "bigball grey"; document.getElementById("cir_blue" + zeroj).checked = false; } document.getElementById("nums").value = ""; } function bulid_ri() { for (var i = 0; i < h2b.length; i++) { document.getElementById("r5").options[i] = new Option(h2b[i][2], i); document.getElementById("r6").options[i] = new Option(h2b[i][2], i); } document.getElementById("r5").options[i - 1].selected = true; } function bulid_ci(type) { var obj, innerHTML, limit; innerHTML = ""; limit = (type == "red") ? "1:30" : "1:30"; limit = limit.split(":"); for (var i = limit[0]; i <= limit[1]; i++) { innerHTML += ""; innerHTML += ""; switch (type) { case "red": if (i % 11 == 0) innerHTML += "
"; break; case "blue": if (i % 8 == 0) innerHTML += "
"; break; } } obj = document.getElementById("sel_" + type); obj.innerHTML = innerHTML; } function bulid_ciradio(type) { var obj, innerHTML, limit; innerHTML = ""; limit = (type == "red") ? "1:30" : "1:30"; limit = limit.split(":"); for (var i = limit[0]; i <= limit[1]; i++) { innerHTML += ""; innerHTML += ""; switch (type) { case "red": if (i % 11 == 0) innerHTML += "
"; break; case "blue": if (i % 8 == 0) innerHTML += "
"; break; } } obj = document.getElementById("sel_" + type); obj.innerHTML = innerHTML; } function check_c1(obj) { var type = get_radio(document.getElementsByName("s1")); var num = document.getElementById("nums").value.split(",").length - 1; if (type == "red") { if (document.getElementById("chk_" + type + obj.value).checked == false) { obj.className = "bigball redball"; document.getElementById("chk_" + type + obj.value).checked = true; } else { obj.className = "bigball grey"; document.getElementById("chk_" + type + obj.value).checked = false; } if (document.getElementById("chk_" + type + obj.value).checked) { if (document.getElementById("nums").value.search(obj.value) < 0) document.getElementById("nums").value += obj.value + ","; } else { document.getElementById("nums").value = document.getElementById("nums").value.replace(obj.value + ",", ""); } } if (document.getElementById("nums").value.length > 18) { alert("最多只能选择6个红球号!"); obj.className = "bigball grey"; document.getElementById("nums").value = document.getElementById("nums").value.replace(obj.value + ",", ""); return false; } } function check_c1radio(obj) { var type = get_radio(document.getElementsByName("s1")); if (type == "blue") { if (document.getElementById("btn_" + type + obj.value).className != "bigball redball") { for (var i = 1; i < 17; i++) { var zeroi = add_zero(i); document.getElementById("btn_" + type + zeroi).className = "bigball grey"; } if (document.getElementById("cir_" + type + obj.value).checked == false) { obj.className = "bigball redball"; document.getElementById("cir_" + type + obj.value).checked = true; document.getElementById("nums").value = obj.value + ","; } } } //alert(document.getElementById("nums").value); } function input_t1(obj) { var type = $("input[name='r1']:checked").val(); var limit; limit = (type == "0") ? "1:30" : "1:30"; limit = limit.split(":"); obj.value = obj.value.replace(/\D/gi, ""); try { if (obj.value.length == 2) { if (Math.round(obj.value) >= limit[0] && Math.round(obj.value) <= limit[1]) { f1.start.focus(); } else { obj.value = ""; } } } catch (e) { } } function leave_t1() { var type = $("input[name='r1']:checked").val(); var obj = eval("f1.t1_" + type); var num = ""; for (var i = 0; i < obj.length; i++) { if (obj[i].value != "" && num.search(obj[i].value + ",") < 0) num += obj[i].value + ","; } f1.nums.value = num; //check_input(); } function change_s2(str) { var obj = document.all.s3; for (var i = 0; i < obj.length; i++) { obj[i].innerHTML = (str == "or") ? chi[1] : chi[0]; } } function check_input() { var obj; var type = $("input[name='s1']:checked").val(); var nums = f1.nums.value.split(","); obj = (type == "red") ? f1.c1_red : f1.c1_blue; alert(obj.length); for (var i = 0; i < obj.length; i++) { obj[i].checked = false; obj[i].nextSibling.className = ""; } for (var i = 0; i < nums.length - 1; i++) { obj[Math.round(nums[i]) - 1].checked = true; obj[Math.round(nums[i]) - 1].nextSibling.className = "check_" + type; } obj = (type == "red") ? f1.t1_red : f1.t1_blue; switch (type) { case "red": for (var i = 0; i < obj.length; i++) { obj[i].value = ""; } break; case "blue": obj.value = ""; break; } switch (type) { case "red": for (var i = 0; i < nums.length - 1; i++) { obj[Math.round(i)].value = nums[i]; } break; case "blue": obj.value = nums[0]; break; } } function check_start() { var type = $("#c1").attr("class"); if (type != "hide") { type = "0"; } else { type = "1"; } var ball = ""; if (type == 0) { var items = $("input[name=" + "qxgs" + "]"); for (var i = 0; i < items.length; i++) { if ($(items[i]).prop("checked")) ball = ball + $(items[i]).val().replace("\n", "").trim() + ","; } ball = ball.substr(0, ball.length - 1); } else { var items = $("input[name=" + "qxgb" + "]"); for (var i = 0; i < items.length; i++) { if ($(items[i]).prop("checked")) ball = ball + $(items[i]).val().replace("\n", "").trim() + ","; } ball = ball.substr(0, ball.length - 1); } var r1 = $("input[name='r1']:checked").val(); var isstart = true; if (type != "0" && type != "1") { alert(chi[2]); isstart = false; } if (ball == "") { alert(chi[3] + chi[4] + chi[6]); isstart = false; } if (r1 == "") { alert(chi[3] + chi[5] + chi[6]); isstart = false; } var ball_num = ball.split(",").sort(); if (type == 0) { if (ball_num.length > 7) { alert("红球个数在1至7个."); isstart = false; } } else { if (ball_num.length > 1) { alert("蓝球个数只有1个."); isstart = false; } } if (isstart) { num_start(); } } var result = new Array(); function format_result() { for (var i = 0; i <= 30; i++) { result[i] = new Array(); for (var j = 0; j <= 30; j++) { result[i][j] = ""; } } } function num_start() { format_result(); document.getElementById("result").style.display = "none"; var type = $("#c1").attr("class"); if (type != "hide") { type = "0"; } else { type = "1"; } var ball = ""; if (type == 0) { var items = $("input[name=" + "qxgs" + "]"); for (var i = 0; i < items.length; i++) { if ($(items[i]).prop("checked")) ball = ball + $(items[i]).val().replace("\n", "").trim() + ","; } ball = ball.substr(0, ball.length - 1); } else { var items = $("input[name=" + "qxgb" + "]"); for (var i = 0; i < items.length; i++) { if ($(items[i]).prop("checked")) ball = ball + $(items[i]).val().replace("\n", "").trim() + ","; } ball = ball.substr(0, ball.length - 1); } var nums = ball.split(",").sort(); var s2 = (type == "0") ? "or" : "and"; switch (s2) { case "and": analy_start(type, 0, nums); break; case "or": for (var i = 0; i < nums.length; i++) { analy_start(type, i, ("," + nums[i]).split(",")); } break; } //iframe.location.href = "tools_count.asp?act=follow"; detail = ""; sort_start(); show_result(); } function analy_start(type, id, nums) { var isTrue = true; var num_red; var r1 = $("input[name='r1']:checked").val(); var h2b_limit; switch (r1) { case "1": h2b_limit = h2b.length - 1 + ":" + 0; break; case "2": h2b_limit = 100 + ":" + 0; break; case "3": var r2 = get_select('r2'); var r3 = get_select('r3'); h2b_limit = r2 + ":" + r3; break; } h2b_limit = h2b_limit.split(":"); h2b_limit[0] = Math.round(h2b_limit[0]); h2b_limit[1] = Math.round(h2b_limit[1]); for (var i = h2b_limit[0]; i > h2b_limit[1]; i--) { switch (type) { case "0": isTrue = balance_start(nums, h2b[i][0]); if (isTrue) { num_red = h2b[i - 1][0].split(","); for (var j = 0; j < num_red.length; j++) { result[id][Math.round(num_red[j])] += i + ","; } } break; case "1": isTrue = balance_start(nums, h2b[i][1]); if (isTrue) { result[id][Math.round(h2b[i - 1][1])] += i + ","; } break; } } } function balance_start(u_nums, h_nums) { var isTrue = false; for (var i = 0; i < u_nums.length; i++) { if (Math.round(u_nums[i]) > 0) { if (h_nums.search(u_nums[i]) < 0) { isTrue = false; break; } else { isTrue = true; } } } return isTrue; } function sort_start() { var type = $("#c1").attr("class"); if (type != "hide") { type = "0"; } else { type = "1"; } var limit = (type == "0") ? "1:30" : "1:30"; limit = limit.split(":"); for (var i = 0; i < result.length; i++) { for (var j = limit[0]; j <= limit[1]; j++) { result[i][0] += add_zero(result[i][j].split(",").length - 1) + "," + add_zero(j) + "||"; } result[i][0] = result[i][0].split("||").sort(); for (var j = 1; j < result[i][0].length; j++) { result[i][0][j] = result[i][0][j].split(","); result[i][0][j] = Math.round(result[i][0][j][1]); } result[i][0] = result[i][0].join(","); } } function show_result() { var type = $("#c1").attr("class"); if (type != "hide") { type = "0"; } else { type = "1"; } var typelimit = (type == "0") ? "1:30" : "1:30"; typelimit = typelimit.split(":"); var qiu = (type == "0") ? chi[26] : chi[27]; var s2 = (type == "0") ? "or" : "and"; var ball = ""; if (type == 0) { var items = $("input[name=" + "qxgs" + "]"); for (var i = 0; i < items.length; i++) { if ($(items[i]).prop("checked")) ball = ball + $(items[i]).val().replace("\n", "").trim() + ","; } ball = ball.substr(0, ball.length - 1); } else { var items = $("input[name=" + "qxgb" + "]"); for (var i = 0; i < items.length; i++) { if ($(items[i]).prop("checked")) ball = ball + $(items[i]).val().replace("\n", "").trim() + ","; } ball = ball.substr(0, ball.length - 1); } var nums = ball.split(",").sort(); var limit = (s2 == "or") ? "1:" + (nums.length) : "1:0"; limit = limit.split(":"); var r1 = $("input[name='r1']:checked").val(); var h2b_limit; switch (r1) { case "1": h2b_limit = h2b[h2b.length - 1][2] + ":" + h2b[0][2]; break; case "2": h2b_limit = h2b[99][2] + ":" + h2b[0][2]; break; case "3": var r2 = get_select('r2'); var r3 = get_select('r3'); h2b_limit = h2b[r2][2] + ":" + h2b[r3][2]; break; } h2b_limit = h2b_limit.split(":"); var innerHTML = ""; innerHTML+="
"; innerHTML+="
"; for (var i = 0; i < nums.length; i++) { if (i==0) { innerHTML+="跟随"+nums[i]+""; }else { innerHTML += "跟随" + nums[i] + ""; } } innerHTML += "
"; for (var i = limit[0] - 1; i <= limit[1]; i++) { show_concrete(i, "id"); } detail += ""; innerHTML += detail; $("#result").html(innerHTML); $("#result").show(); $(".snav").find("a").click(function () { $(".snav").find("a").attr('class', ''); $(".num-result").find("ul").attr('class', 'hide'); $(".swiper").find("section").attr('class', 'hide'); $(this).attr('class', 'active'); $(".swiper").find("section").eq($(this).index()).attr('class', ''); $(".num-result").find("ul").eq($(this).index()).attr('class', ''); }); $(".snav").find("a").click(function () { $(".snav").find("a").attr('class', ''); $(".ssq-gs").find("ul").attr('class', 'hide'); $(this).attr('class', 'active'); $(".snav").offset({ left: "4rem" }); $(".ssq-gs").find("ul").eq($(this).index()).attr('class', ''); }); $('.hidden').hide(); $(".ssq-gs").find("li").click(function () { $(this).next().siblings("li").find("a").attr('class', ''); $(this).find("dl").slideDown(); $(this).find("a").attr('class', 'blue'); $(this).siblings("li").find("dl").slideUp(); }); location.hash = "#href_result"; } function show_type(i, type) { show_concrete(i, type); var content = detail; var n = "list" + i; $("ul[name='" + n + "']").html(content); } function show_alltype(b, e, type) { if (b == '0' && e == '0') { show_type(0, type); } else { for (var i = b; i <= e; i++) { show_type(i, type); } } } var detail=""; function show_concrete(h, type) { var limit = ""; var ctype = $("#c1").attr("class"); if (ctype != "hide") { ctype = "0"; } else { ctype = "1"; } var ball = ""; if (ctype == 0) { var items = $("input[name=" + "qxgs" + "]"); for (var i = 0; i < items.length; i++) { if ($(items[i]).prop("checked")) ball = ball + $(items[i]).val().replace("\n", "").trim() + ","; } ball = ball.substr(0, ball.length - 1); } else { var items = $("input[name=" + "qxgb" + "]"); for (var i = 0; i < items.length; i++) { if ($(items[i]).prop("checked")) ball = ball + $(items[i]).val().replace("\n", "").trim() + ","; } ball = ball.substr(0, ball.length - 1); } var nums = ball.split(",").sort(); switch (ctype) { case "0": for (var j = 30; j >= 1; j--) { limit += "," + j; } break; case "1": for (var j = 30; j >= 1; j--) { limit += "," + j; } break; } if (type == "num") limit = result[h][0]; limit = limit.split(","); if (h == 0) { detail += "