$.blockUI.defaults.overlayCSS.backgroundColor="#d5d5d5";

$.blockUI.defaults.pageMessageCSS.border="none";
$.blockUI.defaults.pageMessageCSS.backgroundColor="#D6D6D6";
$.blockUI.defaults.pageMessageCSS.margin="-50px 0 0 -200px";
$.blockUI.defaults.pageMessageCSS.width="400px";

$.blockUI.defaults.overlayCSS.backgroundColor = "#e6e6e6";
$.blockUI.defaults.overlayCSS.cursor = "default";

function confirm_popup(title,content,callback,callback1,txt1,txt2){
	if(txt1 == undefined || !txt1){
		txt1 = "确定";
	}
	
	if(txt2 == undefined || !txt2){
		txt2 = "取消";
	}
	
	var _html = "";
	_html += "<div class='pop_bg' style='width:388px; margin:-124px 0 0 -194px;'>";
	_html += "<div class='pop_corner_red tl'>&nbsp;</div>";
	_html += "<div class='pop_corner_red tr'>&nbsp;</div>";
	_html += "<div class='pop_content_red'>";
	_html += "<div class='pop_content_right_red'>";
	_html += "<div class='pop_text'>";
	_html += "<h3 style='text-align:left'><div class='pop_close' id='newbtn_Confirmer_CLOSE'></div>"+title+"</h3>";
	_html += "<div class='pop_point' style='text-align:left;margin-left:20px;margin-right:20px;'>"+content+"</div>";
	_html += "<div class='pop_btn_center'>";
	_html += "<div class='pop_btn'><span><a style='cursor:pointer' id='newbtn_Confirmer_OK'>"+txt1+"</a></span></div>";
	_html += "<div class='pop_btn'><span><a style='cursor:pointer' id='newbtn_Confirmer_CANCEL'>"+txt2+"</a></span></div>";
	_html += "</div>";
	_html += "</div>";
	_html += "</div>";
	_html += "</div>";
	_html += "<div class='pop_corner_red bl'>&nbsp;</div>";
	_html += "<div class='pop_corner_red br'>&nbsp;</div>";
	_html += "</div>";
	
	$.blockUI(_html);
	
	$("#newbtn_Confirmer_OK").click(function(){
	   	$.unblockUI();
	   	if(callback){
			setTimeout(function(){
				$(callback);
			},500);
	   	}
	});
	
	$("#newbtn_Confirmer_CANCEL").click(function(){
		$.unblockUI();
		if(callback1){
			setTimeout(function(){
				$(callback1);
			},500);
		}
	});
	
	$("#newbtn_Confirmer_CLOSE").click(function(){
		$.unblockUI();
	});
}

function alert_popup(content,callback,title){
	
	if(!title){
		title = '提示';
	}
	
	var _html = "";
	_html += "<div class='pop_bg' style='width:388px; margin:-124px 0 0 -194px;'>";
	_html += "<div class='pop_corner_red tl'>&nbsp;</div>";
	_html += "<div class='pop_corner_red tr'>&nbsp;</div>";
	_html += "<div class='pop_content_red'>";
	_html += "<div class='pop_content_right_red'>";
	_html += "<div class='pop_text'>";
	_html += "<h3 style='text-align:left'><div class='pop_close' id='newbtn_alert_CLOSE'></div>"+title+"</h3>";
	_html += "<div class='pop_point'  style='text-align:left;margin-left:20px;margin-right:20px;'>"+content+"</div>";
	_html += "<div class='pop_btn_center'>";
	_html += "<div class='pop_btn'><span><a style='cursor:pointer' id='newbtn_alert_Ok'>确定</a></span></div>";
	_html += "</div>";
	_html += "</div>";
	_html += "</div>";
	_html += "</div>";
	_html += "<div class='pop_corner_red bl'>&nbsp;</div>";
	_html += "<div class='pop_corner_red br'>&nbsp;</div>";
	_html += "</div>";
	
	$.blockUI(_html);
	
	$("#newbtn_alert_Ok").click(function(){
		$.unblockUI();
		
		if(callback){
			setTimeout(function(){
				$(callback);
			},500);
		}
	});	
	
	$("#newbtn_alert_CLOSE").click(function(){
		$.unblockUI();
	});
}