var dotcounter1 = 0;
var dotcounter2 = 0;
function OnlyNumericEntry1() {            
	var keycodevalue = event.keyCode;
	if (event.keyCode == 46)
	{               
		dotcounter1++;
		if(dotcounter1==2)
		{
			event.returnValue = false;
			alert("Only one dot is allow");
		}
	}
	if ((event.keyCode < 48 || event.keyCode > 57) && event.keyCode != 46) {
		event.returnValue = false;
		alert("Enter Numbers Only");
	}
}
function OnlyNumericEntry2() {
	var keycodevalue = event.keyCode;
	if (event.keyCode == 46) {                
		dotcounter2++;
		if (dotcounter2 == 2) {
			event.returnValue = false;
			alert("Only one dot is allow");
		}
	}
	if ((event.keyCode < 48 || event.keyCode > 57) && event.keyCode != 46) {
		event.returnValue = false;
		alert("Enter Numbers Only");
	}
}

function checkAllRows(obj) {
    var objGridview = obj.closest('table');
    var list = objGridview.getElementsByTagName("input");
    for (var i = 0; i < list.length; i++) {
        var objRow = list[i].parentNode.parentNode;
        if (list[i].type == "checkbox" && obj != list[i]) {
            if (obj.checked) {
                list[i].checked = true;
            }
            else {
                list[i].checked = false;
            }
        }
    }
}
function checkUncheckHeaderCheckBox(obj) {
    var objGridView = obj.closest('table');
    var list = objGridView.getElementsByTagName("input");
    for (var i = 0; i < list.length; i++) {
        var objHeaderChkBox = list[0];
        var checked = true;
        if (list[i].type == "checkbox" && list[i] != objHeaderChkBox) {
            if (!list[i].checked) {
                checked = false;
                break;
            }
        }
    }
    objHeaderChkBox.checked = checked;
}