function productpaging(offset,option)
{
	if(option == undefined){
		option = $("#product_filter_option").val();
		if(option == undefined){
			option = 'expired';
		}
	}
	if(offset == undefined){
		offset = 0;
	};
	
	$.ajax({
				type:'post',
				url:base_url+'catalog/getallproducts',
				async: true,
				data: {"offset":offset,"limit":"5","product_filter_option":option},
				success:function(response)
				{
					//alert(response);
					$selected_option ='';
					$("#products-list").html(response);
					$("input[name='product_option']").each(function() {
						$radio_option_val = $(this).val();
						if($radio_option_val == option){
							$(this).attr("checked","checked");
							$selected_option = option;
							return false;
						}});
					$("#product_filter_option").attr("value",$selected_option);
				}
			});
}

function sellerproducts(offset,seller,option)
{
	if(option == undefined){
		option = $("#product_filter_option").val();
		if(option == undefined){
			option = 'expired';
		}
	}
	if(offset == undefined){
		offset = 0;
	};
	
	$.ajax({
				type:'post',
				url:base_url+'catalog/getSellerProducts',
				async: true,
				data: {"offset":offset,"limit":"5","product_filter_option":option,"seller":seller},
				success:function(response)
				{
					//alert(response);
					$selected_option ='';
					$("#products-list").html(response);
					$("input[name='product_option']").each(function() {
						$radio_option_val = $(this).val();
						if($radio_option_val == option){
							$(this).attr("checked","checked");
							$selected_option = option;
							return false;
						}});
					$("#product_filter_option").attr("value",$selected_option);
				}
			});
}

function catalogproductpaging(offset,type,option)
{
	if(option == undefined){
		option = $("#product_filter_option").val();
		if(option == undefined){
			option = 'expired';
		}
	}
	if(offset == undefined){
		offset = 0;
	};
	
	$.ajax({
				type:'post',
				url:base_url+'catalog/getcatalogproducts',
				async: true,
				data: {"offset":offset,"limit":"5","product_filter_option":option,"type":type},
				success:function(response)
				{
					//alert(response);
					$selected_option ='';
					$("#products-list").html(response);
					$("input[name='product_option']").each(function() {
						$radio_option_val = $(this).val();
						if($radio_option_val == option){
							$(this).attr("checked","checked");
							$selected_option = option;
							return false;
						}});
					$("#product_filter_option").attr("value",$selected_option);
				}
			});
}


function gettopic(value)
{
	if(value != 'none'){
		$("#seller_contact_form").submit();
	}
	else{
		return false;
	}
}

