
var maxchars=255;

function CheckLength()
  {
  with (document.modulo)
    {
    chars=testo_sms.value
    if (chars.length > maxchars)
      {
      testo_sms.value=chars.substr(0,maxchars);
      testo_sms.blur();
      }
    chr.value=maxchars-testo_sms.value.length;
    }
  }



gg = new Array("Dom","Lun","Mar","Mer","Gio","Ven","Sab");
mese = new Array("Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic");
function visua() 
{ 
var ora = new Date();
var aa = ora.getDate();
var mm = ora.getMonth();
var yy = ora.getYear();
var oo = ora.getHours();
var mn = ora.getMinutes();
var sec = ora.getSeconds();
var dd = ora.getDay();
var aa2 = ((aa < 10) ? "0" : "");
var mm2 = ((mm < 10) ? ".0" : ".");
var oo2 = ((oo < 10) ? "0" : "");
var mn2 = ((mn < 10) ? ":0" : ":");
var sec2 = ((sec < 10) ? ":0" : ":");
var Data = aa2 + aa + mm2 + mm + "." + yy;
var hh = oo2 + oo + mn2 + mn + sec2 + sec;
if(document.all){
document.all.orario.innerHTML =  gg[dd] + " " + ora.getDate() + " " + mese[mm] + " " + " ore: " + hh;
}
else if(document.getElementById){
document.getElementById('orario').innerHTML = gg[dd] + " ore: " + hh;
}
window.setTimeout("visua()",1000);
}

  var stile = "top=10, left=10, width=400, height=260, status=no, menubar=no, toolbar=no scrollbar=yes";
     function Popup_Chat(apri) {
        window.open(apri, "", stile);
     }



  var stile3 = "top=10, left=10, width=420, height=217, status=no, menubar=no, toolbar=no scrollbar=no";
     function inviasms(id) {
     
        window.open(id, "", stile3);
     }

  var stile2 = "top=10, left=10, width=160, height=100, status=no, menubar=no, toolbar=no scrollbar=no";
   function stat(id2) {
     
        window.open(id2, "", stile2);
     }

function popup(link) 
{ 
window.open(link,'NomePopup','resizable=no,width=194,height=137') 
} 
