function flex_isIE() {
     return $.browser.msie;
}

var SOA = {
     initialize: function(clientId,name) {
          if(!clientId || clientId == 0) {
               alert("The Specified ClientId is Invalid! Unable to start the Application.");
               window.close();
               return;
          }
                         
          $('#modalOverlay').show();
          $('#loading-wrapper').show();
          $('#loadingProgress').center();
          
          $.get("/rpc-data/load-session/id/"+clientId+'/name/'+name,
               function(data){ 
                    if(data == '{"type":"message","payload":"loaded-session"}') {
                         location.href = "/decimal/welcome";
                    } else {
                         alert("There was a problem initiating the session. The application is not available. Please try again later. ");
                    }
               }
          );
     }
}