
function SelectAll(div){ var inputs = getObject(div);var chks=inputs.getElementsByTagName("input");for (var i=0; i < chks.length; i++)if (chks[i].type == 'checkbox'){chks[i].checked=1;}}

function Opposite(div){var inputs = getObject(div);var chks=inputs.getElementsByTagName("input");for (var i=0; i < chks.length; i++)if (chks[i].type == 'checkbox'){if(chks[i].checked==1)chks[i].checked=0;else chks[i].checked=1;}}
function isSelect(div){var inputs = getObject(div);var chks=inputs.getElementsByTagName("input");for (var i=0; i < chks.length; i++)if (chks[i].type == 'checkbox'){if(chks[i].checked==1)return true}alert("当前没有选中项");return false;}
function getObject(objectId){if(document.getElementById&&document.getElementById(objectId)){return document.getElementById(objectId)}else if(document.all&&document.all(objectId)){return document.all(objectId)}else if(document.layers&&document.layers[objectId]){return document.layers[objectId]}else{return false} }

function OppositeTit(div){

    var inputs = getObject(div);

    var chks=inputs.getElementsByTagName("input");

        for (var i=0; i < chks.length; i++)
        {  
            if (chks[i].type == 'checkbox'&&chks[i].disabled==0)
            { 
                if(chks[i].checked==1)

                chks[i].checked=0;

                else
                 chks[i].checked=1;
               
             }
         
         }
}

