var cs_switch;
function switch_cs (value) {
	cs_switch = value;
}

function dcb (id,type) {
	if (cs_switch) {
		$('#cb_'+id).attr('checked',!$('#cb_'+id).attr('checked'))
	}
	chcolors (type,id);
}

function chcolors (type,id) {
	if (type)
		style = "odd";
	else
		style = "dbl";
	if ($("#cb_"+id).attr("checked"))
		$("tr[show='ti"+id+"']").attr("className","sel");
	else
		$("tr[show='ti"+id+"']").attr("className",style);
}

function select_all(){
    for (i = 0; i < document.forms.HiddenForm.elements.length; i++){
      var item = document.forms.HiddenForm.elements[i];
      if (item.name == "cb_select[]"){
          item.checked = document.getElementById('cb_select_all').checked;
      };
    }
  }

function get_data_1() {
	return JSON.stringify(data_1);
}

function get_data_2() {
	return JSON.stringify(data_2);
}

function get_data_3() {
	return JSON.stringify(data_3);
}

function ctrc (id,cls) {
	if ($("#cb_"+id).attr("checked")== false) {
		$("#t"+id).attr("className",cls);
	} else {
		$("#t"+id).attr("className","sel");
	}
}
cs_switch = true;
