﻿
function OpenPopup(url) {
    var u = url;    
    window.open(u, '', 'width=750,height=600,status= no, resizable= yes, scrollbars=yes, toolbar=no,location=no,menubar=no')
}


function selectAll(involker) {

    // Since ASP.NET checkboxes are really HTML input elements

    //  let's get all the inputs 


    var inputElements = document.getElementsByTagName('input');



    for (var i = 0; i < inputElements.length; i++) {

        var myElement = inputElements[i];



        // Filter through the input types looking for checkboxes


        if (myElement.type === "checkbox") {



            // Use the involker (our calling element) as the reference 

            //  for our checkbox status

            myElement.checked = involker.checked;

        }

    }

}

function disableAllGridViewButtons(gridViewID) {
    alert('in');
    alert(gridViewID);    
    var gridView = document.getElementById(gridViewID);
    var gridViewControls = gridView.getElementsByTagName("input");

    for (i = 0; i < gridViewControls.length; i++) {
        // if this input type is button, disable
        if (gridViewControls[i].type == "submit") {
            gridViewControls[i].disabled = true;
        }
    }
} 


