//------------------- apre ligth window
    function aprilight(urla,dw,dh){
        //alert('apre light window'+urla);
        myLightWindow.activateWindow({href: urla, title: '', author: '', caption: '', width:dw, height:dh });
    }
//------------------- is a numeric
function IsNumeric(sText)
{
   var ValidChars = "0123456789.,";
   var IsNumber=true;
   var Char;
    for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }
function show(idmovie){
   var stringa="idmovie#"+idmovie;
   ajax_post('aj_exec_movie','ajax_exec',stringa,0);
}
//-----------------------------------------------------------------------
function latosin_reload(){
   var stringa="";
   ajax_post('inc_php/latosin','center_l',stringa,0);
}
function user_login(){
   var email=document.getElementById('email_u').value;
   var pwd=document.getElementById('pwd_u').value.replace(/"/gi, "&quot;");
   var stringa="email#"+email+"#pwd#"+pwd;
   ajax_post('inc_php/aj_user_login','ajax_exec',stringa,0);
}
//-----------------------------------------------------------------------
function ope_login(){
   var email=document.getElementById('email_o').value;
   var pwd=document.getElementById('pwd_o').value.replace(/"/gi, "&quot;");
   var stringa="email#"+email+"#pwd#"+pwd;
   ajax_post('inc_php/aj_operatore_login','ajax_exec',stringa,0);
}
//-----------------------------------------------------------------------
function ope_directlogin(email,pwd){
   var stringa="email#"+email+"#pwd#"+pwd;
   ajax_post('inc_php/aj_operatore_login','ajax_exec',stringa,0);
}
//-----------------------------------------------------------------------
//-----------------------------
    function update_comuni(){
        var idprov=document.getElementById('prov').value;
        var stringa="idprov#"+idprov;
        ajax_post('inc_php/aj_updatecomuni','divcomuni',stringa,0);
    }
//-----------------------------
    function update_comuni_sel(idcom){
        var idprov=document.getElementById('prov').value;
        var stringa="idprov#"+idprov+"#idcom#"+idcom;
        ajax_post('inc_php/aj_updatecomuni','divcomuni',stringa,0);
    }    
    //-----------------------------
        function bordarosso(idobj){
        document.getElementById(idobj).style.border="2px solid #FF0000";
    }
    function bordagrigio(idobj){
        document.getElementById(idobj).style.borderLeft="2px solid #999";
        document.getElementById(idobj).style.borderTop="2px solid #999";
        document.getElementById(idobj).style.borderBottom="1px solid #999";
        document.getElementById(idobj).style.borderRight="1px solid #999";        
    }
