function CheckAll( checkAllBox ) {
  var ChkState=checkAllBox.checked;
  var ele = document.getElementsByName("box");
  for(i=0; i < ele.length; i++) {
    ele[i].checked = ChkState;
  }
}

function CheckChanged() {
  var ele = document.getElementsByName("box");
  for(i=0; i < ele.length; i++) {
    if (ele[i].checked == false) {
      boxAllChecked = false;
      break;
    }
  }
  var chkAll = document.getElementById("ctlUserList_grdUserList__ctl1_checkAll");
  if (chkAll != null) chkAll.checked = boxAllChecked;
}

function showSubNav() {
	clearTimeout(this.timeout);
	if($('subNav').style.display == 'none'){
		this.timeout = setTimeout(function(){$('subNav').style.display = 'inline';},20);
	}
}

function hideSubNav() {
	if($('subNav').style.display == 'none'){
		clearTimeout(this.timeout);
	}else{
		this.timeout = setTimeout(function(){$('subNav').style.display = 'none';},100);
	}
}