﻿    //checks all DataGrid CheckBoxes with the given name with the given

    function CheckAllDataGridCheckBoxes(aspCheckBoxID, checkVal) {

        re = new RegExp(aspCheckBoxID)  //generated control

        for(i = 0; i < document.forms[0].elements.length; i++) {

            elm = document.forms[0].elements[i]

            if (elm.type == 'checkbox') {

                if (re.test(elm.name)) {

                    elm.checked = checkVal

                }
            }
        }
    }


    function modalWin(theTarget) {
        if (window.showModalDialog) {
            window.showModalDialog(theTarget, "name", "dialogWidth:700px;dialogHeight:700px;status:no;scroll:yes");
        } else {
            window.open(theTarget, 'name', 'height=700,width=700,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no ,modal=yes');
        }
    } 

