var _aTip = new Array(3);
_aTip[0] = "已经到第一篇！";_aTip[1] = "已经到最后一篇！";_aTip[2] = "上一篇下一篇";_aTip[3] = "已经复制到剪贴板，按Ctrl + V 粘贴。";
var bIsEmoteBox = false; var emoteTag = "";var menuBox = null;var classBox_text="";var sBoxId = null;
var login = 0;var ScrollDelay = 3000;var ScrollCount = 0;var ScrollHeight = 24;var _Scrollst = new Array(3);_Scrollst[0]=_Scrollst[1]=_Scrollst[2]=_Scrollst[3]=0;
var sysBoxMenuCurId = 1; var _sysMsgInfo = new Array(2);var _Timer=new Array(3);
function setHome(url,sitename)
{  var url=window.document.location.href;var sitename=window.document.title;
   if(isIE) {window.external.AddFavorite(url,sitename);}
   else { try{window.sidebar.addPanel(sitename,url,"书签");}catch(e) {alert("抱歉，当前只支持IE和FireFox。")}}
}
function setBlogURL() {var temp = domain+blogName;setCopy(temp); }
function setInfoURL() { var temp = domain+"blog_"+curInfoId+".html";setCopy(temp); }
function setCopy(_sTxt)
{ if(window.clipboardData) { window.clipboardData.clearData();  window.clipboardData.setData("Text", _sTxt);  }
  else if(navigator.userAgent.indexOf("Opera") != -1) { window.location = _sTxt; }
  else if (window.netscape)
  { try {  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
    catch (e) {  alert("被浏览器拒绝！\n请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true'"); }
    var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);    
    if (!clip)     { return;  }  
    var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
    if (!trans) {return;    }
    trans.addDataFlavor('text/unicode');
    var str = new Object();   var len = new Object(); var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
    var copytext = _sTxt; str.data = copytext; trans.setTransferData("text/unicode",str,copytext.length*2); var clipid = Components.interfaces.nsIClipboard;
    if (!clip)  {return false;   }
    clip.setData(trans,null,clipid.kGlobalClipboard);
 }
 ShowTips(3,12);
}
function $(s){return document.getElementById(s);}
var isIE = document.all ? true : false;
function CheckIE_Ver(n)
{
  if (!isIE) { return false;}
  var version=navigator.appVersion.split(";"); 
  var trim_Version=version[1].replace(/[ ]/g,"");
  if (trim_Version.indexOf("MSIE"+n) !=-1)  { return true;} else { return false;}
}
var isIE6,isIE7,isIE8 = false;
isIE6 = CheckIE_Ver(6);
function checklogin(theform)
{  var txtPwd = toTXT(theform.txtPwd.value);
   if (checkempty(theform.txtNick.value)==false)
   {   alert("请输入登陆帐号。");theform.txtNick.focus();return false;}
   if (checkempty(txtPwd)==false)
   {   alert("请输入登陆密码。");theform.txtPwd.focus();return false;}
      if (checkempty(theform.txtCode.value)==false)
   {   alert("请输入验证码。");theform.txtCode.focus();return false;}
   var strA = "txtNick="+theform.txtNick.value;
   strA +="&txtPwd="+txtPwd;
   strA +="&txtCode="+theform.txtCode.value;
   strA +="&BlogID="+blogID;
   theform.txtPwd.value = ""; theform.txtCode.value = "";
   xmlPost(theform.action,strA);
   return false;	 
}
function checklogout(theform)
{  var strB = " "; xmlPost(theform.action,strB); return false;}

