function checkingBox(labelElement, onclickHandler){
    var ie = document.all;
    var checkBox = document.getElementById(labelElement.getAttribute('for'));

    if (ie) {
        var checkBox = document.getElementById(labelElement.attributes('for').value);
    }

    if ((!checkBox) || checkBox.disabled == true) {
        return;
    }

    if(labelElement.className == "CheckBoxNormal" || labelElement.className == "CheckBoxActive"){
        labelElement.className = checkBox.checked ? "CheckBoxNormal" : "CheckBoxActive";
    }
    if(labelElement.className == "CheckBoxNormal1" || labelElement.className == "CheckBoxActive1"){
        labelElement.className = checkBox.checked ? "CheckBoxNormal1" : "CheckBoxActive1";
    }

    // browser is IE
    if(ie){
        checkBox.checked = !checkBox.checked;
        if (onclickHandler){
            onclickHandler(checkBox);
        }
    }
}

function adjustCheckBoxsStyle(){
    var allCheckBox = document.getElementsByTagName("input");
    for(var count = 0; count < allCheckBox.length; count++)
    {
       if (allCheckBox[count].attributes['type'].value == "checkbox" && allCheckBox[count].checked){
           var allLabel = document.getElementsByTagName("label");
           for (var i = 0; i < allLabel.length; i++)
           {
               if (allLabel[i].attributes['for'] && allLabel[i].attributes['for'].value == allCheckBox[count].id){
                    if(allLabel[i].className == "CheckBoxNormal"){
                        allLabel[i].className="CheckBoxActive";
                    }
                    if(allLabel[i].className == "CheckBoxNormal1"){
                        allLabel[i].className="CheckBoxActive1";
                    }
               }
           }
       }
    }
}