﻿function echoLogin()
{
     if(document.getElementById("nosign") && document.getElementById("signed"))
     {
     var opt = {
              method: 'post',             
              onSuccess: function(t) {
               var arr=t.responseText.split('|');
               if(arr[0]=="True")
               {
                 document.getElementById("signed-name").innerHTML=arr[1];
                 document.getElementById('signed').style.display='';
                 document.getElementById('nosign').style.display='none';
                 document.getElementById('cardNum').innerHTML=arr[2];
               }
              },
              // Handle 404
              on404: function(t) {
                  alert('Error 404: location "' + t.statusText + '" was not found.');
                  return false;
              },
              // Handle other errors
              onFailure: function(t) {
                  alert('Error ' + t.status + ' -- ' + t.statusText);
                  return false;
              }
         }
         new Ajax.Request('/Common/CommonActionAjax.aspx?Action=CheckLogin',opt);
    }
}

echoLogin();