function ShowNavBox(obj)
{ oMenu = obj; oMenu.className = "menuSelect";
  var oBox = $("top_Nav_Box"); oBox.style.display="block";
  var l = ($("top_Row").offsetLeft+$("top_Nav").offsetLeft+oMenu.offsetWidth-oBox.offsetWidth+20)
  if (! isIE) {  l -=$("top_Logo").offsetLeft;}
  oBox.style.left = l +"px" ;
  if (! bIsNavBox)
  { oBox.innerHTML = strload;loadAJAXTab("getNavList.asp?blogId="+blogID,"top_Nav_Box",0);}
}
function HideNavBox(pName,theEvent)
{
  if (isIE)
  {  var obj = event.toElement;
     while( obj!=null && obj.id!=pName ){ obj = obj.parentElement; } 
     if( obj==null ) { $(pName).style.display="none";oMenu.className = "menuUnSelect";} }
  else
  {  var obj = theEvent.relatedTarget;
     while( obj!=null && obj.id!=pName ){ obj = obj.parentNode; } 
     if( obj==null )
     { $(pName).style.display="none";oMenu.setAttribute("class","menuUnSelect"); } }
}

function SetBannerFlash()
{
  if (flash_src !="")
  {
     if (isIE) {  $("oflash").movie = flash_src;$("oflash").style.display="block";}
     else {  $("oflashNoIE").src=flash_src;$("oflashNoIE").style.display="block"; $("ofla").style.width="100%";}
  }
  else
  { if (isIE) {$("oflash").className = "fla0";}
    else {$("oflashNoIE").setAttribute("class","fla0");}
  }
}

function xmlPost(url,strX)
{ var objXMLHttp=getXmlhttp();
  objXMLHttp.open("POST",url,true); 
  objXMLHttp.onreadystatechange = function()
  {
    if (objXMLHttp.readyState==4)
    {
       if (objXMLHttp.status==200)
       {  var strMsg = objXMLHttp.responseText;
          if (strMsg.indexOf("|")==-1)
          { return false;}
          var strSet = strMsg.split("|");
          if (strSet[1]=="1")
          {  alert(strSet[2]);
             switch (strSet[0])
             {      case "IN": GetNewCode("codeID",0); break;
                    case "BOOK": GetNewCode("rcodeID",2); break;
                    case "REVIEW": GetNewCode("rcodeID",2); break;
                    case "VOTE":  GetNewCode("pcodeID",3); break;
             }
             return false;
          }
          switch (strSet[0])
          {
            case "IN":
                 GetNewCode("codeID",0);
                 GetCookie(); try {closePopWindow();} catch(e) {}
                 if (ShowReviewNick) {  ShowReviewNick(1);}
                 if (curLimit>0) {loadAJAXTab(currAction,ContentBox,0);}
                 break;
            case "OUT":
                 if (strSet[1]=="1") {alert(strSet[2]);}
                 else {
                    GetCookie();
                    if (ShowReviewNick) {  ShowReviewNick(0);GetNewCode("rcodeID",2);}
                    if (curLimit>0) {loadAJAXTab(currAction,ContentBox,0);}
                 }
                 break;
            case "BOOK":
                 alert(strSet[2]);CheckBook(1);break;
            case "VOTE":
                  closePopWindow();ShowPage(strSet[2],'PollResult.asp','poll_'+ strSet[2],0);
                  break;
            default:
                  alert(strSet[2]);CheckReview(strSet[3],1); break;
          }
       }
       else
       {if (objXMLHttp.status==500) {alert("Error:请将下面代码提供给系统管理员。\n\n"+objXMLHttp.responseText);}
        else{ alert("Error:"+objXMLHttp.status+","+objXMLHttp.statusText);}
       }
    }
  }
  objXMLHttp.setRequestHeader("Content-Length",strX.length);
  objXMLHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
  objXMLHttp.send(strX);
}
function GetNewCode(strObj,n)
{ if($(strObj)) {$(strObj).src="GetCode.asp?code="+n+"&t="+Math.random(); }}

