window.startBaiduHi=(function(){var D=navigator.userAgent.indexOf("MSIE")>-1&&!window.opera,F=navigator.userAgent.indexOf("Firefox")!=-1;function C(){var B="";try{B=new ActiveXObject("WebDetect.Detect").GetVersion()}catch(H){}try{if(typeof (navigator.mimeTypes["application/x-baiduhi"])=="object"){B=".*"}}catch(H){}return B}function G(H){var B=new Date(),I=B.getTime();B.setTime(I+30*1000);document.cookie="IM_add="+escape(H+"|hi.baidu.com|"+(new Date().getTime()).toString(36))+";domain=baidu.com;path=/;expires="+B.toGMTString();if(!/(^| )IM_=/.test(document.cookie)){if(G.f&&G.f.tagName=="FORM"){G.f.submit();return }var I=document.createElement("DIV");I.style.display="none";document.body.insertBefore(I,document.body.firstChild);I.innerHTML="<form name='__IM_REDIRECT_FORM' method='get' target='baidu_webim' action='http://web.im.baidu.com'></form>";G.f=document.forms.__IM_REDIRECT_FORM;G.f.submit();I=null}}function E(H){var B=[];for(prop in H){if(prop!="onim"&&prop!="onwebim"){B.push(prop+"="+H[prop])}}return(B.length>0?"&"+B.join("&"):"")}function A(B,K,H,J){var L=document.createElement("script");document.body.appendChild(L);L.src="http://im.baidu.com/nop?type="+B+"&sid="+K+"&id="+H+E(J)+"&t="+new Date().getTime()}return function(J,N,L,M){A(J,N,L,M);var H=C(),K;if(H==""){if(/c2cmsg|message|addcontact|addgroup|creategroup/i.test(J)){G(L);if(M&&M.onwebim){M.onwebim()}}return false}if(!(new RegExp(H.replace(/(\.)/g,"\\."),"i").test(J))){return false}var B="baidu://"+J+"/?sid="+N+"&id="+L+E(M);if(D){B=B+"&browser=IE"}else{if(F){B=B+"&browser=FF&promo=c2cmsg|message|addgroup|creategroup|addcontact"}}if(M&&M.onim){M.onim()}if(document.getElementById("__IM_REDIRECT_IFRAME")){K=document.getElementById("__IM_REDIRECT_IFRAME")}else{K=document.createElement("iframe");K.style.display="none";K.id="__IM_REDIRECT_IFRAME";document.body.appendChild(K)}K.src=B}})();