function printDocSearchData(){
document.write('<p class="pbottom">互动百科由全球 <FONT color=#ff6600>570,749</FONT> 位网民共同编辑<br>'
		+'总计<FONT color=#ff6600>2,336,820</FONT> 词条，<FONT color=#ff6600>22.8</FONT> 亿文字(截止2008-02-18)</p>');	
}

function printDocSearchLoginInfo(){
document.write('<span><hdtag:login /></span>' 
              +'');	
}

function printDocSearchInclude(class_id){
	document.write('<%@include file=\"/elitedoc/' 
	             +class_id+'.html\"%>');
}

function printeMeng(){
	
  document.write('<div style=\"float:left; height:25px; width:266px\"><span style=\"float:left; margin-left:30px; font-size:12px; line-height:25px; color:#0568cd; font-weight:bold\">互动百科—系统提示</span>' 
	             +'<span title=\"关闭\" onclick=\"closeDiv()\" style=\"float:right; margin:5px 10px; cursor:pointer;cursor:hand;\"><img src=\"http://www.huimg.cn/wikibar/images/closed.gif\" /></span></div>'
	             +'<div style=\" float:left;width:246px; padding:10px 7px 0 7px;font-size:12px;\"><div style=\"width:246px;\">'
	             +'<a href=\"http://www.hudong.com/op/exchangeGiftsIndex\" target=\"_blank\"><img src=\"http://www.huimg.cn/wikibar/images/prd_nn.gif\" width=\"82\" height=\"82\" style=\"float:left; margin:0px 10px 0 5px; padding:2px; border:1px solid #ccc;\" /></a>'
	             +'<span style=\"color:#FF0000; margin:10px 0;\"><strong>恭喜您，幸运访问者！</strong></span><p style=\"margin:0; padding:8px 0; \">'
	             +'您已获得<span style=\"color:#F90; font-weight:bold; padding:0 2px;\">1</span>个信用奖励，<br />完成注册立即转入您的本站帐户，可以免费换取Q币、鼠标等奖品！</p></div></div>'
	             +'<div style=\" position:absolute; bottom:8px; left:7px;text-align:center; width:250px; height:30px; line-height:30px;border-top:1px dashed #ccc;\"><a href=\"http://www.hudong.com/user/register/userRegister.jsp\" target=\"_blank\" style=\" color:#f60\">5秒钟完成注册领取奖励！</a></div>');
}
var xmlHttp;

function refreshuserloginnav(div_id){
      var ele=document.getElementById(div_id);
      xmlHttp = false;
      createXMLHttpRequest()
      var action;
      xmlHttp.open("GET", '/ajaxGetUserInfo4SEO.do', true);
      xmlHttp.onreadystatechange = function(){
                            	       if (xmlHttp.readyState == 4) {
                            		      if (xmlHttp.status == 200) {
                            				setTopUserNavInfo(div_id);
                            		      }
                            		   }
                                    }   
      xmlHttp.send (null);
}

function setTopUserNavInfo(div_id){
    if(xmlHttp.responseXML!=null){
        var ele=document.getElementById(div_id);
        var ele_islogin=xmlHttp.responseXML.getElementsByTagName("islogin")[0];
        
        if(ele_islogin == null) {
            //alert("服务器繁忙，请稍后再试！");
            return false;
        }
        
        var islogin = ele_islogin.firstChild.data;
        
        if(islogin=="false"){
            ele.innerHTML="<a href=\"/user/login/userLogin.jsp\" onclick=\"var date=new Date();date.setTime(date.getTime()+24*3600*1000);document.cookie=\'nextURL=\'+document.location.href+\';expire=\'+date.toGMTString()+\';path=/;domain=.hudong.com;\'\" class=\"topzt12\">登录</a> | <a href=\"/user/register/userRegister.jsp\" onclick=\"var date=new Date();date.setTime(date.getTime()+24*3600*1000);document.cookie=\'nextURL=\'+document.location.href+\';expire=\'+date.toGMTString()+\';path=/;domain=.hudong.com;\'\" class=\"topzt12\">注册</a> | <a href=\"http://www.hudong.com/tour/tour_1.html\" target=\"_blank\" class=\"topzt12\">快速了解</a> |<a href=\"http://service.hudong.com/\" target=\"_blank\" class=\"topzt12\">帮助</a>";
        }else{
            var user_nick=xmlHttp.responseXML.getElementsByTagName("user_nick")[0].firstChild.data;            
            var user_space_url=xmlHttp.responseXML.getElementsByTagName("user_space_url")[0].firstChild.data;            
            var user_isexpert=xmlHttp.responseXML.getElementsByTagName("user_isexpert")[0].firstChild.data;            
            var user_msg_count=xmlHttp.responseXML.getElementsByTagName("user_msg_count")[0].firstChild.data;            
            var user_msg_url=xmlHttp.responseXML.getElementsByTagName("user_msg_url")[0].firstChild.data;            
           
            //var friend_nick1=xmlHttp.responseXML.getElementsByTagName("friend_nick1")[0].firstChild.data; 
            //var friend_id_en1=xmlHttp.responseXML.getElementsByTagName("friend_id_en1")[0].firstChild.data; 
           // var friend_nick2=xmlHttp.responseXML.getElementsByTagName("friend_nick2")[0].firstChild.data; 
           // var friend_id_en2=xmlHttp.responseXML.getElementsByTagName("friend_id_en2")[0].firstChild.data;
            
           // var expert_infotip = "";
            var msg_infotip = "";
            
            //if(user_isexpert=="true"){
              //  expert_infotip = " <a href='http://www.hudong.com/op/auditingIndex'><font color='red'>专家工作室</font></a> <a href='javascript:void(0);' onclick=\" checkState('"+friend_id_en1+"');\" class=\"topzt12\">"
              //                   +friend_nick1+"</a> <a href='javascript:void(0);' onclick=\" checkState('"+friend_id_en2+"');\" class=\"topzt12\">"+friend_nick2+"</a>";   
           // }
            
            if(user_msg_count=="0"){
                msg_infotip = "<a href=\""	+ user_msg_url + "\" target=\"_blank\"><img border=\"0\" src=\"http://www.huimg.cn/wikibar/images/050a.gif\" width=\"16\" height=\"16\" align=\"absmiddle\" alt=\"查看我的消息收件箱\" /></a>"
            }else{
                msg_infotip = "<a href=\""	+ user_msg_url + "\" target=\"_blank\"><img border=\"0\" src=\"http://www.huimg.cn/wikibar/images/010.gif\" width=\"16\" height=\"16\" align=\"absmiddle\" alt=\"查看我的消息收件箱\" /></a> (<a href=\"" + user_msg_url + "\" target=\"_blank\"><font color=\"red\">" +user_msg_count+" 新</font></a>)"
            }
            
            ele.innerHTML = "您好，<a href=\"" + user_space_url + "\" class=\"topzt12\" target=\"_blank\">" + user_nick + "</a>"	+ " | " + msg_infotip + " | <a href=\"http://www.hudong.com/op/pbIndex\" class=\"topzt12\" target=\"_blank\">管理中心</a>" + " | <a href=\"http://service.hudong.com/\" class=\"topzt12\" target=\"_blank\">帮助</a> | <a href=\"http://www.hudong.com/user/logout/userLogout.jsp\" class=\"topzt12\">退出</a><br/>";
        }
        
        return false;
    }
    return false;
}