function ChecUserState()
{   $("div0").style.display = login ==1 ? "none" : "";
    $("div1").style.display = login ==0 ? "none" : "";
    if ($("Scroll_msg2"))
    {  $("nav2_msg").style.width=$("div0").style.display==""?"520px":"408px";
       $("nav2_msg_scroll").style.width=$("div0").style.display==""?"375px":"275px";
       if (CheckIE_Ver(6))
       { if ($("nav2_msg_scroll").offsetWidth<300) {  $("Scroll_msg2").style.width="238px";}
         else {$("Scroll_msg2").style.width="330px";} }
    }
    else
    { try {$("nav2_msg_scroll").style.width="0px";$("nav2_msg").style.width="auto";} catch(e){} }
    if ($("UserName"))
    {  $("UserName").style.display = $("div0").style.display==""?"none":"";}
}
function GetCookie()
{  var UserName=""; var CookieString = document.cookie; login = 0;
   if (CookieString !="")
   {  var CookieSet = CookieString.split(";");
      var SetSize = CookieSet.length;
      if (SetSize >6 )
      {  for (i=0;i<SetSize;i++)
         {   if (CookieSet[i].indexOf("x") >0 && CookieSet[i].indexOf("LoginUser") >0)
             {  UserName = CookieSet[i].split("=")[1];login = 1; break;}
         }
      }
   }
   if (login >0) { $("UserName").innerHTML = decodecookie(unescape(UserName))+"，您好！"; }
   ChecUserState();
}
function decodecookie(str) 
{ var strarr; 
  var strrtn=""; 
  strarr=str.split("x"); 
  for (var i=strarr.length-1;i>=0;i--) 
　{ strrtn+=String.fromCharCode(eval(strarr[i])); }
　return strrtn; 
}
function SetDate()
{var today=new Date();                      
 function initArray() {                      
 this.length=initArray.arguments.length                      
 for(var i=0;i<this.length;i++)                      
 this[i+1]=initArray.arguments[i]  }                      
 var d=new initArray(" 星期日"," 星期一", " 星期二", " 星期三"," 星期四"," 星期五"," 星期六");                      
 document.write(                    
 "<font color=#000000 style='font-size:9pt;font-family: 宋体'> ", today.getFullYear(),"年", today.getMonth()+1,"月",today.getDate(),"日", d[today.getDay()+1], "</font>");
}
function getXmlhttp()
{ var http_request;
  if (window.XMLHttpRequest)
  {  http_request = new XMLHttpRequest();
     if (http_request.overrideMimeType)
     {  http_request.overrideMimeType("text/xml"); }
  }
  else if (window.ActiveXObject)
  {  try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); }
     catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } 
                 catch (e) {} }
  }
  if (!http_request) {  window.alert("can't create XMLHttpRequest object."); return null; }	
  return http_request;
}
var xhr;
var ntimer =0;
function getXHR()
{ try { xhr=new ActiveXObject("Msxml2.XMLHTTP"); } 
  catch (e) { try { xhr=new ActiveXObject("Microsoft.XMLHTTP"); }   catch (e) {	 xhr=false; }  }
  if (!xhr&&typeof XMLHttpRequest!='undefined')  {  xhr=new XMLHttpRequest(); }	
  return xhr;
}
function LinkState()
{   getXHR(); xhr.open("GET","Online.asp?ID="+blogID,true);  xhr.onreadystatechange = getReady
    xhr.send(null); ntimer=setTimeout("LinkState()",20000);
}
function getReady()
{
    if (xhr.readyState==4 )
    {   if (xhr.status==200) {  $("onlineID").innerHTML = xhr.responseText;  } }
}
function DrawBanner()
{ $("banner").style.backgroundImage="url("+$("bannerImg").src+")"; SetBinnerHeight(); }
function SetBinnerHeight()
{ var image=new Image(); var iwidth = 770; var iheight = 140; image.src = $("bannerImg").src;
  if (image.height>0)
  { $("banner").style.height=image.height+8;
    if (isIE) {  $("oflash").style.height=image.height;}
    else {  $("oflashNoIE").height=image.height;}
  }
  else { setTimeout("SetBinnerHeight()",1000);}
}
function textCounter(sElement,maxlimit)
{ var field = sElement;
  if (field.value.length > maxlimit)
  {  field.value = field.value.substring(0, maxlimit); }
  else
  {  document.getElementById("remLen").value = maxlimit - field.value.length; }
  if (field.value.length == maxlimit)
  {  alert("请将字符限制在"+maxlimit+"个以内"); }
}
function toTXT(str){  
    var RexStr = /\<|\>|\"|\'|\&/g;
    str = str.replace(RexStr,function(MatchStr){
          switch(MatchStr){  
                case "<":  return "!lt;";  break;  
                case ">":  return "!gt;";  break;
                case "&":  return "!amp;"; break;
                default :  break;
            }
        } 
    )
    return str;  
}  
function setContentSize(n)
{ $("articleContent").className="contentSize"+n;}
function submitReview(theform)
{  var checkwd = toTXT(theform.checkwd.value);
   var content = escape(toTXT(theform.content.value));
   var nick = escape(toTXT(theform.nick.value));
   if (checkempty(checkwd)==false)
   {  alert("请填写验证码。");theform.checkwd.focus(); return false;}
   if (checkempty(content)==false)
   {  alert("请填写验评论内容。");theform.content.focus(); return false;}
   if (confirm("是否确认发表评论？"))
   {  var strC = "nick="+nick+"&checkwd="+checkwd+"&blogID="+blogID + "&ID="+theform.ID.value+"&content="+content;
      theform.checkwd.value = ""; theform.nick.value = "";
      xmlPost(theform.action,strC);return false;
   }
   else {  return false;}
}
function submitBook(theform)
{  var checkwd = toTXT(theform.checkwd.value);
   var content = escape(toTXT(theform.content.value));
   var nick = escape(toTXT(theform.nick.value));
   var pwd = escape(toTXT(theform.pwd.value));
   if (checkempty(checkwd)==false)
   {  alert("请填写验证码。");theform.checkwd.focus(); return false;}
   if (checkempty(content)==false)
   {  alert("请填写内容。");theform.content.focus(); return false;}
   if (confirm("是否确认留言？"))
   {  var strC = "checkwd="+checkwd+"&blogID="+blogID + "&nick="+nick+"&pwd="+pwd;
      if ($("anonyWay").checked)
      {  strC += "&anonyWay=1"; }
      else { if ($("bookway").checked) { strC += "&bookway=1";}  }
      strC += "&content="+content;
      theform.checkwd.value = "";
      xmlPost(theform.action,strC);return false;
   }
   else {  return false;}
}
function ShowReviewNick(n)
{ if ($("review_nick")) {   $("review_nick").style.display=n==1?"none":"block";} }
function SetReviewList()
{ if ($("reviewlist")) {$("reviewlist").style.display=$("reviewlist").style.display==""?"none":""; $("reviewHead").style.backgroundImage =$("reviewlist").style.display==""? "url('"+aTitleBar+"')":"url('')";}
  else {return false;} }
