function sumfen() {
    var inps = document.getElementsByTagName("input");
    var val = 0;
    for (var i = 0; i < inps.length; i++) {
        if (inps[i].name.indexOf("txtxzfen") > 0)
            val += parseFloat(inps[i].value);
    }
    document.getElementById("txtzongfen").value = val;
}
function sumsel() {
    var inps = document.getElementsByTagName("select");
    var val = 0;
    for (var i = 0; i < inps.length; i++) {
        if (inps[i].name.indexOf("ddlxzfen") > 0)
            val += parseFloat(inps[i].value);
    }
    document.getElementById("txtzongfen").value = val;
}
function sumxx() {
    var inps = document.getElementsByTagName("select");
    var val = 0;
    for (var i = 0; i < inps.length; i++) {
        if (inps[i].name.indexOf("ddlxx") > 0)
            val += parseFloat(inps[i].value);
    }
    document.getElementById("txtzongfen").value = val;
}
function sumrbl() {
    var inps = document.getElementsByTagName("input");
    var val = 0;
    for (var i = 0; i < inps.length; i++) {
        if (inps[i].name.indexOf("rblxzfen") > 0 && inps[i].checked)
            val += parseFloat(inps[i].value);
    }
    document.getElementById("txtzongfen").value = val;
}
function sumxishu() {
    var gvInfo = document.getElementById("GridView1");
    var val = 0;
    for (var i = 1; i < gvInfo.rows.length; i++) {
        var fenshu = gvInfo.rows[i].cells[5].innerText;
        var textBox = gvInfo.rows[i].cells[6].firstChild;
        var textfen = gvInfo.rows[i].cells[7].firstChild;
        if (textBox.value != "") {
            val += (parseFloat(fenshu) * parseFloat(textBox.value));
        }
        textfen.value = parseFloat(fenshu) * parseFloat(textBox.value);
    }
    document.getElementById("txtzongfen").value = val;
} 
function sumuserall() {
    var gvInfo = document.getElementById("GridView1");
    for (var i = 1; i < gvInfo.rows.length; i++) {
        var fenshu = gvInfo.rows[i].cells[7].innerText;
        var textBox = gvInfo.rows[i].cells[8].firstChild;
        var textfen = gvInfo.rows[i].cells[9].firstChild;
        textfen.value = parseFloat(fenshu) * parseFloat(textBox.value);
    }
}  
function sumbumenall() {
    var gvInfo = document.getElementById("GridView1");
    for (var i = 1; i < gvInfo.rows.length; i++) {
        var fenshu = gvInfo.rows[i].cells[4].innerText;
        var textBox = gvInfo.rows[i].cells[5].firstChild;
        var textfen = gvInfo.rows[i].cells[6].firstChild;
        textfen.value = parseFloat(fenshu) * parseFloat(textBox.value);
    }
} 