// JavaScript Document
function postajax(ajaxurl,para,returnurl,isfather){
	$.ajax({
		url: ajaxurl,
		type: 'POST',
		dataType: 'json',
		timeout: 5000,//超时时间设定
		data:para,//参数设置
		error: function(){alert('error');},//错误处理，隐藏进度条
		success: function(json){
			//加载成功处理
			
			if(json.state == 1){
				alert('操作成功');
				if(isfather==1){
					window.parent.location.href = returnurl;
				}else{
					window.location.href = returnurl;
				}
			}else{
				$.each($(".errorstr"), function(key, value) { 
				  $(this).html(""); 
				});
				var tips = "#tips_"+json.tipsext;
				var errstr = json.info;
				$(tips).html(errstr); 
				$("#"+json.tipsext).focus();

			}
		}
	});
}