function SetarticleContentArea()
{  $("articleContentArea").style.display=$("articleContentArea").style.display==""?"none":""; }
function SetReviewContentArea(n)
{ $("reviewContentArea_"+n).style.display=$("reviewContentArea_"+n).style.display==""?"none":"";}
var ajccache=new Object();
function loadAJAXTab(url,contentid,n)
{ 
 var ocontent=$(contentid);
 if (!ocontent) { return false;}
 if (n>0)
 {  if(ajccache[url]==null)
    { var xhttp=getXmlhttp();
      xhttp.onreadystatechange=function() {
        if(xhttp.readyState == 4 && (xhttp.status==200 || window.location.href.indexOf("http")==-1))
        {  ocontent.innerHTML=xhttp.responseText; ajccache[url]=ocontent.innerHTML;  }
      }
      xhttp.open("GET",url,true);
      xhttp.send(null);
    }
    else
    { ocontent.innerHTML=ajccache[url]; }
 }
 else
 {  var xhttp=getXmlhttp();
    xhttp.onreadystatechange=function()
    {  if (xhttp.readyState == 4 )
       {  if (xhttp.status==200 || window.location.href.indexOf("http")==-1)
          {   var temp=xhttp.responseText;
              if (temp.indexOf("||")>0)
              {  tempSet = temp.split("||"); if (tempSet[0]=="0") {  ShowTips(0,16);return false;}
                 if (tempSet[0]=="1") {  ShowTips(1,16);return false;}
                 var tempDesc
                 if ($("myBlogCataInfo")) {  tempDesc = $("myBlogCataInfo").innerHTML;}
                 else {  tempDesc = "";}
                 ocontent.innerHTML = tempSet[0]; $("actionnametop").innerHTML = tempSet[1];
                 if ($("myBlogCataInfo") && tempDesc !="") {  $("myBlogCataInfo").innerHTML = tempDesc; }
                 else {currAction = url;}
                 if (tempSet.length>4)
                 { curLimit = parseInt(tempSet[4]);curInfoId = tempSet[3];if (tempSet[2] <1) { CheckReview(tempSet[3],1); } else { SetScroll(tempSet[3]);}  }
                 else
                 { curLimit = parseInt(tempSet[2]);SetScroll("top_Id_n");} 
              }
              else
              {   if (temp.indexOf("|")>0)
                  {  tempSet = temp.split("|");
                     switch (tempSet[1])
                     {case "SysMsg": sysBoxMenuCurId=1;_sysMsgInfo[1]=_sysMsgInfo[2]="";SetMsgBox(tempSet[0],tempSet[2]);break;
                      case "SysInfo": _sysMsgInfo[parseInt(tempSet[0])]=ocontent.innerHTML = tempSet[2];resizBox(1);break;
                      case "NavBox": ocontent.innerHTML = tempSet[0];bIsNavBox = true; break;
                      case "myBlogEmotBox": ocontent.innerHTML = tempSet[0];bIsEmoteBox = true; emoteTag=tempSet[2];break;
                      case "classMenu": classBox_text=ocontent.innerHTML = tempSet[0]; sBoxId=tempSet[2];ocontent.style.width=$("cMenuBoxId").style.width;break;
                      case "classMenu": classBox_text=ocontent.innerHTML = tempSet[0]; sBoxId=tempSet[2];ocontent.style.width=$("cMenuBoxId").style.width;break;
                      case "ScrollInfo": 
                           ocontent.innerHTML= tempSet[0]; $("nav2_right").innerHTML=tempSet[3];GetCookie();
                           if (parseInt(tempSet[2])>0)
                           {  clearTimeout(_Scrollst[2]);_Scrollst[2]=0;$("nav2_msg_scroll").onmouseover=new Function("Scroll_onMouseOver(2)"); $('nav2_msg_scroll').onmouseout=new Function("Scroll_onMouseOut(2)");msg_Scroll(2);}
                           else
                           {  $("nav2_msg_scroll").onmouseover=$("nav2_msg_scroll").onmouseout=null; }
                           break;
                      case "weather":
                           ocontent.innerHTML= tempSet[0];
                           var marquee1 = new Marquee("marquee1",1,1,390,19,50,8000,8000,19);break;
                      default:showMessageBox(tempSet[0]);
                     }
                  }
                  else {  ocontent.innerHTML = temp;if($("review_nick")) {$("nick").value=anonym;}}
              }
          }
          else
          {  ocontent.innerHTML = "<p align='center'>error, no found page info.</p>"; }
       }
    }
    xhttp.open("GET",url,true);
    xhttp.send(null);
 }
}
function ShowTips(n,nSize)
{  setShowTip(0); SetObjText($("myBlogTips_s"),_aTip[n],nSize);setShowTip(1); var nTime = setTimeout(function(){setShowTip(0);},2000);}
function setShowTip(n)
{ $("myBlogTips").style.display = (n>0) ? "block" : "none";}
function CheckReview(nID,np)
{ SetScroll("top_Id_n");if($("articleReview")) { loadAJAXTab("Review.asp?blogID="+blogID+"&ID="+nID+"&page="+np,"articleReview",0);} }
function CheckBook(np)
{  loadAJAXTab("Book.asp?blogID="+blogID+"&page="+np,"ContentID",0); }
function SetScroll(strX)
{ if ($(strX)) { $(strX).focus();} }
function getObjText(obj){ return isIE?obj.innerText:obj.textContent; }
function SetObjText(obj,_sText,n){obj.style.fontSize=n+"px";if(isIE){obj.innerText=_sText; }else{obj.textContent=_sText;}}
function OpenAttach(t)
{ var gourl = "AttachOpen.asp?ID=" + t; ExeID.location.href=gourl;  return false; }
function SetReplyShow(n)
{ var obj = $("reply_content_"+n); obj.style.display = obj.style.display =="none" ? "block" : "none"; }
var msg_limt = "<div id='myBlogErrInfo_Box'></div><div style='MARGIN-RIGHT:auto;MARGIN-LEFT:auto;'><fieldset style='width:420px;border : 1px solid #ff9900;text-align:left;MARGIN-RIGHT:auto;MARGIN-LEFT:auto;'><legend style='font-size:12px;color: #FF0000'>您无法浏览信息的原因是：</legend><div style='font-size:14px;line-height:130%;'><UL><li>信息为限制信息，请登陆后浏览。</li></UL></div></fieldset></div>";
function bbimg(o)
{ var zoom=parseInt(o.style.zoom, 10)||100; zoom+=event.wheelDelta/12; if (zoom>0){o.style.zoom=zoom+'%';} return false;}
function ShowEmotBox()
{ var oBox = $("myBlogEmotBox");
  oBox.style.display = "block";
  $("content").focus();
  if (!bIsEmoteBox || oBox.innerHTML=="")
  { oBox.innerHTML = strload; loadAJAXTab("/blog/emote/","myBlogEmotBox",0);}
}
function SetEmoteTag(obj)
{ var tag = obj.attributes['tag'].nodeValue;emoteTag = tag ; $("myBlogEmotContent").innerHTML = strload;
  var gourl = "/blog/emote/GetEmoteInfo.asp?id="+tag; loadAJAXTab(gourl,"myBlogEmotContent",0);}

