function addNotepad(id,cid) {

		JsHttpRequest.query(
			'/include/js_back.php', // backend
			{
				// pass a text value 
				'a': 'add-notepad',
				'id':id,
				'cid':cid
			},
			// Function is called when an answer arrives. 
			function(result, errors) {
				alert("Документ добавлен в блокнот!");
			},
			false  // do not disable caching
		);
}

function removeNotepad(id) {
if (window.confirm("Удалить из блокнота?")){
		JsHttpRequest.query(
			'/include/js_back.php', // backend
			{
				// pass a text value 
				'a': 'remove-notepad',
				'id':id
			},
			// Function is called when an answer arrives. 
			function(result, errors) {
				window.location.reload(location.href);
			},
			false  // do not disable caching
		);
}
}
