var script='/ajax.php';

function loadingSelect(obj) {
	$("#poroda").html('<option value="">загрузка данных</option>');
}

function loadPoroda(type) {
	$.ajax({   
			type: "POST",
			url: script,
			data: "loadPoroda=" + type,
			beforeSend: function(){loadingSelect('poroda')}, //show loading just when link is clicked   
			success: function(html) { //so, if data is retrieved, store it in html   
			$("#poroda").html(html); //show the html inside .content div 
		}   
	}); //close $.ajax(
}

function popPage(value, table, kind) {  
	kind ? location.href='main.php?action='+table+ '&kind='+kind+'&page='+value : location.href='main.php?action='+table+'&page='+value;
}