function SetEmote(obj)
{ if (emoteTag=="") { return;}
  var ubb = $("content"); var ubbLength=ubb.value.length; var temp ="";
  temp = "["+emoteTag+obj.id.replace(emoteTag,"")+"]"+getObjText(obj)+"[/"+emoteTag+"] "; temp = temp.replace("\r","").replace("\n","");
  ubb.focus();
  if(typeof document.selection !="undefined")  {  document.selection.createRange().text=temp;  } 
  else   {  ubb.value=ubb.value.substr(0,ubb.selectionStart)+temp+ubb.value.substring(ubb.selectionStart,ubbLength);  } 
  $("myBlogEmotBox").style.display="none";
}
function ClearHTML(temp) { try {$(temp).innerHTML="";} catch(e){} }
function ShowSysInfo(n)
{
  if (n==sysBoxMenuCurId) { return false;}
  $("sysBoxMenu"+sysBoxMenuCurId).className = "";
  if(objTimer1){ window.clearInterval(objTimer1);}
  $("sysBoxMenu"+n).className = "nowtag";
  sysBoxMenuCurId = n;
  $("dialogsysMsg").innerHTML = strload; 
  if (_sysMsgInfo[n]=="")
  {  loadAJAXTab("GetSysInfo.asp","dialogsysMsg",0); }
  else
  {  $("dialogsysMsg").innerHTML = _sysMsgInfo[n];resizBox(1);}
}
function ShowMenuBox(obj,sId,o)
{ checkMenuBox(); oMenu = obj; if (!o) {return false;}
  menuBox = $(o); menuBox.style.display="block";
  var t,l;
  switch (sId)
  {
     case 0:  t = 30+$("top_Row").offsetHeight+$("banner").offsetHeight;
     l = $("bodyBg").offsetLeft+$("nav2_contain").offsetWidth-menuBox.offsetWidth-8;
     menuBox.style.top = t+"px";  menuBox.style.left = l+"px"; break;
     case 2: 
     t = $("top_Row").offsetHeight+$("banner").offsetHeight+10;
     var temp = CheckIE_Ver(6) ? 55 : 52;
     l = $("bodyBg").offsetLeft+$("dateId").offsetWidth+temp;
     menuBox.style.top = t+"px"; menuBox.style.left = l +"px";
     if ($("nav2_msg_scroll").offsetWidth<300)
     {  menuBox.style.width= parseInt($("Scroll_msg"+sId).offsetWidth+60)+"px";}
     else {menuBox.style.width=$("Scroll_msg"+sId).offsetWidth+"px";}
     break;
     default: t = 65+$("top_Row").offsetHeight+$("banner").offsetHeight; l = $("bodyBg").offsetLeft;
     if ($("LayoutId_0")) {l+=220;} else {l+=30;}
     menuBox.style.top = t+"px";  menuBox.style.left = l+"px";
     if (sBoxId!=sId && sId!=0) { loadAJAXTab("getClassList.asp?blogID="+blogID+"&sId="+sId,o,0); }
     else { menuBox.innerHTML = classBox_text;}
  }
}
function checkMenuBox()
{ if (menuBox !=null)
  {  if (menuBox.style.display =="block") { menuBox.style.display="none";oMenu.className = "menuUnSelect";} }
}
function CheckScrollBox(n)
{ if (n==2) {if(! _Timer[n]){ getScrollInfo(n);}  _Timer[n]=window.setInterval("getScrollInfo(n)", nTimer);}
  else {getScrollInfo(n);}
}
function getScrollInfo(n)
{ var gourl;if (n==2) {gourl="getScrollInfo.asp?blogID="+blogID;} else {gourl="getWeatherInfo.asp";}
  loadAJAXTab(gourl,"nav"+n+"_msg_scroll",0);
}
function Scroll_onMouseOver(n)
{ if(! $("Scroll_msg"+n)) { return false;}  window.clearTimeout(_Scrollst[n]);_Scrollst[n] = 0; }
function Scroll_onMouseOut(n)
{ if(! $("Scroll_msg"+n)) { return false;} if(!_Scrollst[n]) {_Scrollst[n] = window.setTimeout("msg_Scroll("+n+")", ScrollDelay);}}
function msg_Scroll(n)
{  var Scroll_msg = $("Scroll_msg"+n);
   if(_Scrollst[n]==0)
   {  $("scrollMenu"+n).innerHTML= Scroll_msg.innerHTML;
      Scroll_msg.innerHTML +=  Scroll_msg.innerHTML; Scroll_msg.scrollTop = 0;
      if(Scroll_msg.scrollHeight > ScrollHeight * 3)
      { _Scrollst[n] = setTimeout("msg_Scroll("+n+")", ScrollDelay); }
      else
      { $("nav"+n+"_msg_scroll").onmouseover = $("nav"+n+"_msg_scroll").onmouseout = null; }
      return;
   }
   if(ScrollCount == ScrollHeight)
   {
      if(Scroll_msg.scrollHeight - ScrollHeight <= Scroll_msg.scrollTop)
      { Scroll_msg.scrollTop = Scroll_msg.scrollHeight / 2 - ScrollHeight; }
      ScrollCount = 0; _Scrollst[n] = setTimeout("msg_Scroll("+n+")", ScrollDelay);
   }
   else
   { Scroll_msg.scrollTop ++ ;  ScrollCount ++ ; _Scrollst[n] = setTimeout("msg_Scroll("+n+")", 30); }
}
window.onerror=function(){return true}