﻿function SelectAllCheckboxes(spanChk) {
	// Added as ASPX uses SPAN for checkbox
	var oItem = spanChk.children;
	var theBox = (spanChk.type == "checkbox") ?
        spanChk : spanChk.children.item[0];
	xState = theBox.checked;
	elm = theBox.form.elements;

	for (i = 0; i < elm.length; i++)
		if (elm[i].type == "checkbox" &&
              elm[i].id != theBox.id) {
		//elm[i].click();

		if (elm[i].checked != xState)
			elm[i].click();
		//elm[i].checked=xState;
	}
}
function queryString(parameter) {
	var loc = location.search.substring(1, location.search.length);
	var param_value = false;
	var params = loc.split("&");
	for (i = 0; i < params.length; i++) {
		param_name = params[i].substring(0, params[i].indexOf('='));
		if (param_name == parameter) {
			param_value = params[i].substring(params[i].indexOf('=') + 1)
		}
	}
	if (param_value) {
		return param_value;
	}
	else {
		return false; //Here determine return if no parameter is found
	}
}