var isIndex = true;

var lunarInfo=new Array(0x04bd8,0x04ae0,0x0a570,0x054d5,0x0d260,0x0d950,0x16554,0x056a0,0x09ad0,0x055d2,0x04ae0,0x0a5b6,0x0a4d0,0x0d250,0x1d255,0x0b540,0x0d6a0,0x0ada2,0x095b0,0x14977,0x04970,0x0a4b0,0x0b4b5,0x06a50,0x06d40,0x1ab54,0x02b60,0x09570,0x052f2,0x04970,0x06566,0x0d4a0,0x0ea50,0x06e95,0x05ad0,0x02b60,0x186e3,0x092e0,0x1c8d7,0x0c950,0x0d4a0,0x1d8a6,0x0b550,0x056a0,0x1a5b4,0x025d0,0x092d0,0x0d2b2,0x0a950,0x0b557,0x06ca0,0x0b550,0x15355,0x04da0,0x0a5d0,0x14573,0x052d0,0x0a9a8,0x0e950,0x06aa0,0x0aea6,0x0ab50,0x04b60,0x0aae4,0x0a570,0x05260,0x0f263,0x0d950,0x05b57,0x056a0,0x096d0,0x04dd5,0x04ad0,0x0a4d0,0x0d4d4,0x0d250,0x0d558,0x0b540,0x0b5a0,0x195a6,0x095b0,0x049b0,0x0a974,0x0a4b0,0x0b27a,0x06a50,0x06d40,0x0af46,0x0ab60,0x09570,0x04af5,0x04970,0x064b0,0x074a3,0x0ea50,0x06b58,0x055c0,0x0ab60,0x096d5,0x092e0,0x0c960,0x0d954,0x0d4a0,0x0da50,0x07552,0x056a0,0x0abb7,0x025d0,0x092d0,0x0cab5);var Gan=new Array("甲","乙","丙","丁","戊","己","庚","辛","壬","癸");var Zhi=new Array("子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥");var now=new Date();var SY=now.getFullYear();var SM=now.getMonth();var SD=now.getDate();function cyclical(num){return(Gan[num%10]+Zhi[num%12])}function lYearDays(y){var i,sum=348;for(i=0x8000;i>0x8;i>>=1)sum+=(lunarInfo[y-1900]&i)?1:0;return(sum+leapDays(y))}function leapDays(y){if(leapMonth(y))return((lunarInfo[y-1900]&0x10000)?30:29);else return(0)}function leapMonth(y){return(lunarInfo[y-1900]&0xf)}function monthDays(y,m){return(lunarInfo[y-1900]&(0x10000>>m))?30:29}function Lunar(objDate){var i,leap=0,temp=0;var baseDate=new Date(1900,0,31);var offset=(objDate-baseDate)/86400000;this.dayCyl=offset+40;this.monCyl=14;for(i=1900;i<2050&&offset>0;i++){temp=lYearDays(i);offset-=temp;this.monCyl+=12}if(offset<0){offset+=temp;i--;this.monCyl-=12}this.year=i;this.yearCyl=i-1864;leap=leapMonth(i);this.isLeap=false;for(i=1;i<13&&offset>0;i++){if(leap>0&&i==(leap+1)&&this.isLeap==false){--i;this.isLeap=true;temp=leapDays(this.year)}else{temp=monthDays(this.year,i)}if(this.isLeap==true&&i==(leap+1)){this.isLeap=false}offset-=temp;if(this.isLeap==false){this.monCyl++}}if(offset==0&&leap>0&&i==leap+1){if(this.isLeap){this.isLeap=false}else{this.isLeap=true;--i;--this.monCyl}}if(offset<0){offset+=temp;--i;--this.monCyl}this.month=i;this.day=offset+1}function YYMMDD(){return(SY+'年'+(SM+1)+'月'+SD+'日   ')}function weekday(){var day=new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");return(day[now.getDay()]+'  ')}function cDay(m,d){var nStr1=new Array('日','一','二','三','四','五','六','七','八','九','十');var nStr2=new Array('初','十','廿','卅','　');var s;if(m>10){s='十'+nStr1[m-10]}else{s=nStr1[m]}s+='月';switch(d){case 10:s+='初十';break;case 20:s+='二十';break;case 30:s+='三十';break;default:s+=nStr2[Math.floor(d/10)];s+=nStr1[d%10]}return(s)}function solarDay2(){var sDObj=new Date(SY,SM,SD);var lDObj=new Lunar(sDObj);var tt=cyclical(SY-1900+36)+'年 农历'+cDay(lDObj.month,lDObj.day);return(tt)}function clock(){return YYMMDD()+weekday()+solarDay2()}

function mail_login(){var e=document.m;var d=e.domains,a=e.uName,c=e.uPw;if(d.value==""){alert("\u60a8\u6ca1\u6709\u9009\u62e9\u90ae\u7bb1\uff01");d.focus();return false}if(a.value==""){alert("\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a\uff01");a.focus();return false}if(c.value==""){alert("\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a\uff01");c.focus();return false}setCookies();switch(d.value){case"163":e.action="https://reg.163.com/logins.jsp?type=1&amp;product=mail163";e.url.value="http://entry.mail.163.com/coremail/fcg/ntesdoor2?lightweight=1&amp;verifycookie%3D1%26language%3D-1%26style%3D-1";e.username.value=a.value;e.password.value=c.value;break;case"126.com":e.action="https://reg.163.com/logins.jsp?type=1&amp;product=mail126";e.url.value="http://entry.mail.126.com/cgi/ntesdoor?lightweight=1&amp;verifycookie=1&amp;style=-1";e.username.value=a.value+"@126.com";e.password.value=c.value;break;case"vip.163.com":e.action="https://ssl1.vip.163.com/logon.m";e.enterVip.value=true;e.username.value=a.value;e.password.value=c.value;break;case"yeah.net":e.action="http://reg.163.com/logins.jsp?type=1&amp;product=mailyeah&amp;url=http://entry.mail.yeah.net/cgi/ntesdoor?lightweight%3D1%26verifycookie%3D1%26style%3D-1";e.username.value=a.value+"@yeah.net";e.password.value=c.value;break;case"188":e.action="http://reg.mail.188.com/servlet/coremail/login?language=0&amp;style=1";e.user.value=a.value;e.pass.value=c.value;break;case"sina.com":e.action="http://mail.sina.com.cn/cgi-bin/login.cgi";e.u.value=a.value;e.psw.value=c.value;break;case"2008.sina.com":e.action="http://mail.2008.sina.com.cn/cgi-bin/login.php";e.domain.value="2008.sina.com";e.u.value=a.value;e.psw.value=c.value;break;case"vip.sina.com":e.action="http://vip.sina.com.cn/cgi-bin/login.cgi";e.user.value=a.value;e.pass.value=c.value;break;case"yahoo.com.cn":e.action="https://edit.bjs.yahoo.com/config/login";e.login.value=a.value;e.passwd.value=c.value;break;case"yahoo.cn":e.action="https://edit.bjs.yahoo.com/config/login";e.login.value=a.value+"@yahoo.cn";e.passwd.value=c.value;break;case"tom":e.action="http://bjweb.163.net/cgi/163/login_pro.cgi";e.user.value=a.value;e.pass.value=c.value;break;case"21cn":e.action="http://passport.21cn.com/maillogin.jsp";e.LoginName.value=a.value;e.passwd.value=c.value;e.domainname.value="21cn.com";e.UserName.value=a.value+"@21cn.com";break;case"gmail":e.action="https://www.google.com/accounts/ServiceLoginAuth?service=mail";e.Email.value=a.value;e.Passwd.value=c.value;break;case"tianya":e.action="http://www.tianya.cn/user/loginsubmit.asp";e.vwriter.value=a.value;e.vpassword.value=c.value;break;case"51com":e.action="http://passport.51.com/login.5p";e.passport_51_user.value=a.value;e.passport_51_password.value=c.value;e.gourl.value="http__/my.51.com/webim/index.html";break;case"sohu":e.action="http://passport.sohu.com/login.jsp";e.url.value="";e.UserName.value=a.value;e.Password.value=c.value;e.id.value=a.value;e.username.value=a.value;e.password.value=c.value;e.m.value=a.value;e.passwd.value=c.value;e.mpass.value=c.value;e.loginid.value=a.value+"@sohu.com";e.fl.value="1";e.vr.value="1|1";e.appid.value="1000";e.ru.value="http://login.mail.sohu.com/servlet/LoginServlet";e.eru.value="http://login.mail.sohu.com/login.jsp";e.ct.value="1173080990";e.sg.value="5082635c77272088ae7241ccdf7cf062";break;case"xiaonei":e.action="http://passport.renren.com/PLogin.do";e.email=a.value;e.password=c.value;break}function b(){c.value=""}setTimeout(b,1000);return true}function shortcut(){var d=document.m;var c=d.domains,a=d.uName,b=d.uPw;if(c.value=="qq"){window.open("http://mail.qq.com/")}else{if(c.value=="hotmail"){window.open("http://login.live.com/")}else{if(c.value=="sogou"){window.open("http://mail.sogou.com/")}else{if(c.value=="139"){window.open("http://mail.139.com/")}else{if(c.value=="baidu"){window.open("http://passport.baidu.com/?login&amp;tpl=mn")}else{if(c.value=="kaixin001"){window.open("http://www.kaixin001.com/login/index.php")}else{if(c.value=="chinaren"){window.open("http://www.chinaren.com/")}}}}}}}setCookies()}function setCookies(){var c=document.m;var b=c.domains,a=c.uName;if(b.value!="qq"&&b.value!="hotmail"&&b.value!="sogou"&&b.value!="baidu"&&b.value!="139"&&b.value!="kaixin001"&&b.value!="chinaren"){setCookie("mailType",b.selectedIndex.toString());if(a.value){setCookie("username",a.value.toString())}}}function setCookie(j,b,h,g,i,f){var c=new Date();c.setTime(c.getTime());if(!h){h=365}if(!g){g="/"}h=h*1000*60*60*24;var a=new Date(c.getTime()+(h));document.cookie=j+"="+encodeURIComponent(b)+((h)?";expires="+a.toGMTString():"")+((g)?";path="+g:"")+((i)?";domain="+i:"")+((f)?";secure":"")}function getCookie(g){var f=document.cookie.split("; ");for(var a=0;a<f.length;a++){var d=f[a].split("=");if(g==d[0]){try{return decodeURIComponent(d[1])}catch(b){return null}}}return null}(function(){var b=document.m;var a=b.domains;var c=getCookie("mailType")?getCookie("mailType"):0;a.options[c].setAttribute("selected","true")})();var noSuggest=false;function googleHint(c,a){var d=document.getElementById("gsuggest");var b=src="http://www.google.cn/complete/search?hl=zh-CN&xhr=f&q="+encodeURIComponent(c);if(d){d.parentNode.removeChild(d)}Ylmf.JsLoader(b,"gsuggest",function(){})}var currentInput;function myhint(event,obj){var keyword=obj;var h=document.getElementById("suggest");if(keyword.value!==""&&event.keyCode==13){KeywordCount({type:keyword.id,word:keyword.value,url:window.location.href},"http://stat.114la.com/click.php")}if(!keyword.value||!keyword.value.length||event.keyCode==27||event.keyCode==13){h.style.display="none";return}if(event.keyCode==38||event.keyCode==40){if(h.style.display=="none"){return}if(event.keyCode==38){if(h._i==-1){h._i=h.firstChild.rows.length-1}else{h._i--}}else{h._i++}for(var i=0;i<h.firstChild.rows.length;i++){h.firstChild.rows[i].style.background="#FFF"}if(h._i>=0&&h._i<h.firstChild.rows.length){with(h.firstChild.rows[h._i]){style.background="#E6E6E6";keyword.value=cells[0].attributes._h.value}}else{keyword.value=h._kw;h._i=-1}}else{h._i=-1;h._kw=keyword.value;googleHint(keyword.value,obj)}serachInputVal=keyword.value;currentInput=keyword}window.google={};window.google.ac={};var searchurl="http://www.baidu.com/s?tn=lqowen_1_pg&amp;wd=";var suggest=document.getElementById("suggest");(function(){var b=Ylmf.getPosXY(Dom.get("baidu"));var a=b[0],c=b[1];a+=1;c+=2;suggest.style.left=a+"px";suggest.style.top=c+"px"})();function countSearchLink(a){KeywordCount({type:a.id,word:serachInputVal,url:window.location.href},"http://stat.114la.com/click.php")}window.google.ac.h=function(a){var e=a[1];if(!e||e.length<3){return}if(noSuggest==true){return}var d="";for(var b=0;b<e.length;b++){d+='<tr style="cursor:hand" onmouseover="javascript:this.style.background=\'#E6E6E6\'" onmouseout="javascript:this.style.background=\'#FFF\';"><td style="color:#000;font-size:12px; text-align:left;" _h="'+e[b][0]+'"><em  style="color:#090" align="right" style="font-size:11.5px;">\u7ea6 '+e[b][1]+"</em>";d+='<a href="'+searchurl+e[b][0]+'" onclick="countSearchLink(currentInput);serachInputVal=this.innerHTML;currentInput.value=serachInputVal;" rel = "nr">'+e[b][0]+"</a></td></tr>"}suggest.innerHTML='<table width="100%" border="0" cellpadding="0" cellspacing="0">'+d+'</table><div class="close"><a onclick=\'suggest.style.display="none";noSuggest=true;\'>\u5173\u95ed</a></div>';suggest.style.display="block"};function JHshStrLen(d){var a,e,c,b;e=0;a=d.split("");for(c=0;c<a.length;c++){b=escape(a[c]);if(b.indexOf("%u",0)==-1){e=e+1}else{e=e+2}}return e}var oldkeyword="";var siteKey=document.getElementById("znsearch");var keyUp_Timer;function input(){if(siteKey.value==""||JHshStrLen(siteKey.value)<2){}else{if(siteKey.value!=oldkeyword){if(keyUp_Timer){window.clearTimeout(keyUp_Timer)}keyUp_Timer=window.setTimeout(gositesearch,250)}}}function gositesearch(){var b=siteKey.value;var a=document.getElementById("indexhtml");oldkeyword=b;ylmftime=new Date().getTime();url="search4176.html?keyword="+encodeURIComponent(b)+"&ylmftime="+ylmftime;Dom.show("localsearch");a.innerHTML='<li class="loadding"><img src="static/images/loadding.gif" alt="loadding..." align="absmiddle" /> \u6b63\u5728\u641c\u7d22\u4e2d,\u8bf7\u7a0d\u540e...</li>';Ylmf.Ajax(url,function(d){var c=d.responseText;if(c==""){a.innerHTML="<li>\u6ca1\u6709\u641c\u7d22\u5230\u76f8\u5173\u7ad9\u70b9!</li>"}else{if(c){a.innerHTML=c}}})};

document.onclick=glog;

var showsoft=false;
var showgame=false;
var show39net=false;
var shownews=false;
var showmeirong=false;


var waitInterval;
var MouseDelayTime=400;
function Hover(obj){
    var fn =function(){
        vaf=obj.getAttribute("onclick");
        if(typeof(vaf)=="string"){
           vaf=vaf.replace("this","obj");
           eval(vaf);
        }else{
           eval(vaf());
        }
        obj.className = "active";
    }
    clearTimeout(waitInterval);
    waitInterval = window.setTimeout(fn,MouseDelayTime);

}
function mouseOut(){
    clearTimeout(waitInterval);
}
function tabMenu(tabId,showContent,selfObj){
    var tag = document.getElementById(tabId+"-menu").getElementsByTagName("li");
    var taglength = tag.length;
    for(i=0; i<taglength; i++){
           tag[i].className = "";
    }
    selfObj.className = "active";
    for(i=0; j=document.getElementById(tabId+"-box"+i); i++){
     if(tabId=='board'){
     if(showsoft==false && i==3){
        $("indexsoft").innerHTML="<iframe src='../apps/soft.html' frameborder='0' scrolling='no' frameborder='0' width='574' height='305' ></iframe>";
        showsoft=true;
     }else if (showgame==false && i==4)
     {
        $("indexgame").innerHTML="<iframe src='../apps/game.html' frameborder='0' scrolling='no' frameborder='0' width='574' height='305' ></iframe>";
        showgame=true;
     } }
            j.style.display = "none";
        }
        document.getElementById(showContent).style.display = "block";
}
function showDiv(id,type) {
    document.getElementById(id).style.display = type;
}
function moreMenu(showBox) {
    var _selfObj = document.getElementById("search-more");
    tabMenu('search',showBox,_selfObj);
    showDiv("more","none");
}
