function cat_nav_edit(id,is_cat){
	if(!id) {$.showErr('参数错误',0,'hc'); return false;}
	if(is_cat==1){
		$.openUrl(APP+"Shop/Shops/cat_add/id/"+id, '编辑分类', 'ID', '500','hc'); 
	}else{
		$.openUrl(APP+"Shop/Shops/nav_add/id/"+id, '编辑导航', 'ID', '500','hc');
	}
}
function child_add(pid,is_cat,is_child){
	if(is_child==1){
		$.showErr('不能添加子分类',0,'hc');
	}else{
		if(is_cat==1 && is_child==0){
			$.openUrl(APP+"Shop/Shops/cat_add/pid/"+pid, '添加分类', 'ID', '500','hc'); 
		}else{
			$.openUrl(APP+"Shop/Shops/nav_add/pid/"+pid, '添加导航', 'ID', '500','hc'); 
		}
	}	
}
function cat_nav_add(){
	var query=new Object();
	query = $("form[name='myform']").serialize();
	     $.ajax({
	           url:APP + "Shop/Shops/cat_nav_add",
	           data:query,
	           type:"post",
	           success:function(data){
	              if(data.status==1) {
	                     $.showSuccess(data.msg,0,'hc');
	                     window.location.reload();
	               }else{
	                     $.showErr(data.msg,0,'hc');
	               }
	           }
	      })
}
function close_pop(){
    window.location.reload(); //刷新父窗口中的网页
    window.close();
}