function showBlockDiv(divId){ $.blockUI({ message: $("#"+divId), css : { width: $("#"+divId).width(), height: $("#"+divId).height(), left: ($(window).width() - $("#"+divId).width()) / 2 + 'px', top: ($(window).height() - $("#"+divId).height()) / 2 + 'px', border: 'none', cursor: 'default' }, overlayCSS:{cursor:"default"} }); } function showDig(CSS) { if (CSS) { $.blockUI({ message : $('div.' + CSS), css : { top : '20%', backgroundColor : '#FFF', 'border-radius' : '3px', "background-image" : "none", "opacity" : "1", "text-shadow" : "0 0 1px #fff", "margin-top" : "12px", "padding-top" : "1px !important" } }); } else { $.blockUI({ message : $('div.growlUI'), css : { top : '20%', backgroundColor : '#FFF', 'border-radius' : '3px', "background-image" : "none", "opacity" : "1", "text-shadow" : "0 0 1px #fff", "margin-top" : "12px", "padding-top" : "1px !important" } }); } } //弹出层1 function openDiv(divid,bgid) { var height = $(document).height(); var width = $(document).width(); var h1 = $(window).height(); var w1 = $(window).width(); var h = $("#"+divid+"").height(); var w = selectWidth(divid); $("#"+divid).width(w+10); var top = document.documentElement.scrollTop; $("#"+divid+"").css("top", top+(h1 - h) / 2); $("#"+divid+"").css("left", (w1 - w) / 2); $("#"+bgid+"").css("height", height); $("#"+bgid+"").css("width", width); $("#"+bgid+"").css("opacity", 0.7); $("select").not(":hidden").addClass("opendiv_select_hide").hide(); $("#"+divid+"").show(); $("#"+bgid+"").show(); } function closeOpen(divid,bgid) { $(".opendiv_select_hide").show().removeClass("opendiv_select_hide"); $("#"+divid+"").hide(); $("#"+bgid+"").hide(); } // 弹出层1 function open1() { var height = $(document).height(); var width = $(document).width(); var h1 = $(window).height(); var w1 = $(window).width(); var h = $("#opendiv1").height(); var w = selectWidth("opendiv1"); $("#opendiv1").width(w); var top = document.documentElement.scrollTop; $("#opendiv1").css("top", top+(h1 - h) / 2); $("#opendiv1").css("left", (w1 - w) / 2); $("#openbg").css("height", height); $("#openbg").css("width", width); $("#openbg").css("opacity", 0.7); $("select").not(":hidden").addClass("opendiv_select_hide").hide(); $("#opendiv1").show(); $("#openbg").show(); } function selectWidth(id){ var width = 0; $("#"+id).find("div").each(function(){ width = $(this).width()>width ? $(this).width():width; }); return width; } //the page text which a user will enter must be a number function naturalNumberOnly(evt) { evt = (evt) ? evt : event; var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0)); //For IE. IE will not fire event when pressing left/right/del/backspace. if(navigator.userAgent.indexOf("MSIE")>0) { if (charCode < 48 || charCode > 57) { return false; } } else { //For other browser (Firefox mainly). Firefox will fire arrow //keys and del/ins/backspace key events. if(evt.keyCode == 37||evt.keyCode == 39||evt.keyCode == 46 || evt.keyCode == 8){//make left/right/delete work return true; } if (charCode < 48 || charCode > 57) { return false; } } return true; } //Note: only support the format like 年-月-日 function compareDate(d1,d2) { var OneMonth = d1.substring(5,d1.lastIndexOf ("-")); var OneDay = d1.substring(d1.length,d1.lastIndexOf ("-")+1); var OneYear = d1.substring(0,d1.indexOf ("-")); var TwoMonth = d2.substring(5,d2.lastIndexOf ("-")); var TwoDay = d2.substring(d2.length,d2.lastIndexOf ("-")+1); var TwoYear = d2.substring(0,d2.indexOf ("-")); if (Date.parse(OneMonth+"/"+OneDay+"/"+OneYear) > Date.parse(TwoMonth+"/"+TwoDay+"/"+TwoYear)) { return true; } else { return false; } } function getHintContent(){ var hintContent = "
" + "

利安人寿温馨提示

您所访问的功能暂时无法使用,请您稍后再试。

"; return hintContent; } function closeOpen1() { $(".opendiv_select_hide").show().removeClass("opendiv_select_hide"); $('#opendiv1').hide(); $("#openbg").hide(); } function backHomePage() { location.href = getRootPath() + "/view/member/memberCenter.jsp?" + Math.random(); } function backLoginPage() { location.href = getRootPath() + "/security/login.jsp"; } function getParamFromUrl(key){ var value = ""; var params = location.search; if(params.length > 1){ params = params.substr(1); var paramArray = params.split("&"); for(i=0;i