
function getXMLHttpRequest() {
	if (window.ActiveXObject) {
		try {
			return new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				return new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e1) { return null; }
		}
	} else if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	} else {
		return null;
	}
}
var httpRequest = null;

function sendRequest(url, params, callback, method) {
	httpRequest = getXMLHttpRequest();
	var httpMethod = method ? method : 'GET';
	if (httpMethod != 'GET' && httpMethod != 'POST') {
		httpMethod = 'GET';
	}
	var httpParams = (params == null || params == '') ? null : params;
	var httpUrl = url;
	if (httpMethod == 'GET' && httpParams != null) {
		httpUrl = httpUrl + "?" + httpParams;
	}
	
	httpRequest.open(httpMethod, httpUrl, true);
	httpRequest.setRequestHeader(
		'Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
	httpRequest.onreadystatechange = callback;
	httpRequest.send(httpMethod == 'POST' ? httpParams : null);
}


function selectAllCheckBox() {
	var divKey1 = document.frmGridAjax.chkNum1;
	var divKey2 = document.frmGridAjax.chkNum2;
	var divKey3 = document.frmGridAjax.chkNum3;
	var divKey4 = document.frmGridAjax.chkNum4;
	var divKey5 = document.frmGridAjax.chkNum5;
	var divKey6 = document.frmGridAjax.chkNum6;
	var divKey7 = document.frmGridAjax.chkNum7;
	var divKey8 = document.frmGridAjax.chkNum8;
	var divKey9 = document.frmGridAjax.chkNum9;
	var divKey10 = document.frmGridAjax.chkNum10;
	
	if (document.frmGridTitle.chkTotal.checked == true)
	{				
		if (divKey1.disabled != true) divKey1.checked = true;
		if (divKey2.disabled != true) divKey2.checked = true;
		if (divKey3.disabled != true) divKey3.checked = true;
		if (divKey4.disabled != true) divKey4.checked = true;
		if (divKey5.disabled != true) divKey5.checked = true;
		if (divKey6.disabled != true) divKey6.checked = true;
		if (divKey7.disabled != true) divKey7.checked = true;
		if (divKey8.disabled != true) divKey8.checked = true;
		if (divKey9.disabled != true) divKey9.checked = true;
		if (divKey10.disabled != true) divKey10.checked = true;
	}else{
		if (divKey1.disabled != true) divKey1.checked = false;
		if (divKey2.disabled != true) divKey2.checked = false;
		if (divKey3.disabled != true) divKey3.checked = false;
		if (divKey4.disabled != true) divKey4.checked = false;
		if (divKey5.disabled != true) divKey5.checked = false;
		if (divKey6.disabled != true) divKey6.checked = false;
		if (divKey7.disabled != true) divKey7.checked = false;
		if (divKey8.disabled != true) divKey8.checked = false;
		if (divKey9.disabled != true) divKey9.checked = false;
		if (divKey10.disabled != true) divKey10.checked = false;
	}
}







