Index: controlies/trunk/applications/controlies/static/css/superfish.css
===================================================================
--- controlies/trunk/applications/controlies/static/css/superfish.css	(revision 436)
+++ controlies/trunk/applications/controlies/static/css/superfish.css	(revision 437)
@@ -64,15 +64,15 @@
 }
 .sf-menu a, .sf-menu a:visited  { /* visited pseudo selector so IE6 applies text colour*/
 /*    color: #275b90;/*#13a;*/
-    color: #0;
+    color: #FFF;
 }
 .sf-menu li {
     /*background: #dadada;/*#BDD2FF;*/
-    background: #4c4c4c;
+    background: #000;
 }
 .sf-menu li li {
 /*    background:     #AABDE6;*/
-    background:     #555;
+    background:     #000;
 }
 .sf-menu li li a {
     /*color: #13a;*/
@@ -79,13 +79,14 @@
 }
 .sf-menu li li li {
 /*    background:     #9AAEDB;*/
-        background:     #555;
+        background:     #AAA;
 }
 .sf-menu li:hover, .sf-menu li.sfHover,
 .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
 /*    background:     #CFDEFF;*/
-    background:     #777;
+    background:     #F6AE38;
     outline:        0;
+    font-color:		#FFF;
 }
 
 /*** arrows **/
