var getSub = function(catid,selected_id,current_id)
{
	if(typeof(selected_id)=="undefined") selected_id = 0;
	if(typeof(current_id)=="undefined") current_id = 0;//alert(A_BASE_URL+'shop/ajax_shop/getSubcategoryByCategory/'+catid+'/'+selected_id+'/'+current_id);
	$("#subcat_p").load(A_BASE_URL+'shop/ajax_shop/getSubcategoryByCategory/'+catid+'/'+selected_id+'/'+current_id);
}

function add_field() 
{
   var strToAdd = '<p>Field: <input id="field[]" name="field[]" /> Value: <input id="value[]" name="value[]" /> <a href="#" onclick="remove_field($(this).parent());"><img src="'+BASE_URL+'assets/images/delete.png" alt="remove" /></a></p>';
   $('#custom_field').append(strToAdd);
}

function remove_field(arg)
{
	arg.remove();
}
