﻿// JScript 文件
var xmlHttpL;
function createXmlHttpRequestl() 
{
    if(window.ActiveXObject)
    {
        xmlHttpL=new ActiveXObject("Microsoft.XMLHTTP");
   
    }
    else if(window.XMLHttpRequest)
    {
        xmlHttpL=new XMLHttpRequest();
    }
}



   
 function isLogin()
{   

String.prototype.trim=function(){
　　 return this.replace(/(^\s*)|(\s*$)/g, "");
　　}

          var  Cvalue="0";
           var arrStr = document.cookie.split(";"); 
           for(var i = 0;i < arrStr.length;i ++)
           { 
               var temp = arrStr[i].split("="); 
             //  alert(temp[0].trim()=="user");
               if(temp[0].trim()=="user")
               {  
                 // alert(this.Cvalue)
                  Cvalue= unescape(temp[1].trim()); 
                  break;
               }    
            }  
   
     if(Cvalue.trim()=="0")
     {
      document.getElementById('Tip').innerHTML='<a class="blue cu" href="/BookingLogin.aspx">登录</a><a>|</a><a class="blue cu" href="/register.aspx">注册</a>'
     }
     else
     {
      document.getElementById('Tip').innerHTML='<a class="blue cu" href="/Member/Out.aspx">退出</a><a></a><a class="blue cu" href="/Member/index.aspx"  >会员中心</a>';
     }
//    createXmlHttpRequestl();
//    xmlHttpL.open("GET","/web_serverCode/checkIsLogin.aspx",false);  
//    xmlHttpL.onreadystatechange=function()
//    {
//     if(xmlHttpL.readyState==4)
//       {
//                if(xmlHttpL.status==200)
//                {
//                 var text=xmlHttpL.responseText
//                 document.getElementById('Tip').innerHTML= xmlHttpL.responseText;
//                }
//        }
//    };
//    xmlHttpL.send(null);

}

