// JavaScript Document
//============================obsługa kategorii osobowych===================
var peoplecat = new Peoplecat(reviewCallback);

//============================obsługa programu================================
function standard_peoplecat_perform(result){
	hideloading();
	if (result == '0') showpeoplecat(order, search_);
	else alertmsg(result);
}
function showpeoplecat_find(){
	showpeoplecat(order, $('search_us').value);
}
function addpeoplecat(ret){
	showloading();
	peoplecat.addpeoplecat(ret);
}
function doaddpeoplecat(form){
	showloading();
	peoplecat.doaddpeoplecat(getPayload(form));
}
function lockpeoplecat(id){
	showloading();
	peoplecat.lockpeoplecat(id);
}
function unlockpeoplecat(id){
	showloading();
	peoplecat.unlockpeoplecat(id);
}
function editpeoplecat(id, ret){
	showloading();
	peoplecat.editpeoplecat(id, ret);
}
function doeditpeoplecat(form){
	showloading();
	peoplecat.doeditpeoplecat(getPayload(form));
}
function rempeoplecat(id){
	var answer = confirm("Na pewno chcesz usunąć kategorię osobową?");
	if (answer){
		showloading();
		peoplecat.rempeoplecat(id);
	}
}
function activatepeopleuploader(pers){
	person = pers;
	peoplecat.peopleuploader('peopleupload', pers);
}
