//删除时，确定删除
function modalComfirm(msg,callback) {
	$("#comfirModal").modal("show");
	$("#comfirModalcontent").html(msg);
	var dialog_ok = document.getElementById("sure_btn");
	dialog_ok.onclick = function() {
	    callback.call(this,true);
	    $('#comfirModal').modal("hide");
	};
	var dialog_no = document.getElementById("close");
	dialog_no.onclick = function() {
		callback.call(this,false);
		$('#comfirModal').modal("hide");
	};
}
var numcheck = /^[0-9]*$/;
var idcardcheck = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/;
var moneycheck = /^(([1-9][0-9]*\.[0-9][0-9]*)|([0]\.[0-9][0-9]*)|([1-9][0-9]*)|([0]{1}))$/;
function formatDate(){
	var date = new Date(); //获取当前时间
	var y = date.getFullYear();
	var m = date.getMonth() + 1;
	m = m < 10 ? '0' + m : m;
	var d = date.getDate();
	d = d < 10 ? ('0' + d) : d;
	return y + '-' + m + '-' + d;
}

function formaterTime(){
	var date = new Date(); //获取当前时间
	var h = date.getHours();
    var m = date.getMinutes();
    var s = date.getSeconds();
	return h+":"+m+":"+s
}