function getNextPage() {
	ajaxObj.debug=0;
	ajaxObj.format = 'TEXT';
	ajaxObj.call("action=class_post_product&command=next_page", setPage);
	return false;
}

function getPreviousPage() {
	ajaxObj.debug=0;
	ajaxObj.format = 'TEXT';
	ajaxObj.call("action=class_post_product&command=previous_page", setPage);
	return false;
}


function setPage(resp) {
	//alert(resp);
	if(resp)
		window.location.href = resp;
	else
		alert("Error:");
}

function setCart(resp) {
	if(resp)
		document.getElementById('cart_small').innerHTML = resp;
	else
		alert("ERROR:");
}
function setSize(resp) {
	if(resp) {
		var temp = document.getElementById('size');
		if(temp)
			temp.innerHTML = resp;
	}
	else
		alert("ERROR:");
}

function reloadCart(page) {
	ajaxObj.debug=0;
	ajaxObj.format = 'TEXT';
	ajaxObj.call("action=class_post_cart&command=reload_cart&page="+page['page'], setCart);
	return false;
}

function reloadSize(page, id) {
	ajaxObj.debug=0;
	ajaxObj.format = 'TEXT';
	if(!id)
		id = "";
	ajaxObj.call("action=class_post_cart&command=reload_size&page="+page+"&pic_id="+id, setSize);
	return false;
}
