function loginHeaderInit()
      {
         Passport.ticketCheck();

      }
      function userLogin(){
          Passport.login();
      }
      //登陆后的回调方法
     function loginCallback()
     {
         //alert("passport ok");
         var gamecookie = document.createElement('script');
             gamecookie.type = 'text/javascript';
             gamecookie.src = '/ajax/login.jsp';
             gamecookie.charset = 'utf-8';
        //alert(gamecookie.src);
        document.body.appendChild(gamecookie);
        return true;
     }
     function userLogout(){
          Passport.logout();
     }
      //退出后的回调方法
     function logoutCallback()
     {
        //alert("passport ok");
        var gamecookie = document.createElement('script');
             gamecookie.type = 'text/javascript';
             gamecookie.src = '/ajax/logout.jsp';
             gamecookie.charset = 'utf-8';
        //alert(gamecookie.src);
        document.body.appendChild(gamecookie);
        return true;
     }
     if (document.all)
     {
          window.attachEvent('onload', loginHeaderInit);//对于IE
     }
     else
     {
          window.addEventListener('load', loginHeaderInit, false);//对于FireFox
     }
