function checkByParent(aId, cId) {
    var collection = document.getElementById(aId).getElementsByTagName('INPUT');
    var commanderStatus = document.getElementById(cId).checked;

    for (var x=0; x<collection.length; x++) {
        if (collection[x].type.toUpperCase()=='CHECKBOX'){
            if(commanderStatus == true){
                if(collection[x].checked == false){
                    collection[x].checked = true;
                }
            }else{
                if(collection[x].checked == true){
                    collection[x].checked = false;
                }
            }
        }
    }
}

function popWin(url, name){
    window.open(url, name, 'width=850px, height=500px, resizable=yes, scrollbars=yes, status=yes');
}