function sorba(index, order) {
	document.forms[0].type.value=index;
	document.forms[0].order.value=order;
	document.getElementById('list').submit();
}
function colorcheck(obj) {
	if(clickcheck(obj)) {
		obj.style.backgroundColor='#FFFFCC';
	} else {
		obj.style.backgroundColor='#E8EEF7';
	}
}
function clickcheck(obj) {
	if(obj.childNodes[0].childNodes[0].checked) {
		return true;
	} else {
		return false;
	}
}
function klikk(obj) {
	if(clickcheck(obj)) {
		obj.childNodes[0].childNodes[0].checked=false
	} else {
		obj.childNodes[0].childNodes[0].checked=true
	}
	colorcheck(obj);
}
function mover(obj) {
	obj.style.backgroundColor='#C3D9FF';
	obj.style.cursor='default';
}
function mout(obj) {
	colorcheck(obj);
	obj.style.cursor='default';
}
function blokk(obj) {
	if(obj.checked) {
		obj.checked=false
	} else {
		obj.checked=true
	}
}
function mind(id) {
	input_arr = document.getElementById("tbl_"+id).getElementsByTagName("input");
	inputs = input_arr.length;
	for (i=0;i<inputs;i++) {
		input_arr[i].checked = true;
		colorcheck(document.getElementById("tbl_"+id).childNodes[0].childNodes[i+2]);
	}
}
function none(id) {
	input_arr = document.getElementById("tbl_"+id).getElementsByTagName("input");
	inputs = input_arr.length;
	for (i=0;i<inputs;i++) {
		input_arr[i].checked = false;
		colorcheck(document.getElementById("tbl_"+id).childNodes[0].childNodes[i+2]);
	}
}
function invert(id) {
	input_arr = document.getElementById("tbl_"+id).getElementsByTagName("input");
	inputs = input_arr.length;
	for (i=0;i<inputs;i++) {
		if (input_arr[i].checked) {
			input_arr[i].checked = false;
		} else {
			input_arr[i].checked = true;
		}
		colorcheck(document.getElementById("tbl_"+id).childNodes[0].childNodes[i+2]);
	}
}