function INDEX2_k_keydown(e)
{
var theEvent=window.event||e;var keyNum=theEvent.keyCode||theEvent.which;
if(keyNum==13)index_2_search();
}

function index_2_search(){
var str=document.getElementById("k").value;
if(str=="")return false;
top.location="/search.aspx?type=life&k="+escape(str);
}

function minilogin_login(){
var url=location.href;if(url.indexOf("#")!=-1)url=url.substring(0,url.lastIndexOf("#"));
if(document.getElementById("minilogin_u")&&document.getElementById("minilogin_p")&&document.getElementById("minilogin_autologin")){
var _user=document.getElementById("minilogin_u").value.replace(/ /g,"").replace(/　/g,"");var _pwd=document.getElementById("minilogin_p").value.replace(/ /g,"").replace(/　/g,"");
if(_user==""||_user=="用户名/手机号/邮箱"){alert("请输入用户帐号！");return false;}else if(_pwd==""){alert("请输入用户密码！");return false;}
else ajax("post","/user/minilogin.aspx?act=ajax&rd="+Math.random(),"u="+base64en(_user)+"&p="+base64en(_pwd)+"&a="+document.getElementById("minilogin_autologin").checked,function OnHandler(){if(xmlHttp.readyState == 4){if(xmlHttp.responseText=='ok')window.location=url;else {alert(xmlHttp.responseText);}}});
}}

var showlifebigclassdatamark="";
function showlifebigclassdata(par1)
{
    if(showlifebigclassdatamark==par1)return;
    function subFun(result)
    {
        showlifebigclassdatamark=par1;
       if(result.indexOf("clear")!=-1) document.getElementById("lifedatadiv").innerHTML=result;
    }
ajax("get","/index/2/index.aspx?act=ajax&type=lifedata&classid="+par1,"",function OnHandler(){if(xmlHttp.readyState == 4){subFun(xmlHttp.responseText);}});
}

function intervalCheckLogin(){var url=location.href;if(url.indexOf("#")!=-1)url=url.substring(0,url.lastIndexOf("#"));if(url.indexOf("/user/login.aspx?ReturnUrl=")!=-1||url.indexOf("/user/reg.aspx?ReturnUrl=")!=-1||url.indexOf("/user/login.htm?ReturnUrl=")!=-1||url.indexOf("/user/login.aspx?ReturnUrl=")!=-1){var str1=(base64de(url.substring(url.indexOf("?ReturnUrl=")+11)));if(str1!=""){url=str1;}}ajax("get","/user/ajax.aspx?type=interval_check_login&rd="+Math.random(),"",function OnHandler(){if(xmlHttp.readyState == 4){if(xmlHttp.responseText=='ok')window.location=url;}});}