//fpv=2
function mw_chkboxselectortb_set_val_all(tbl,checked,celcrt,tpinput) {
	
	if (!celcrt){
		celcrt=0;
	}
	for (i=0;i<tbl.rows.length;i++){
		var cell=tbl.rows[i].cells[celcrt];
		var chkbox=mw_chkboxselectortb_get_chkbox(cell,tpinput);
		if (chkbox){
			chkbox.checked=checked;
		}
	}
	
}
function mw_chkboxselectortb_get_chkbox(cell,tpinput) {
	if (!tpinput){
		tpinput="checkbox";
	}
	var inputs= cell.getElementsByTagName("input");
	if(inputs){
		for (x=0;x<inputs.length;x++){
			if (inputs[x].type==tpinput){
				return 	inputs[x];
			}
		}
	}
}
function mw_chkboxselectortb_set_val_all_fromchk(chk,celcrt,tpinput) {
	var tbl=mw_dom_get_parent_by_tagname(chk,"table");
	if (tbl){
		mw_chkboxselectortb_set_val_all(tbl,chk.checked,celcrt,tpinput);
	}
}