Index: controlies/trunk/applications/controlies/static/css/base.css
===================================================================
--- controlies/trunk/applications/controlies/static/css/base.css	(revision 436)
+++ controlies/trunk/applications/controlies/static/css/base.css	(revision 437)
@@ -340,7 +340,8 @@
 
 h1,h2,h3,h4,h5,h6 { line-height: 170%; }
 h1 { margin-bottom: .5em; border-bottom: solid 1px #d9d9d9; font-family: Arial, Helvetica, sans-serif; font-weight: normal; font-size: 2.0em; text-indent: 5px; letter-spacing: -1px; }
-h1 .fontTitle { color:green; }
+#myTitle { font-size:17pt; font-weight:bold; margin-top:4px; margin-right:10px; }
+#myTitle .fontTitle { color:green; }
 h1 .subTitle { font-size:14px; }
 h2 {font-size: 1.8em;}
 h3 {font-size: 1.4em;}
Index: controlies/trunk/applications/controlies/static/js/jquery.tzineClock/jquery.tzineClock.css
===================================================================
--- controlies/trunk/applications/controlies/static/js/jquery.tzineClock/jquery.tzineClock.css	(revision 436)
+++ controlies/trunk/applications/controlies/static/js/jquery.tzineClock/jquery.tzineClock.css	(revision 437)
@@ -40,8 +40,9 @@
 	z-index:20;
 	color:#F5F5F5;
 	font-size:60px;
+	font-weight:bold;
 	text-align:center;
-	top:65px;
+	top:90px;
 	left:0;
 	
 	/* CSS3 text shadow: */
Index: controlies/trunk/applications/controlies/static/js/utils.js
===================================================================
--- controlies/trunk/applications/controlies/static/js/utils.js	(revision 436)
+++ controlies/trunk/applications/controlies/static/js/utils.js	(revision 437)
@@ -108,4 +108,4 @@
 		.dialog('open'); 
 
 	return true;
-}
+}
\ No newline at end of file
Index: controlies/trunk/applications/controlies/views/usuarios/index.html
===================================================================
--- controlies/trunk/applications/controlies/views/usuarios/index.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/usuarios/index.html	(revision 437)
@@ -116,7 +116,7 @@
     }           
     
     function addRecord(){
-    
+    		ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
             jQuery("#messageLoading").show();
         
             jQuery("#dialog-form").html("").css("display","none");
@@ -143,6 +143,7 @@
     }
     
     function modifyRecord(){
+    		ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
                     var uid;
     
                     jQuery("#messageLoading").show();
@@ -203,7 +204,7 @@
     }
     
     function deleteRecord(){
-        
+    		ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
             var uid = rowSelected();
             if(uid==false)
                 return false;
@@ -243,7 +244,7 @@
     }
 
 	function createHomeDirectory(username,type){	
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
 		$.post("{{=URL(c='usuarios',f='call',args=['json','create_home_directory_withoutpass'])}}", {username:username, type:type}, function(result) {
 			switch(result.response){
 				case 'failAuth':{
@@ -260,6 +261,7 @@
 	}
 
 	function formCreateHomeDirectory(username,type){	
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
 		setTimeout("$('#dialog-form').dialog('close')",200);
 		jQuery("#dialog-form2").load("form_home_directory.html", function() {
 			jQuery("#form_dataNFS #username").val(username);			
Index: controlies/trunk/applications/controlies/views/usuarios/form_home_directory.html
===================================================================
--- controlies/trunk/applications/controlies/views/usuarios/form_home_directory.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/usuarios/form_home_directory.html	(revision 437)
@@ -14,7 +14,7 @@
     }
 
     function sendNFS(){
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         restartStyle();
         jQuery.post('call/json/create_home_directory', jQuery("#form_dataNFS").serialize(), function(result) {
             switch(result.response){
Index: controlies/trunk/applications/controlies/views/usuarios/form.html
===================================================================
--- controlies/trunk/applications/controlies/views/usuarios/form.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/usuarios/form.html	(revision 437)
@@ -14,7 +14,7 @@
     }
 
     function send(){
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         restartStyle();
         jQuery.post('call/json/modify_user', jQuery("#form_data").serialize(), function(result) {
             //var result = $.parseJSON(data);
Index: controlies/trunk/applications/controlies/views/grupos/form.html
===================================================================
--- controlies/trunk/applications/controlies/views/grupos/form.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/grupos/form.html	(revision 437)
@@ -15,7 +15,7 @@
 
 
     function send(){
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         restartStyle();
 
         jQuery.post('call/json/modify', jQuery("#form_data").serialize(), function(result) {
Index: controlies/trunk/applications/controlies/views/grupos/index.html
===================================================================
--- controlies/trunk/applications/controlies/views/grupos/index.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/grupos/index.html	(revision 437)
@@ -70,6 +70,7 @@
 				"selectOnExpand" : true
 			},
 			subGridRowExpanded: function(subgrid_id, row_id) {
+    			ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
 				var subgrid_table_id, pager_id;
 				subgrid_table_id = subgrid_id+"_t";
 				pager_id = "p_"+subgrid_table_id;
@@ -141,7 +142,7 @@
 }           
 
 function addRecord(){
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         jQuery("#messageLoading").show();
     
         jQuery("#dialog-form").html("");
@@ -176,57 +177,58 @@
 var autoComplete;
 
 function modifyRecord(){
-                var uid;
+    ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+    var uid;
 
-                jQuery("#messageLoading").show();
-                
-                var uid = rowSelected();
-                if(uid==false)
-                    return false;
+    jQuery("#messageLoading").show();
+    
+    var uid = rowSelected();
+    if(uid==false)
+        return false;
 
-                jQuery("#dialog-form").html("").css("display","none");
-                jQuery("#dialog-form").load("form.html", function() {
-                    
-                jQuery("#form_data #action").val("modify");
-                    
-                    jQuery.post('call/json/getGroupData',{ name: uid }, function(result) {
+    jQuery("#dialog-form").html("").css("display","none");
+    jQuery("#dialog-form").load("form.html", function() {
+        
+    jQuery("#form_data #action").val("modify");
+        
+        jQuery.post('call/json/getGroupData',{ name: uid }, function(result) {
 
-                        if(result.response['type']=="school_department")
-                            var textType = "Departamento";
-                        else
-                            var textType = "Curso";
+            if(result.response['type']=="school_department")
+                var textType = "Departamento";
+            else
+                var textType = "Curso";
+                
+            jQuery("#form_data #type").replaceWith(textType+"<input type='hidden' id='type' name='type' value='"+result.response['type']+"'/>");
+            jQuery("#form_data #name").replaceWith(result.response['name']+"<input type='hidden' id='name' name='name' value='"+result.response['name']+"'/>");
+                        
+            x = (jQuery(window).width()-500)/2;
+            y = (jQuery(window).height()-500)/2;
+            
+            jQuery("#messageLoading").hide();
+            
+            jQuery("#dialog-form").dialog({
+                resizable: false,
+                modal: true,
+                width: 500,
+                title: "Modificar Grupo"
+            }).dialog('option', 'position', [x, y]);        
                             
-                        jQuery("#form_data #type").replaceWith(textType+"<input type='hidden' id='type' name='type' value='"+result.response['type']+"'/>");
-                        jQuery("#form_data #name").replaceWith(result.response['name']+"<input type='hidden' id='name' name='name' value='"+result.response['name']+"'/>");
-                                    
-                        x = (jQuery(window).width()-500)/2;
-                        y = (jQuery(window).height()-500)/2;
-                        
-                        jQuery("#messageLoading").hide();
-                        
-                        jQuery("#dialog-form").dialog({
-                            resizable: false,
-                            modal: true,
-                            width: 500,
-                            title: "Modificar Grupo"
-                        }).dialog('option', 'position', [x, y]);        
-                                        
-                        // Autocomplete with poll the server as you type
-                        autoComplete = new jQuery.TextboxList('#users', {unique: true, plugins: {autocomplete: {
-                            minLength: 2,
-                            queryRemote: true,
-                            remote: {url: "{{=URL(c='usuarios',f='call',args=['json','getAllUsers'])}}" }
-                        }}});
+            // Autocomplete with poll the server as you type
+            autoComplete = new jQuery.TextboxList('#users', {unique: true, plugins: {autocomplete: {
+                minLength: 2,
+                queryRemote: true,
+                remote: {url: "{{=URL(c='usuarios',f='call',args=['json','getAllUsers'])}}" }
+            }}});
 
-                        $.each(result.response['memberuid'], function(i, l){
-                            autoComplete.add(l);        
-                        });                       
-                    });               
-                });
+            $.each(result.response['memberuid'], function(i, l){
+                autoComplete.add(l);        
+            });                       
+        });               
+    });
 }
 
 function deleteRecord(){
-    
+    ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         var id = rowSelected();
         if(id==false)
             return false;
@@ -254,22 +256,12 @@
 
 function getAllUsers(){
         $.post("{{=URL(c='usuarios',f='call',args=['json','getAllUsers'])}}",   function(users) {
-    
-    
-                          
+                           
         });             
 }
 
 </script>
 
-
-
-
-
-
-
-
-
 <script type="text/javascript">
   jQuery(document).ready(function(){  print_grid();}); 
 </script>
Index: controlies/trunk/applications/controlies/views/layout.html
===================================================================
--- controlies/trunk/applications/controlies/views/layout.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/layout.html	(revision 437)
@@ -73,31 +73,27 @@
       
       <div id="wrapper">        
     
+		    <div class="topbar">
+		      <div class="container">    
+		        <div class="sixteen columns">
+		        	<!--&nbsp;&nbsp;Control<span class="fontTitle">IES</span>&nbsp;&nbsp;<span class="subTitle">Centros Educativos de Extremadura</span>-->
+		          <div style="float:left; vertical-align:middle;" id="myTitle">Control<span class="fontTitle">IES</span><br></div>
+		          <div id="menu">
+		              {{if auth.user is not None:
+		              =MENU(response.menu,_class='sf-menu') }}
+              		  {{pass}}
+		          </div>
+		        </div>
+		      </div>
+		    </div><!-- topbar -->
+    
             <div id="header"> <!-- header and login nav -->
               {{block header}} <!-- this is default header -->
-{{try:}}{{=SPAN(T('Welcome'),' ',auth.user.first_name,' [ ', A(T('logout'),_href=URL('default','user')+'/logout'), ']',_class='auth_navbar')}}{{except:pass}}   
-              
-                     
-<h1>&nbsp;&nbsp;Control<span class="fontTitle">IES</span>&nbsp;&nbsp;<span class="subTitle">Centros Educativos de Extremadura</span></h1>              
-
-              <div style="clear: both;"></div><!-- Clear the divs -->
+				{{try:}}{{=SPAN(T('Welcome'),' ',auth.user.first_name,' [ ', A(T('logout'),_href=URL('default','user')+'/logout'), ']',_class='auth_navbar')}}{{except:pass}}   
+	              <div style="clear: both;"></div><!-- Clear the divs -->
               {{end}}                                     
             </div><!-- header  -->
     
-            <div id="statusbar"><!-- statusbar is menu zone -->
-              {{block statusbar}} <!-- this is default statusbar -->
-              {{#------ superfish menu ------}}
-              {{if auth.user is not None:
-              =MENU(response.menu,_class='sf-menu') }}
-              
-              <script type="text/javascript">
-                jQuery(document).ready(function(){
-                jQuery('ul.sf-menu').superfish();});
-              </script>
-              {{pass}}
-              <div style="clear: both;"></div><!-- Clear the divs -->   
-              {{end}}               
-            </div><!-- statusbar -->
     
             <div id="page"> <!-- Here my central body -->     
         
@@ -108,9 +104,9 @@
                         </div>
                       </div><!-- left_sidebar -->
                   {{pass}}
-        
+        		  <br>
                   <!-- content -->
-                  <div id="content" {{=XML(style_content)}} >
+                  <div id="content" {{=XML(style_content)}}>
                   
                       {{include}}           
                   
Index: controlies/trunk/applications/controlies/views/laptops_groups/form.html
===================================================================
--- controlies/trunk/applications/controlies/views/laptops_groups/form.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/laptops_groups/form.html	(revision 437)
@@ -17,7 +17,8 @@
     }
 
     function send(){
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+    	
         restartStyle();
         jQuery.post("{{=URL(c='laptops_groups',f='call',args=['json','addLaptop'])}}", jQuery("#form_data").serialize(), function(result) {
             switch(result.response){
Index: controlies/trunk/applications/controlies/views/laptops_groups/index.html
===================================================================
--- controlies/trunk/applications/controlies/views/laptops_groups/index.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/laptops_groups/index.html	(revision 437)
@@ -82,6 +82,8 @@
 				"selectOnExpand" : true
 			},
 			subGridRowExpanded: function(subgrid_id, row_id) {
+				ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+				
 				var subgrid_table_id, pager_id;
 				subgrid_table_id = subgrid_id+"_t";
 				pager_id = "p_"+subgrid_table_id;
@@ -102,6 +104,8 @@
 					sortname: 'cn',
 					sortorder: "desc",
 					onSelectRow: function(uid){
+						ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+						
 						cellValue = jQuery.trim(jQuery("#"+subgrid_table_id).getCell(uid, 'serial_number'));
 						subGridActive = subgrid_table_id;
 						jQuery("#"+subgrid_table_id).setCell(uid, 'serial_number',cellValue);
@@ -173,32 +177,10 @@
     
       }); 
       jQuery("#list").jqGrid('navGrid','#pager',{add:false,edit:false,del:false,search:false,refresh:false});
-    
-		jQuery("#list").jqGrid('navButtonAdd','#pager',{
-				caption: "Insertar",
-				buttonicon :'ui-icon-plus',
-				onClickButton : function (){ 
-					addRecord();
-				} 
-		}); 
-		jQuery("#list").jqGrid('navButtonAdd','#pager',{
-				caption: "Modificar", 
-				buttonicon :'ui-icon-pencil',
-				onClickButton : function (){ 
-					modifyRecord();
-			} 
-		}); 
-		jQuery("#list").jqGrid('navButtonAdd','#pager',{
-				caption: "Borrar", 
-				buttonicon :'ui-icon-trash',
-				onClickButton : function (){ 
-					deleteRecord();
-			} 
-		}); 
 }
 
 function addLaptop(serial_number,uid){
-	    
+    ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
     jQuery("#messageLoading").show();
 	
 	jQuery("#dialog-form").html("").css("display","none");
Index: controlies/trunk/applications/controlies/views/laptops/index.html
===================================================================
--- controlies/trunk/applications/controlies/views/laptops/index.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/laptops/index.html	(revision 437)
@@ -35,7 +35,6 @@
                 
     function print_grid(){  
           jQuery("#list").jqGrid({
-                //url:"/controlies/laptops/call/json/list",
                 url:"{{=URL(c='laptops',f='call',args=['json','list'])}}",
                 data: "{}",
                 datatype: 'json',
@@ -122,11 +121,13 @@
     }           
     
     function addRecord(){
-    
+    		ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+    		
             jQuery("#messageLoading").show();
         
             jQuery("#dialog-form").html("").css("display","none");
             jQuery("#dialog-form").load("form.html", function(data) {
+            	
 				getAllLaptopTypes();
 				            	
                 jQuery("#form_data #action").val("add");
@@ -148,6 +149,8 @@
     }
     
     function modifyRecord(){
+    		ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+    		
 			var id;
 
 			jQuery("#messageLoading").show();
@@ -157,8 +160,7 @@
 				return false;
 
 			jQuery("#dialog-form").html("").css("display","none");
-			jQuery("#dialog-form").load("form.html", function() {
-
+			jQuery("#dialog-form").load("form.html", function(data) {				
 				getAllLaptopTypes();
 
 				jQuery("#form_data #action").val("modify");
@@ -190,7 +192,8 @@
     }
     
     function deleteRecord(){
-        
+    		ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+    		
             var id = rowSelected();
             if(id==false)
                 return false;
@@ -215,6 +218,8 @@
     }
 
     function history(){
+    		ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+    		
 			var id;
 
 			jQuery("#messageLoading").show();
Index: controlies/trunk/applications/controlies/views/laptops/history.html
===================================================================
--- controlies/trunk/applications/controlies/views/laptops/history.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/laptops/history.html	(revision 437)
@@ -88,7 +88,7 @@
     }   
 
     function addRecordHistory(){
-    
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         jQuery("#messageLoading").show();
 		jQuery("#dialog-form-history").html("");
         jQuery("#dialog-form-history").html("").css("display","none");
@@ -115,6 +115,7 @@
     }
 	
     function modifyRecordHistory(){
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
 		var id;
 
 		jQuery("#messageLoading").show();
@@ -159,7 +160,7 @@
     }
 
     function deleteRecordHistory(){
-        
+    		ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
             var id = rowSelectedHistory();
             if(id==false)
                 return false;
Index: controlies/trunk/applications/controlies/views/laptops/form.html
===================================================================
--- controlies/trunk/applications/controlies/views/laptops/form.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/laptops/form.html	(revision 437)
@@ -14,7 +14,8 @@
     }
 
     function send(){
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+    	
         restartStyle();
         jQuery.post('call/json/modify', jQuery("#form_data").serialize(), function(result) {
             switch(result.response){
Index: controlies/trunk/applications/controlies/views/laptops/form_history.html
===================================================================
--- controlies/trunk/applications/controlies/views/laptops/form_history.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/laptops/form_history.html	(revision 437)
@@ -15,7 +15,7 @@
     }
 
     function sendHistory(){
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         restartStyle();
         jQuery.post('call/json/modifyHistory', jQuery("#form_data_history").serialize(), function(result) {
             switch(result.response){
@@ -43,6 +43,7 @@
     }
     
 	function getDataLDAP(){
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
 		jQuery.post('call/json/getDataLDAP', jQuery("#form_data_history").serialize(), function(result) {
 			jQuery("#form_data_history #name").val(result.response['name']);
 			jQuery("#form_data_history #nif").val(result.response['nif']);
@@ -69,6 +70,7 @@
 	}
 	
 	function showFields(){
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
 		hideAllFields();
 		switch(jQuery("#form_data_history #id_state").val()){
 			case '2':
Index: controlies/trunk/applications/controlies/views/layout_form_hosts.html
===================================================================
--- controlies/trunk/applications/controlies/views/layout_form_hosts.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/layout_form_hosts.html	(revision 437)
@@ -30,7 +30,7 @@
 
 
     function send(){
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         restartStyle();
 
 {{block controlador}}               
Index: controlies/trunk/applications/controlies/views/thinclients/index.html
===================================================================
--- controlies/trunk/applications/controlies/views/thinclients/index.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/thinclients/index.html	(revision 437)
@@ -118,7 +118,7 @@
     }           
     
     function addRecord(){
-    
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
             jQuery("#messageLoading").show();
         
             jQuery("#dialog-form").html("").css("display","none");
@@ -143,97 +143,99 @@
     }
     
     function modifyRecord(){    
-                    jQuery("#messageLoading").show();
-                    
-                    var name = rowSelected();
-                    if(name==false)
-                        return false;
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+        jQuery("#messageLoading").show();
+        
+        var name = rowSelected();
+        if(name==false)
+            return false;
+
+        jQuery("#dialog-form").html("").css("display","none");
+        jQuery("#dialog-form").load("form.html", function() {                        
+            
+            jQuery("#form_data #action").val("modify");
+            jQuery("#form_data #name").attr("readonly","true");
+            jQuery("#form_data #name").css("background-color","#DDD");
+            jQuery("#form_data #messageForm").html("Todos los campos son obligatorios");
+            
+            jQuery.post('call/json/getHostData',{ name: name }, function(result) {
+
+                jQuery("#form_data #name").val(result.response['cn']);
+                jQuery("#form_data #mac").val(result.response['mac']);       
+
+                x = (jQuery(window).width()-300)/2;
+                y = (jQuery(window).height()-500)/2;
+                
+                jQuery("#messageLoading").hide();
+                
+                jQuery("#dialog-form").dialog({
+                    resizable: false,
+                    modal: true,
+                    width: 300,
+                    title: "Modificar Cliente Ligero"
+                }).dialog('option', 'position', [x, y]);                        
+            });               
+        });
+    }
     
-                    jQuery("#dialog-form").html("").css("display","none");
-                    jQuery("#dialog-form").load("form.html", function() {                        
-                        
-                        jQuery("#form_data #action").val("modify");
-                        jQuery("#form_data #name").attr("readonly","true");
-                        jQuery("#form_data #name").css("background-color","#DDD");
-                        jQuery("#form_data #messageForm").html("Todos los campos son obligatorios");
-                        
-                        jQuery.post('call/json/getHostData',{ name: name }, function(result) {
+    function deleteRecord(){
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+        var name = rowSelected();
+        if(name==false)
+            return false;
     
-                            jQuery("#form_data #name").val(result.response['cn']);
-                            jQuery("#form_data #mac").val(result.response['mac']);       
-    
-                            x = (jQuery(window).width()-300)/2;
-                            y = (jQuery(window).height()-500)/2;
-                            
-                            jQuery("#messageLoading").hide();
-                            
-                            jQuery("#dialog-form").dialog({
-                                resizable: false,
-                                modal: true,
-                                width: 300,
-                                title: "Modificar Cliente Ligero"
-                            }).dialog('option', 'position', [x, y]);                        
-                        });               
+        jQuery( "#dialog-confirm" ).dialog({
+            resizable: false,
+            height:160,
+            width:350,
+            modal: true,
+            buttons: {
+                "Borrar": function() {
+                    jQuery.post("call/json/delete",{host:name}, function(data){
+                        jQuery("#dialog-confirm").dialog( "close" );
+                        jQuery("#list").trigger("reloadGrid");
                     });
-    }
-    
-    function deleteRecord(){
-        
-            var name = rowSelected();
-            if(name==false)
-                return false;
-        
-            jQuery( "#dialog-confirm" ).dialog({
-                resizable: false,
-                height:160,
-                width:350,
-                modal: true,
-                buttons: {
-                    "Borrar": function() {
-                        jQuery.post("call/json/delete",{host:name}, function(data){
-                            jQuery("#dialog-confirm").dialog( "close" );
-                            jQuery("#list").trigger("reloadGrid");
-                        });
-                    },
-                    "Cancelar": function() {
-                        $(this).dialog( "close" );
-                    }
+                },
+                "Cancelar": function() {
+                    $(this).dialog( "close" );
                 }
-            }).dialog('open');
+            }
+        }).dialog('open');
     }
 
     function moveRecord(){    
-                    jQuery("#messageLoading").show();
-                    
-                    var name = rowSelected();
-                    if(name==false)
-                        return false;
-    
-                    jQuery("#dialog-form").html("").css("display","none");
-                    jQuery("#dialog-form").load("form_move.html", function() {                        
-                        
-                        jQuery("#form_data #action").val("modify");
-                        jQuery("#form_data #name").attr("readonly","true");
-                        jQuery("#form_data #name").css("background-color","#DDD");
-                        jQuery("#form_data #messageForm").html("Con esta opción moveremos de aula un Cliente Ligero<br>Si en el destino ya hay otro cliente ligero, lo sobreescribirá<br>Todos los campos son obligatorios");
-                        
-                        jQuery.post('call/json/getHostData',{ name: name }, function(result) {
-    
-                            jQuery("#form_data #name").val(result.response['cn']);   
-    
-                            x = (jQuery(window).width()-350)/2;
-                            y = (jQuery(window).height()-500)/2;
-                            
-                            jQuery("#messageLoading").hide();
-                            
-                            jQuery("#dialog-form").dialog({
-                                resizable: false,
-                                modal: true,
-                                width: 350,
-                                title: "Mover Cliente Ligero"
-                            }).dialog('option', 'position', [x, y]);                        
-                        });               
-                    });
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
+        jQuery("#messageLoading").show();
+        
+        var name = rowSelected();
+        if(name==false)
+            return false;
+
+        jQuery("#dialog-form").html("").css("display","none");
+        jQuery("#dialog-form").load("form_move.html", function() {                        
+            
+            jQuery("#form_data #action").val("modify");
+            jQuery("#form_data #name").attr("readonly","true");
+            jQuery("#form_data #name").css("background-color","#DDD");
+            jQuery("#form_data #messageForm").html("Con esta opción moveremos de aula un Cliente Ligero<br>Si en el destino ya hay otro cliente ligero, lo sobreescribirá<br>Todos los campos son obligatorios");
+            
+            jQuery.post('call/json/getHostData',{ name: name }, function(result) {
+
+                jQuery("#form_data #name").val(result.response['cn']);   
+
+                x = (jQuery(window).width()-350)/2;
+                y = (jQuery(window).height()-500)/2;
+                
+                jQuery("#messageLoading").hide();
+                
+                jQuery("#dialog-form").dialog({
+                    resizable: false,
+                    modal: true,
+                    width: 350,
+                    title: "Mover Cliente Ligero"
+                }).dialog('option', 'position', [x, y]);                        
+            });               
+        });
     }
 
 </script>
Index: controlies/trunk/applications/controlies/views/thinclients/form_move.html
===================================================================
--- controlies/trunk/applications/controlies/views/thinclients/form_move.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/thinclients/form_move.html	(revision 437)
@@ -14,7 +14,7 @@
     }
 
     function send(){
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         restartStyle();
 
         jQuery.post('call/json/move', jQuery("#form_data").serialize(), function(result) {
Index: controlies/trunk/applications/controlies/views/thinclients/form.html
===================================================================
--- controlies/trunk/applications/controlies/views/thinclients/form.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/thinclients/form.html	(revision 437)
@@ -14,7 +14,7 @@
     }
 
     function send(){
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         restartStyle();
 
         jQuery.post('call/json/modify', jQuery("#form_data").serialize(), function(result) {
Index: controlies/trunk/applications/controlies/views/default/index.html
===================================================================
--- controlies/trunk/applications/controlies/views/default/index.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/default/index.html	(revision 437)
@@ -23,23 +23,11 @@
 
 <hr />
 
- 
-
-
-
-
-
-
-
-
-
-
-
 {{else:}}
 {{=BEAUTIFY(response._vars)}}
 {{pass}}
 
-<div id="fancyClock" style="margin-left:190px;"></div>
+<div id="fancyClock" style="float:center;"></div>
 
 {{block left_sidebar}}New Left Sidebar Content{{end}}
 {{block right_sidebar}}New Right Sidebar Content{{end}}
Index: controlies/trunk/applications/controlies/views/reports/laptops.html
===================================================================
--- controlies/trunk/applications/controlies/views/reports/laptops.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/reports/laptops.html	(revision 437)
@@ -27,6 +27,7 @@
     }
 	
 	function report(){
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
 		restartStyle();
 		jQuery.ajax({url:"report",data:jQuery("#form_authorization").serialize()})
 			.done(function ( data ){
@@ -48,6 +49,7 @@
 	}
 	
 	function showFields(){
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
 		hideAllFields();
 		switch(jQuery("#form_authorization #id_user_type").val()){
 			case '1':{ // Profesores
Index: controlies/trunk/applications/controlies/views/laptops_trademarks/form.html
===================================================================
--- controlies/trunk/applications/controlies/views/laptops_trademarks/form.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/laptops_trademarks/form.html	(revision 437)
@@ -14,7 +14,7 @@
     }
 
     function send(){
-
+    	ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         restartStyle();
         jQuery.post('call/json/modify', jQuery("#form_data").serialize(), function(result) {
             switch(result.response){
Index: controlies/trunk/applications/controlies/views/laptops_trademarks/index.html
===================================================================
--- controlies/trunk/applications/controlies/views/laptops_trademarks/index.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/laptops_trademarks/index.html	(revision 437)
@@ -110,7 +110,7 @@
     }           
     
     function addRecord(){
-    
+    		ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
             jQuery("#messageLoading").show();
         
             jQuery("#dialog-form").html("").css("display","none");
@@ -135,6 +135,7 @@
     }
     
     function modifyRecord(){
+    		ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
 			var id;
 
 			jQuery("#messageLoading").show();
@@ -171,7 +172,7 @@
     }
     
     function deleteRecord(){
-        
+    		ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
             var id = rowSelected();
             if(id==false)
                 return false;
Index: controlies/trunk/applications/controlies/views/layout_hosts.html
===================================================================
--- controlies/trunk/applications/controlies/views/layout_hosts.html	(revision 436)
+++ controlies/trunk/applications/controlies/views/layout_hosts.html	(revision 437)
@@ -101,7 +101,7 @@
     }        
                                      
 	function modifyRecord(){
-
+    ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
 		jQuery("#messageLoading").show();
 		
 		var hid = rowSelected();
@@ -142,7 +142,7 @@
 
 
     function addRecord(){
-    
+    ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         jQuery("#dialog-form").html("");
         jQuery("#dialog-form").load("form_ltspserver.html", function() {
             jQuery("#form_data #action").val("add");
@@ -164,7 +164,7 @@
 
     
 function deleteRecord(){
-    
+    ajax("{{=URL('default', 'login_status')}}", [], ':eval'); //Check session
         var cn = rowSelected();
         if(cn==false)
             return false;    
Index: controlies/trunk/applications/controlies/controllers/default.py
===================================================================
--- controlies/trunk/applications/controlies/controllers/default.py	(revision 436)
+++ controlies/trunk/applications/controlies/controllers/default.py	(revision 437)
@@ -59,6 +59,13 @@
     """
     return response.download(request,db)
 
+def login_status():
+    if not auth.user:
+        session.flash='Debe iniciar sesión'
+        return 'location.href = "%s"' % URL('default', 'index')
+    else:
+        return ''
+
 @auth.requires_login()
 def call():
     """
Index: controlies/trunk/applications/controlies/controllers/reports.py
===================================================================
--- controlies/trunk/applications/controlies/controllers/reports.py	(revision 436)
+++ controlies/trunk/applications/controlies/controllers/reports.py	(revision 437)
@@ -1,11 +1,15 @@
 # coding: latin1
 
 def laptops():
-    if not auth.user: redirect(URL(c='default'))
+    if not auth.user:
+        session.flash='Debe iniciar sesi�n'
+        redirect(URL(c='default',f='index'))
     return dict()
 
 def users():
-    if not auth.user: redirect(URL(c='default'))
+    if not auth.user:
+        session.flash='Debe iniciar sesi�n'
+        redirect(URL(c='default',f='index'))
     return dict()
 
 @service.json 
Index: controlies/trunk/applications/controlies/controllers/laptops.py
===================================================================
--- controlies/trunk/applications/controlies/controllers/laptops.py	(revision 436)
+++ controlies/trunk/applications/controlies/controllers/laptops.py	(revision 437)
@@ -121,7 +121,7 @@
     return dict()
 
 def form():
-    if not auth.user:        
+    if not auth.user:
         return "session_out"
     
     return dict()
