/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
 
function handleCheckBox(obj) {
    var checkBoxName = obj.name;
    var checkBoxValue = obj.checked;
    checkBoxName = checkBoxName.replace(']', "");
    checkBoxName = checkBoxName.replace('[', " ");
    var parts = checkBoxName.split(' ');
    if (parts.length == 2) {
        var textBoxId = parts[0] + "_qty[" + parts[1] + "]";
        var textBox = document.getElementById(textBoxId);
        if (textBox != null) {
            if (checkBoxValue == true) {
                textBox.setAttribute('class', 'bright');
                textBox.focus();
            } else {
                textBox.value = "";
                textBox.setAttribute('class', 'dim');
            }
        }
    }
}

function handleTextBox(obj) {
    obj.setAttribute('class', 'dim');
}
