// JavaScript Document
//============================obsługa kategorii aktualności===================
var newscat = new Newscat(reviewCallback);

//============================obsługa programu================================
function standard_newscat_perform(result){
	hideloading();
	if (result == '0') shownewscat(order, search_);
	else alertmsg(result);
}
function shownewscat_find(){
	shownewscat(order, $('search_us').value);
}
function addnewscat(ret){
	showloading();
	newscat.addnewscat(ret);
}
function doaddnewscat(form){
	showloading();
	newscat.doaddnewscat(getPayload(form));
}
function locknewscat(id){
	showloading();
	newscat.locknewscat(id);
}
function unlocknewscat(id){
	showloading();
	newscat.unlocknewscat(id);
}
function editnewscat(id, ret){
	showloading();
	newscat.editnewscat(id, ret);
}
function doeditnewscat(form){
	showloading();
	newscat.doeditnewscat(getPayload(form));
}
function remnewscat(id){
	var answer = confirm("Na pewno chcesz usunąć kategorię aktualności?");
	if (answer){
		showloading();
		newscat.remnewscat(id);
	}
}
