var common_header={init:function(){this.loginInfor(),this.dropMenu(),this.visitOdm()},cssStyle:'',templeteIndex:'
',templete:' ',getCookie:function(e){var o=document.cookie.split("; "),i="";return jQuery.each(o,function(o,d){var a=d.split("=");if(decodeURIComponent(a[0])===e){var n=(i=decodeURIComponent(a[1])).split("|");n.length>=8&&n.pop(),i=n.join("|")}}),i},loginInfor:function(){"www.xywy.com"==document.location.host&&"/"==document.location.pathname?jQuery("body").prepend(this.cssStyle,this.templeteIndex):jQuery("body").prepend(this.cssStyle,this.templete),jQuery(".j-login-in").bind("click",function(){var e=jQuery(this).attr("href"),o=location.href;"passport.xywy.com"!==document.domain&&jQuery(this).attr("href",e+"?ucback="+encodeURIComponent(o))}),jQuery("#header-wxh").on({mouseover:function(){jQuery(this).addClass("header-wxh-li-hover"),jQuery(".header-wxh-box").show()},mouseout:function(){jQuery(this).removeClass("header-wxh-li-hover"),jQuery(".header-wxh-box").hide()}}),jQuery("#header_wakeup_app").on({mouseover:function(){jQuery(this).addClass("header-wxh-li-hover"),jQuery(".wakeup-app-box").show()},mouseout:function(){jQuery(this).removeClass("header-wxh-li-hover"),jQuery(".wakeup-app-box").hide()}});var e=this.getCookie("cookie_user"),o=this.getCookie("cookie_usern"),i=this.getCookie("cookie_usertype"),d=(this.getCookie("cookie_usersource"),this.getCookie("check_msg"));e&&1!=i&&d&&(o&&(o.length>6?jQuery(".guide-user em").html(o.substring(0,6)+"..."):jQuery(".guide-user em").html(o),jQuery.ajax({type:"get",url:"//ucenter.xywy.com/msgHeaderGet.php?a=5&uid="+e,dataType:"jsonp",jsonp:"callback",success:function(e){var o=0;e&&(0==(o=parseInt(e.yishengTotal)+parseInt(e.yuyueTotal)+parseInt(e.huatiTotal)+parseInt(e.xitongTotal))?jQuery(".guide-msg-num").addClass("none"):o<100?(jQuery(".guide-msg-num").find("em").html(o),jQuery(".guide-msg-num").removeClass("none")):(jQuery(".guide-msg-num").find("em").html("99+"),jQuery(".guide-msg-num").removeClass("none")))}})),jQuery("#guide-exit").attr("href","http://passport.xywy.com/loginout?backurl=http://passport.xywy.com/member/login.htm"),jQuery(".guide-after").show(),jQuery(".guide-before").hide())},dropMenu:function(){var e=null;jQuery(".j-user").bind({mouseenter:function(){var o=jQuery(this);clearTimeout(e),e=setTimeout(function(){if(!o.hasClass("cur")){jQuery(".guide-user").outerWidth()<=128&&jQuery(".guide-infor").addClass("active"),o.addClass("cur"),jQuery(".guide-infor").hide();var e=o.find(".guide-infor").height();o.find(".guide-infor").css("height","0px"),o.find(".guide-infor").show().stop().animate({height:e},300)}},200)},mouseleave:function(){clearTimeout(e),jQuery(this).removeClass("cur"),jQuery(this).find(".guide-infor").hide(),jQuery(this).hasClass("active")&&jQuery(this).removeClass("active")}})},visitOdm:function(){__sendVisitOdm("01876588","pcsy:sy_topindex_yyph+"),"www.xywy.com"==document.location.host&&"/"==document.location.pathname?__sendVisitOdm("01179972","pcsy:sy_topindex_xywy+@sy_topindex_mrzx+@sy_topindex_doctorhome+@sy_topindex_yun+@sy_topindex_signin+@sy_topindex_register+@sy_topindex_news+@sy_topindex_center+@sy_topindex_myask+@sy_topindex_myyyzh+@sy_topindex_mydhys+@sy_topindex_myjtys+@sy_topindex_mydrug+@sy_topindex_myhealth+@sy_topindex_setup+@sy_topindex_out+@sy_topindex_wkgy+@sy_topindex_hwyl+@sy_topindex_zyks+@sy_topindex_jkjy+@sy_topindex_ypw+@sy_topindex_xzzx+"):__sendVisitOdm("01074365","qzdbdh:xywy+@ymei+@ymai+@yjk+@dl+@zc+@dlh_xi+@dlh_hm+@dlh_wdtw+@dlh_wdyyzz+@dlh_wddhys+@dlh_wdjtys+@dlh_wdjk+@dlh_wdyy+@dlh_sz+@dlh_tc+@wkgy+@hwyl+@zyks+@jkjy+@ypw+@xzzx+")}};common_header.init();// function loadCommonStyle(url){
/*function loadCommonStyle(url){
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
if(year == 2020 & month == 4 && day == 4){
var style = document.createElement("style");
style.type = "text/css";
try{
style.appendChild(document.createTextNode("html{filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);-webkit-filter: grayscale(100%);filter: grayscale(100%);filter: gray;}"));
}catch(ex){
style.styleSheet.cssText = "html{filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);-webkit-filter: grayscale(100%);filter: grayscale(100%);filter: gray;}";//针对IE
}
var head = document.getElementsByTagName("head")[0];
head.appendChild(style);
}
}
loadCommonStyle();*/