function loadAjax(link_data,element_insert,data,editor_name)
{
	$.ajax({
		url: link_data,
		data:data,
		type: 'get',
		dataType: 'html',
		success: function(html) {
			if (html) {
				if(element_insert.search('#') != -1 ){
					var rename = element_insert.split('#');
					document.getElementById(rename[1]).innerHTML = html;
				}
				else $(element_insert).html(html);
				// @var (name) tên của thẻ textarea muốn add editor	
				if(editor_name) addEditor(editor_name);
			}
		}   
	});
	//$("#loading-mask").ajaxStart(function(){ $(this).show();});
	//$("#loading-mask").ajaxStop(function(){$(this).hide();});
}
function showMenuItem(id,idlist,value)
{
	$(id).parent().parent().find('.level2').each(function(){
		$(this).fadeOut(500);
	});
	var url="index.php?route=common/column_left/LoadChildItem&category_id="+value;
	var url_list="index.php?route=common/content/getListProduct&category_id="+value;
	loadAjax(url_list,idlist,'','');
	$(idlist).load(url_list);
	loadAjax(url,id,'','');
	$(id).fadeIn(500);
	
}
