var xMousePos = 0;var yMousePos = 0;var xMousePosMax = 0;var yMousePosMax = 0;var kk;var kkk;function l1lll(sText) {var ValidChars = "0123456789";var IsNumber=true;var Charv;var period=0;if (sText==null) return false;if (sText.length==0) return false;for(i = 0;i<sText.length && IsNumber==true;i++) {Charv=sText.charAt(i);if(ValidChars.indexOf(Charv) < 0) IsNumber = false;} return IsNumber;} function llll1(sText){var i=sText.length; while(1){if(i<=0) return "";if(sText.charAt(i-1)==" "||sText.charAt(i-1)=="　") i--; else return sText.substring(0, i);}} function llll(sText){if(sText==null) return '';var i=0;while(1) {if(i>=sText.length) return "";if(sText.charAt(i)==" "||sText.charAt(i)=="　") i++;else {temp=sText.substring(i);break;}} i=temp.length;while(1){if(i<=0) return "";if(temp.charAt(i-1)==" "||temp.charAt(i-1)=="　") i--;else return temp.substring(0, i);}} function lllll11ll(sssText){var i=0;var sText = sssText;while(1){i=sText.indexOf(" ");if(i<0) return sText;sText = sText.substring(0, i) + sText.substring(i +1);}} function getSpace(num){var index;var v='';for(index=0; index<=num; index++)  v += '&nbsp;';return v;} function getRegStr(gender){if (gender==1) return '<span class=secret>&reg;</span>';else if (gender==2) return '<span class=girl>&reg;</span>';else if(gender==3) return '<span class=boy>&reg;</span>';else return "";} function getDtStr(timev){var dt = new Date(timev);return dt.getUTCFullYear() + '-'+(dt.getUTCMonth()+1)+'-'+dt.getUTCDate()+' '+dt.getUTCHours()+':'+dt.getUTCMinutes()+':'+dt.getUTCSeconds();} function getDtSStr(timev){var dt = new Date(timev);return dt.getUTCFullYear() + '-'+(dt.getUTCMonth()+1)+'-'+dt.getUTCDate();} function getTitle(title){return getSmileyIcon(title.replace(/</g, "&lt;"));} function getSmileyIcon(txt){return txt.replace(/\[:\)\]/gi, " <IMG src=/img/1.gif border=0> ").replace(/\[;\)\]/gi, " <IMG src=/img/2.gif border=0> ").replace(/\[:%\]/gi," <IMG src=/img/3.gif border=0> ").replace(/\[:L\]/gi, " <IMG src=/img/4.gif border=0> ").replace(/\[:#\]/gi, " <IMG src=/img/5.gif border=0> ").replace(/\[:B\]/gi, " <IMG src=/img/6.gif border=0> ").replace(/\[:D\)\]/gi, " <IMG src=/img/7.gif border=0> ").replace(/\[:-D\]/gi, " <IMG src=/img/8.gif border=0> ").replace(/\[:E\]/gi, " <IMG src=/img/9.gif border=0> ").replace(/\[:&\]/gi, " <IMG src=/img/10.gif border=0> ").replace(/\[:>\]/gi, " <IMG src=/img/11.gif border=0> ").replace(/\[:P\]/gi, " <IMG src=/img/12.gif border=0> ").replace(/\[:\(\(\]/gi, " <IMG src=/img/13.gif border=0> ").replace(/\[:X\]/gi, " <IMG src=/img/14.gif border=0> ").replace(/\[:O\]/gi, " <IMG src=/img/15.gif border=0> ").replace(/\[:\)\)\]/gi, " <IMG src=/img/16.gif border=0> ").replace(/\[>:D<\]/gi, " <IMG src=/img/17.gif border=0> ").replace(/\[>:D&lt;\]/gi, " <IMG src=/img/17.gif border=0> ").replace(/\[@};-\]/gi, " <IMG src=/img/18.gif border=0> ").replace(/\[:-\*\]/gi, " <IMG src=/img/19.gif border=0> ").replace(/\[:-K\]/gi, " <IMG src=/img/20.gif border=0> ").replace(/\[:-Q\]/gi, " <IMG src=/img/23.gif border=0> ").replace(/\[:-M\]/gi, " <IMG src=/img/21.gif border=0> ").replace(/\[:-N\]/gi, " <IMG src=/img/24.gif border=0> ").replace(/\[:-T\]/gi, " <IMG src=/img/27.gif border=0> ").replace(/\[:-A\]/gi, " <IMG src=/img/25.gif border=0> ").replace(/\[:-W\]/gi, " <IMG src=/img/22.gif border=0> ").replace(/\[:-F\]/gi, " <IMG src=/img/26.gif border=0> ");} function getAuthor(author){if(author.toLowerCase()=='ddhw' || author.toLowerCase()=='admin' || author=='顶顶华闻') return '<font color=red>'+author+'</font>';return author.replace(/  /g, "&nbsp; ");} function captureMousePosition(e){if(e=="nullevent") return;if(document.all){xMousePos=window.event.x+document.body.scrollLeft;yMousePos = window.event.y+document.body.scrollTop;xMousePosMax = document.body.clientWidth+document.body.scrollLeft;yMousePosMax = document.body.clientHeight+document.body.scrollTop;} else if (document.getElementById){xMousePos=e.pageX;yMousePos=e.pageY;xMousePosMax=window.innerWidth+window.pageXOffset;yMousePosMax=window.innerHeight+window.pageYOffset;}} function closeIcon(){if(document.getElementsByTagName('body')[0]!=null&& $("promptNIcon")!=null) document.getElementsByTagName('body')[0].removeChild($("promptNIcon"));} function popicons(event,padd,model,cross,rx,ry,tt,cc) {closeIcon();if(model==1){cot='bgcolor=#c4dbf2';coc='bgcolor=#eaf5ff';styt=' style="font-size:9pt" ';} else {styt=' style="font-size:9pt;COLOR:#FFFFFF" ';coc='bgcolor=#E0EDE0';cot='bgcolor=#5EA25E';} if(cross==1) crossx="<td align=right valign=bottom id=popupmovexid onmousedown='urMovePopup(event,0);'><span style='cursor:pointer;' onclick='closeIcon();'><img width=13 src=/img/cross.gif> </span></td>";else crossx="";txt="<table cellpadding=0 cellspacing=2 "+cot+"><tr><td"+styt+"height=17 valign=bottom id=popupmoveid onmousedown='urMovePopup(event,0);'>&nbsp;<b>"+tt+"</b></td>"+crossx+"</tr><tr><td colspan=2><table cellspacing=0 cellpadding="+padd+ " "+coc+">"+cc+"</table></td></tr></table>";captureMousePosition(event);promptbox = document.createElement('div');promptbox.setAttribute ('id' , 'promptNIcon');document.getElementsByTagName('body')[0].appendChild(promptbox);promptbox = eval("document.getElementById('promptNIcon').style");promptbox.position = 'absolute';promptbox.top = yMousePos-ry;promptbox.left = xMousePos-rx;kk= xMousePos-rx;kkk=yMousePos-ry; $('promptNIcon').innerHTML =txt;} function urMovePopup(event,action) {var mye=null;if ((mye=$('promptNIcon')) == null) return;captureMousePosition(event);kk=xMousePos-kk;kkk=yMousePos-kkk;if (!action) {document.body.onmousemove=urMovePopWin;document.body.onmouseup=function(e) { urMovePopup(event,1);};mye.onmouseup = function(e) { urMovePopup(event,1);};mye.style.cursor = "move";} else{document.body.onmousemove = null;document.body.onmouseup = null;mye.style.cursor = "auto";}} function urMovePopWin(evt) { var mye=null;if ((mye=$('promptNIcon')) == null) return; mye.style.cursor = "move";captureMousePosition(evt);mye.style.left = (xMousePos-kk)+"px"; mye.style.top  = (yMousePos-kkk)+"px";} function $(d) {return document.getElementById(d);} var ooo;function mmmn(username,mailtype){bgc='#E0EDE0';mtitleBgc='#5EA25E';mtitleStr='顶顶邮局通知';if(mailtype==1) mt='（平信）';else if(mailtype==2) mt='（挂号信）';else if(mailtype==3) mt='（特快专递）';else mt="";if(username!=null) contentStr='<div style="padding-bottom:4pt">'+username+'：</div><a href=/club/postoffice.aspx onclick="closeIcon();return true;" target=_blank>您有未阅读邮件'+mt+'！<br>请点击进入顶顶邮局。</a>';else contentStr='<a href=/club/postoffice.aspx onclick="closeIcon();return true;" target=_blank>您有未阅读邮件'+mt+'！<br>请点击进入顶顶邮局。</a>';contentStr="<TR><TD style='line-height:15pt;COLOR:#008040;font-size:9pt' nowrap>"+contentStr+"</td></tr>";popicons("nullevent",4,2,1,0,0,mtitleStr,contentStr);if($("popupmoveid")!=null) $("popupmoveid").onmousedown= function(e) {return;};if($("popupmovexid")!=null) $("popupmovexid").onmousedown= function(e) {return;};ooo=$("promptNIcon");mtop();} function mtop(){if($("promptNIcon")!=ooo) return;if(window.pageYOffset) zWinTop=window.pageYOffset; else if(document.documentElement && document.documentElement.scrollTop) zWinTop=document.documentElement.scrollTop;else if(document.body) zWinTop=document.body.scrollTop;divWidth = parseInt($("promptNIcon").offsetWidth,10);$('promptNIcon').style.top=(35+zWinTop)+'px';$('promptNIcon').style.left=(document.body.clientWidth-divWidth-20)+"px";	/*if($("promptNIcon")!=null) setTimeout('mtop()',200);*/} function gwdd(domailnotice,passusername,passmailtype) {if ( domailnotice==1) mmmn(passusername, passmailtype);} function showsearchhelp(event,x,y) {titleStr='查询技巧';contentStr='<tr><td style="line-height:15pt;font-size:12px;COLOR:#008040" nowrap>顶顶华闻查询功能简单、精确！<p>如果要查询作者、博客用户，只需输入部分或者全部作者/博客名即可；如果需要查询文章，<BR>那么只需输入部分文章的标题即可！关键字之间输入空格表示任意文字，比如说，如果您希<BR>望查询用户名“<U>一条名叫旺达的鱼</U>”，可是您只记得该用户名里有“叫”，“鱼”，您可以<BR>按照出现的先后顺序输入“<FONT color="red">叫 鱼</FONT>”。<P>再比如说，您想要查询的标题是“<U>婚姻道琼指数预测离婚九成准</U>”，但是您只记得“婚姻”<BR>和“离婚”这两个词先后出现在标题中，这时您应该按照先后输入<FONT color="red">婚姻 离婚</FONT>来查询，不能<BR>为<FONT color="brown">婚姻，离婚</FONT>，不能为<FONT color="brown">婚姻离婚</FONT>，不能为<FONT color="brown">离婚 婚姻</FONT>。所以在查询时，要小心，宁可少输入<BR>一些（也就是说减少限定），而不要限定的太多，除非您确信您的输入是正确的。<BR>&nbsp;</td></tr>';popicons(event,8,2,1,x,y,titleStr,contentStr);}
function getMenu(targetv)
{var cst='<div><a target='+targetv+' href=/list.aspx?topic_id=';
var cstt='</a> &nbsp; <a  target='+targetv+' href=/list.aspx?topic_id=';
return '<div><b>主题 转跳到：</b></div>'+
'<div><a href=/openheadlinenews.aspx?topic_id=1000 target='+targetv+'>即时新闻</a> &nbsp; <a href="/mymsgreview.aspx" target='+targetv+'>新闻热评</a></div>'+
cst+'5>纵论天下'+cstt+'27>军事天地</a></div>'+
cst+'18>顶顶贴图'+cstt+'8>热门聚焦</a></div>'+
cst+'21>我行我秀'+cstt+'1>幽你一默</a></div>'+
cst+'16>音乐欣赏'+cstt+'15>娱乐八卦</a></div>'+
cst+'3>情感婚姻'+cstt+'9>脑筋一动</a></div>'+
'<div><a target='+targetv+' href=/warning.html>情趣盎然'+cstt+'20>佛教人生</a></div>'+
cst+'22>基督人生'+cstt+'11>论坛管理</a></div>'+
'<div><a href=http://info.ddhw.org/wx target='+targetv+'><font color=red>顶顶书库</font></a> &nbsp; <a href="/blog/blogmain.html" target='+targetv+'><font color=red>顶顶博客</font></a></div>'+
'<div><a href="/club/postoffice.aspx" target='+targetv+'><font color=green>顶顶邮局</font></a> &nbsp; <a href="http://www.ddhealth.cn" target='+targetv+'>顶顶健康</a></div>'+
'<div><a href="/">顶顶华闻</a></div>';}

 
 
function Gpara( para )
{
    para = para.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
    var regexS = "[\\?&]"+para+"=([^&#]*)";
    var regex = new RegExp( regexS );
    var results = regex.exec( window.location.href.toLowerCase() );
    if( results == null ) 
        return "";
    else
        return results[1];
}

function getAjaxHandle()
    {
      try{
        var xmlHttp=new XMLHttpRequest();
        }
        
        catch(e) 
        {
            try {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
          }
          catch(e)
          {
             try {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
             }
             catch (e)
               {return null;}
          }
        }
        return xmlHttp;
    }
