
	function checkBoxAll_(form, fields) {

		if(fields.length){
			for(count = 0; count < fields.length; count++){
				if (form.checkAll_.checked == true) {
					if(fields[count].disabled == false) {
						fields[count].checked = true;
					}
					form.checkAll.checked = true;
				} else {
					fields[count].checked = false;
					form.checkAll.checked = false;
				}
			}
		}else{
			
			if (form.checkAll_.checked == true) {
				fields.checked = true;
				form.checkAll.checked = true;
			} else {
				fields.checked = false;
				form.checkAll.checked = false;
			}
		}
	}
	
	function checkBoxAll(form, fields) {
		if( fields.length ) {
			for(count = 0; count < fields.length; count++){
				if (form.checkAll.checked == true) {
					if(fields[count].disabled == false) {
						fields[count].checked = true;
					}
					form.checkAll_.checked = true;
				} else {
					fields[count].checked = false;
					form.checkAll_.checked = false;
				}
			}
		} else {
			if( form.checkAll.checked == true ) {
				fields.checked = true;
				form.checkAll_.checked = true;
			} else {
				fields.checked = false;
				form.checkAll_.checked = false;
			}
		}
	}
	function checkBoxUnit(form, fields) {
		
		form.checkAll.checked = true;
		form.checkAll_.checked = true;
		if( fields.length ) {
			for(count = 0; count < fields.length; count++){
				if( fields[count].disabled == false && fields[count].checked == false ) {
					form.checkAll.checked = false;
					form.checkAll_.checked = false;
				}
			}
		} else {
			if( fields.disabled == false && fields.checked == false ) {
				form.checkAll.checked = false;
				form.checkAll_.checked = false;
			}
		}
		
	}
