       var segundosActivos = 0;
       var segundosTotal = 0;
       var linea = 0;
       
       setInterval("revalidarSesion()", 300000);
       
       function revalidarSesion() {
          generarAlertaModal( 5 );
       }
       
       function generarAlertaModal( tiempoRestante ) {
         // window.showModalDialog( "registro?accion=sesionaexpirar&tiempo=" + tiempoRestante, "Sesión proxima a expirar", "dialogHeight:200px;dialogWidth:300px" );
         window.open( "registro?accion=sesionaexpirar&tiempo=" + tiempoRestante, null, "menubar=no,status=no,titlebar=no,toolbar=no,height=200,width=300" );
       }
       
       function verificarTiempoSesion() {
         // alert( 'Se ejecuto !' );
         segundosActivos += 10;

         if( (segundosTotal - segundosActivos) <= 0 ) {
           window.location = "registro?accion=sesionexpiro&linea=" + linea;
         }
         else if( (segundosTotal - segundosActivos) <= 10 ) {
           generarAlertaModal( 10 );
         }
         else if( (segundosTotal - segundosActivos) <= 20 ) {
           generarAlertaModal( 20 );
         }
         else if( (segundosTotal - segundosActivos) <= 60 ) {
           generarAlertaModal( 30 );
         }
       }

       function initializeSession( tiempoMaximoSesion, lineaRecibida ) {
         segundosTotal = tiempoMaximoSesion;
         linea = lineaRecibida;
         setInterval("verificarTiempoSesion()", 10000);
       }

       function salir(){    
          if (confirm(" Desea salir de la aplicacion    ")){
              if (confirm(" Esta seguro de salir    ")){ 
                  window.location = 'http://www.icetex.gov.co';
              }
          }
       }
       
       function regresar() {
          regreso.submit();
       }
