﻿


function OpenPopup(url) {     
    window.open(url, '', 'width=600, height=500, 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;
        }
    }
}

function verifyStar(dn) {
    var u = "http://www.star.org.uk/verify?dn=" + dn;
    window.open(u, this.target, "toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=560,height=490")
}


