//模态框点击空白不关闭
$(".modal").modal({
　　backdrop: "static",//点击空白处不关闭对话框
　　show:false
})
//模态框展示
function showModal(msg){
	$("#mycontent").html(msg);//data.msg
	$("#myModal").modal('show');
	setTimeout(function() {
		$("#myModal").modal('hide');
	}, 3000)
}
$.ajaxSetup({
	contentType:"application/x-www-form-urlencoded;charset=utf-8",
	beforeSend:function(xhr){
		var token=getQueryVariable("JSONID");
		if(localStorage.getItem(token)){
			xhr.setRequestHeader("token",token);
		}
	},
	complete:function(XMLHttpRequest,textStatus){
		var sessionstatus=XMLHttpRequest.getResponseHeader("sessionstatus");
		if(sessionstatus=="timeout"){
			top.window.location.href=localStorage.getItem("Nianjianexiturl");
			return;
		}
	}
});
//获取地址栏的参数
function getQueryVariable(variable)
{
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
      var pair = vars[i].split("=");
      if(pair[0] == variable){return pair[1];}
  }
  return '';
}
