// JavaScript Document 
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
<!-- begin script
function CambiaFont(net, ie) 
{
  if ((navigator.appVersion.substring(0,3) >= net && navigator.appName == 'Netscape' && net != -1) || (navigator.appVersion.substring(0,3) >= ie && navigator.appName.substring(0,9) == 'Microsoft' && ie != -1))
    return true;
else return false;
}
//  end script -->

<!-- begin script
function CambiaFont1(net, ie) 
{
  if ((navigator.appVersion.substring(0,3) >= net && navigator.appName == 'Netscape' && net != -1) || (navigator.appVersion.substring(0,3) >= ie && navigator.appName.substring(0,9) == 'Microsoft' && ie != -1))
    return true;
else return false;
}

<!-- 
var scrtxt="Benvenuti nel sito ufficiale di Maximum.....troverete curiosità professionali sul sottoscritto....news.....messaggi....siti interessanti da segnalare....insomma un po' di tutto!!! Buona navigazione e ricordatevi di passare ogni tanto!!!";
var lentxt=scrtxt.length;
var width=100;
var pos=1-width;

function scorrevole() {
  pos++;
  var scroller="";
  if (pos==lentxt) {
    pos=1-width;
  }
  if (pos<0) {
    for (var i=1; i<=Math.abs(pos); i++) {
      scroller=scroller+" ";}
    scroller=scroller+scrtxt.substring(0,width-i+1);
  }
  else {
    scroller=scroller+scrtxt.substring(pos,width+pos);
  }
  window.status = scroller;
  setTimeout("scorrevole()",170);
  }
//-->

<!--
function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' deve contenere un indirizzo E-mail valido.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' campo obbligatorio.\n'; }
  } if (errors) alert('Si sono verificati i seguenti errori:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->

// Per controllo del form di registrazione
function test() {

if (document.registrazione.email.value==""){
	alert("E' necessario specificare un indirizzo Email!!!")
	document.registrazione.email.focus();
	return false;	
}

if (document.registrazione.email.value == "" || (document.registrazione.email.value.indexOf("@",0) == -1 || document.registrazione.email.value.indexOf(".",0) == -1)) {
	alert("E' necessario specificare un indirizzo Email corretto!!!")
	document.registrazione.email.focus();
	return false;	
}

if (document.registrazione.user.value==""){
	alert("E' necessario specificare una username!!!")
	document.registrazione.user.focus();
	return false;	
}

if (document.registrazione.password.value==""){
	alert("E' necessario specificare una password!!!")
	document.registrazione.password.focus();
	return false;	
}
 
if (document.registrazione.data_nascita.value.length != 10) { 
alert('Inserire data in modo corretto GG/MM/AAAA'); 
document.registrazione.data_nascita.focus();
return false; 
} 
else if (document.registrazione.data_nascita.value.substring(2,3) != '/' || document.registrazione.data_nascita.value.substring(5,6) != '/' || isNaN(document.registrazione.data_nascita.value.substring(0,2)) || isNaN(document.registrazione.data_nascita.value.substring(3,5)) || isNaN(document.registrazione.data_nascita.value.substring(6,10))) { 
alert('Inserire data in modo corretto GG/MM/AAAA'); 
document.registrazione.data_nascita.focus();
return false; 
} 
else if (document.registrazione.data_nascita.value.substring(0,2) > 31) { 
alert('Inserire un valore corretto per i giorni'); 
document.registrazione.data_nascita.focus();
return false; 
} 
else if (document.registrazione.data_nascita.value.substring(3,5) > 12) { 
alert('Inserire un valore corretto per i mesi'); 
document.registrazione.data_nascita.focus();
return false; 
}
document.registrazione.action = "confregistrazione.asp";
document.registrazione.target = "_self";
return true;
}

//controllo che vengano inserite solamente lettere e numeri sul campo(registrazione --> password)
function check(str) {
 var valore=Trim(str.value);
 var negati='|"£$%&/()=?^é*ç°§;:_><\\è+òàù,.-\'';
 for (i=0; i<valore.length; i++)
  for (j=0; j<negati.length; j++)
   if (valore.charAt(i)==negati.charAt(j)) {
       alert('Non puoi inserire questi caratteri: |"£$%&/()=?^é*ç°§;:_><\\è+òàù,.-\'');
       return false;
   }
 return true;
}

//controllo che vengano inserite solamente lettere, numeri, punti, underscorre, maggiore, minore e trattino sul campo (registrazione --> username)
function check5(str) {
 var valore=Trim(str.value);
 var negati='|"£$%&/()=?^é*ç°§;:\\è+òàù,\'';
 for (i=0; i<valore.length; i++)
  for (j=0; j<negati.length; j++)
   if (valore.charAt(i)==negati.charAt(j)) {
       alert('Non puoi inserire questi caratteri: |"£$%&/()=?^é*ç°§;:\\è+òàù,\'');
       return false;
   }
 return true;
}

//controllo che vengano inserite solamente lettere, numeri, punti, underscorre, maggiore, minore e trattino sul campo (login --> username)
function check6(str) {
 var valore=Trim(str.value);
 var negati='|"£$%&/()=?^é*ç°§;:\\è+òàù,\'';
 for (i=0; i<valore.length; i++)
  for (j=0; j<negati.length; j++)
   if (valore.charAt(i)==negati.charAt(j)) {
       alert('Non puoi inserire questi caratteri: |"£$%&/()=?^é*ç°§;:\\è+òàù,\'');
       return false;
   }
 return true;
}

//controllo che vengano inserite solamente lettere e numeri sul campo(login --> password)
function check7(str) {
 var valore=Trim(str.value);
 var negati='|"£$%&/()=?^é*ç°§;:_><\\è+òàù,.-\'';
 for (i=0; i<valore.length; i++)
  for (j=0; j<negati.length; j++)
   if (valore.charAt(i)==negati.charAt(j)) {
       alert('Non puoi inserire questi caratteri: |"£$%&/()=?^é*ç°§;:_><\\è+òàù,.-\'');
       return false;
   }
 return true;
}

//controllo che vengano inserite solamente lettere e numeri sul campo (modifica password)
function check3(str) {
 var valore=Trim(str.value);
 var negati='|"£$%&/()=?^é*ç°§;:_><\\è+òàù,.-\'';
 for (i=0; i<valore.length; i++)
  for (j=0; j<negati.length; j++)
   if (valore.charAt(i)==negati.charAt(j)) {
       alert('Non puoi inserire questi caratteri: |"£$%&/()=?^é*ç°§;:_><\\è+òàù,.-\'');
       return false;
   }
 return true;
}

//controllo che vengano inserite solamente lettere e numeri sul campo (per la login di amministrazione)
function check4(str) {
 var valore=Trim(str.value);
 var negati='|"£$%&/()=?^é*ç°§;:_><\\è+òàù,.-';
 for (i=0; i<valore.length; i++)
  for (j=0; j<negati.length; j++)
   if (valore.charAt(i)==negati.charAt(j)) {
       alert('Non puoi inserire questi caratteri: |"£$%&/()=?^é*ç°§;:_><\\è+òàù,.-');
       return false;
   }
 return true;
}

//controllo che vengano inserite solamente lettere, numeri, punti, underscorre, maggiore, minore e trattino sul campo (recupera password --> username)
function check8(str) {
 var valore=Trim(str.value);
 var negati='|"£$%&/()=?^é*ç°§;:\\è+òàù,\'';
 for (i=0; i<valore.length; i++)
  for (j=0; j<negati.length; j++)
   if (valore.charAt(i)==negati.charAt(j)) {
       alert('Non puoi inserire questi caratteri: |"£$%&/()=?^é*ç°§;:\\è+òàù,\'');
       return false;
   }
 return true;
}

//controllo che vengano inserite solamente lettere e numeri sul campo (recupera password --> password)
function check9(str) {
 var valore=Trim(str.value);
 var negati='|"£$%&/()=?^é*ç°§;:_><\\è+òàù,.-\'';
 for (i=0; i<valore.length; i++)
  for (j=0; j<negati.length; j++)
   if (valore.charAt(i)==negati.charAt(j)) {
       alert('Non puoi inserire questi caratteri: |"£$%&/()=?^é*ç°§;:_><\\è+òàù,.-\'');
       return false;
   }
 return true;
}

function checkmail(str) {
 var valore=Trim(str.value);
 var negati='|"£$%&/()=?^é*ç°§;:_><\\è+òàù,-\'';
 for (i=0; i<valore.length; i++)
  for (j=0; j<negati.length; j++)
   if (valore.charAt(i)==negati.charAt(j)) {
       alert('Non puoi inserire questi caratteri: |"£$%&/()=?^é*ç°§;:_><\\è+òàù,-\'');
       return false;
   }
 return true;
}

//controllo che vengano inserite solamente lettere sul campo (modifica profilo --> città)
function check10(str) {
 var valore=Trim(str.value);
 var negati='|/"£$%&()=?^é*ç°§;:_><\\è+òàù,.-\'1234567890';
 for (i=0; i<valore.length; i++)
  for (j=0; j<negati.length; j++)
   if (valore.charAt(i)==negati.charAt(j)) {
       alert('Non puoi inserire questi caratteri: |/"£$%&()=?^é*ç°§;:_><\\è+òàù,.-\'1234567890');
       return false;
   }
 return true;
}

//la login
function testLogin(){
//per la username
if (document.login.username.value == '') { 
	alert('Inserire la Username!!!'); 
	document.login.username.focus();
	return false; 
} 
//per la password
if (document.login.password.value == '') { 
	alert('Inserire la Password!!!'); 
	document.login.password.focus();
	return false; 
}
document.login.action = "index.asp"; 
document.login.target = "_self";
return true; 
} 

//la login di amministrazione
function testLoginAdmin(){
//per la username
if (document.loginadmin.username.value == '') { 
	alert('Inserire la Username!!!'); 
	document.loginadmin.username.focus();
	return false; 
} 
//per la password
if (document.loginadmin.password.value == '') { 
	alert('Inserire la Password!!!'); 
	document.loginadmin.password.focus();
	return false; 
}
document.loginadmin.action = "verifica.asp"; 
document.loginadmin.target = "_self";
return true; 
} 

//verifica inserimento news
function testInsNews(flag_ins){
if (document.insnews.titolo.value == '') { 
	alert('Inserire il Titolo!!!'); 
	document.insnews.titolo.focus();
	return false; 
} 
if (document.insnews.notizia.value == '') { 
	alert('Inserire la Notizia!!!'); 
	document.insnews.notizia.focus();
	return false; 
}
document.insnews.action = "insnews.asp?flag_ins="+flag_ins; 
document.insnews.target = "_self";
return true; 
} 

//verifica modifica news
function testModNews(idModNews){
if (document.modnews.titolo.value == '') { 
	alert('Inserire il Titolo!!!'); 
	document.modnews.titolo.focus();
	return false; 
} 
if (document.modnews.notizia.value == '') { 
	alert('Inserire la Notizia!!!'); 
	document.modnews.notizia.focus();
	return false; 
}
document.modnews.action = "confmodnews.asp?idNews="+idModNews; 
document.modnews.target = "_self";
return true; 
} 

//verifica risposta news
function testRispNews(){
if (document.rispnews.rispnotizia.value == '') { 
	alert('Inserire la Notizia!!!'); 
	document.rispnews.rispnotizia.focus();
	return false; 
}
document.rispnews.action = "confrispnews.asp"; 
document.rispnews.target = "_self";
return true; 
} 

//verifica inserimento bacheca
function testInsBacheca(flag_ins){
if (document.insbacheca.titolo.value == '') { 
	alert('Inserire il Titolo!!!'); 
	document.insbacheca.titolo.focus();
	return false; 
} 
if (document.insbacheca.messaggio.value == '') { 
	alert('Inserire il Messaggio!!!'); 
	document.insbacheca.messaggio.focus();
	return false; 
}
document.insbacheca.action = "insbacheca.asp?flag_ins="+flag_ins; 
document.insbacheca.target = "_self";
return true; 
} 

//verifica modifica bacheca
function testModBacheca(idModBacheca){
if (document.modbacheca.titolo.value == '') { 
	alert('Inserire il Titolo!!!'); 
	document.modbacheca.titolo.focus();
	return false; 
} 
if (document.modbacheca.messaggio.value == '') { 
	alert('Inserire il Messaggio!!!'); 
	document.modbacheca.messaggio.focus();
	return false; 
}
document.modbacheca.action = "confmodbacheca.asp?idBacheca="+idModBacheca; 
document.modbacheca.target = "_self";
return true; 
} 

//verifica risposta bacheca
function testRispBacheca(){
if (document.rispbacheca.rispmessaggio.value == '') { 
	alert('Inserire il Messaggio!!!'); 
	document.rispbacheca.rispmessaggio.focus();
	return false; 
}
document.rispbacheca.action = "confrispbacheca.asp"; 
document.rispbacheca.target = "_self";
return true; 
} 
 
//per visualizzare i siti non presenti sulla home
function apriSiti() {
   var w = 310;
   var h = 291;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
      window.open("altrisiti.asp","","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
 }
 
//per visualizzare le risposte ad una specifica news
function risposteNews(idPerPopupNews){
window.open("rispostenews.asp?idpopupnews="+idPerPopupNews,"name"," toolbar=no,directories=no,menubar=no,width=480,height=400,top=100,left=150,resizable=no,scrollbars=yes");
} 

//per visualizzare le risposte ad uno specifico messaggio 
function risposteMsg(idPerPopupBacheca){
window.open("rispostebacheca.asp?idpopupbacheca="+idPerPopupBacheca,"name"," toolbar=no,directories=no,menubar=no,width=480,height=400,top=100,left=150,resizable=no,scrollbars=yes");
}

//per visualizzare i compleanni utenti
function compleanno(){
window.open("compleanno.asp","name"," toolbar=no,directories=no,menubar=no,width=300,height=200,top=100,left=150,resizable=no,scrollbars=no");
} 

//verifica obbligatorietà siti segnalati
function testConfSegnalaWeb(){
if (document.segnalaweb.sitoweb.value == '') { 
	alert('Inserire la descrizione del Sito!!!'); 
	document.segnalaweb.sitoweb.focus();
	return false; 
}
if (document.segnalaweb.linkweb.value == '') { 
	alert('Inserire il link al Sito!!!'); 
	document.segnalaweb.linkweb.focus();
	return false; 
}
document.segnalaweb.action = "confsegnalaweb.asp"; 
document.segnalaweb.target = "_self";
return true; 
} 	

//per il recupero della password
function testRecPassword(){
if (document.recpassword.user.value == '') { 
	alert('Inserire la Username!!!'); 
	document.recpassword.user.focus();
	return false; 
}
if (document.recpassword.email.value == '') { 
	alert('Inserire Email!!!'); 
	document.recpassword.email.focus();
	return false; 
}
if (document.recpassword.email.value == "" || (document.recpassword.email.value.indexOf("@",0) == -1 || document.recpassword.email.value.indexOf(".",0) == -1)) {
	alert("E' necessario specificare un indirizzo Email corretto!!!")
	document.recpassword.email.focus();
	return false;	
}
document.recpassword.action = "recpassword.asp"; 
document.recpassword.target = "_self";
return true; 
} 	

//per la modifica profilo
function testModProfilo(idUtente){
if (document.modprofilo.email.value==""){
	alert("E' necessario specificare un indirizzo Email!!!")
	document.modprofilo.email.focus();
	return false;	
}
if (document.modprofilo.email.value == "" || (document.modprofilo.email.value.indexOf("@",0) == -1 || document.modprofilo.email.value.indexOf(".",0) == -1)) {
	alert("E' necessario specificare un indirizzo Email corretto!!!")
	document.modprofilo.email.focus();
	return false;	
}
document.modprofilo.action = "confmodprofilo.asp?idUtente="+idUtente; 
document.modprofilo.target = "_self";
return true; 
} 	

//controllo che vengano inserite solamente lettere, numeri punti, due punti e doppio slash sul campo 
//(segnala un sito)
function check2(str) {
 var valore=Trim(str.value);
 var negati='|"£$%&()=?^é*ç°§;_><\\è+òàù,-\'';
 for (i=0; i<valore.length; i++)
  for (j=0; j<negati.length; j++)
   if (valore.charAt(i)==negati.charAt(j)) {
       alert('Non puoi inserire questi caratteri: |"£$%&()=?^é*ç°§;_><\\è+òàù,-\'');
       return false;
   }
 return true;
}

//per aprire la finestra delle faccine
function popupSmilie(nomeForm, nomeText) {
   var w = 310;
   var h = 200;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
      window.open("faccine.asp?nomeForm="+nomeForm+"&nomeText="+nomeText,"","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
 }

//per inserire le faccine nel box dei messaggi
function smilie(thesmilie, NomeForm, NomeText) {
	eval("opener.window.document."+NomeForm+"."+NomeText+".value+=' '+'"+thesmilie+"'+' ';");
	eval("opener.window.document."+NomeForm+"."+NomeText+".focus();"); 
	return false;
}

// --------------------------------------------------------------------------
// Rimuove gli spazi iniziali dalla nostra stringa
// --------------------------------------------------------------------------
function LTrim(str)
{
  var whitespace = new String(" \t\n\r");

  var s = new String(str);

  if (whitespace.indexOf(s.charAt(0)) != -1) {
    // We have a string with leading blank(s)...

    var j=0, i = s.length;

    // Iterate from the far left of string until we
    // don't have any more whitespace...
    while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
    j++;


    // Get the substring from the first non-whitespace
    // character to the end of the string...
    s = s.substring(j, i);
  }

  return s;
}

// --------------------------------------------------------------------------
// Rimuove gli spazi finali dalla nostra stringa
// --------------------------------------------------------------------------
function RTrim(str)
{
  var whitespace = new String(" \t\n\r");

  var s = new String(str);

  if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
    // We have a string with trailing blank(s)...

    var i = s.length - 1;       // Get length of string

    // Iterate from the far right of string until we
    // don't have any more whitespace...
    while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
      i--;

    // Get the substring from the front of the string to
    // where the last non-whitespace character is...
    s = s.substring(0, i+1);
  }

  return s;
}

// --------------------------------------------------------------------------
// Rimuove gli spazi iniziali e finali dalla nostra stringa
// --------------------------------------------------------------------------
function Trim(str)
{
  return RTrim(LTrim(str));
}

//Controllo caratteri massimi nella textarea di inserimento nuovo messaggio in bacheca
function countCharsInsBacheca(d)
{ 
if (document.insbacheca.messaggio.value.length> 8000) { 
alert('Il limite massimo di caratteri è 8000'); 
document.insbacheca.messaggio.value = oldString; 
} 

else { 
document.insbacheca.rimanenti.value = 8000 - document.insbacheca.messaggio.value.length; 
oldString = document.insbacheca.messaggio.value.substring(0,8000); 
}}
// --> 

//Controllo caratteri massimi nella textarea di inserimento nuova news
function countCharsInsNews(d)
{ 
if (document.insnews.notizia.value.length> 8000) { 
alert('Il limite massimo di caratteri è 8000'); 
document.insnews.notizia.value = oldString; 
} 

else { 
document.insnews.rimanenti.value = 8000 - document.insnews.notizia.value.length; 
oldString = document.insnews.notizia.value.substring(0,8000); 
}}
// --> 

//Controllo caratteri massimi nella textarea di modifica bacheca
function countCharsModBacheca(d)
{ 
if (document.modbacheca.messaggio.value.length> 8000) { 
alert('Il limite massimo di caratteri è 8000'); 
document.insbacheca.messaggio.value = oldString; 
} 

else { 
document.modbacheca.rimanenti.value = 8000 - document.modbacheca.messaggio.value.length; 
oldString = document.modbacheca.messaggio.value.substring(0,8000); 
}}
// -->

//Controllo caratteri massimi nella textarea di modifica news
function countCharsModNews(d)
{ 
if (document.modnews.notizia.value.length> 8000) { 
alert('Il limite massimo di caratteri è 8000'); 
document.modnews.notizia.value = oldString; 
} 

else { 
document.modnews.rimanenti.value = 8000 - document.modnews.notizia.value.length; 
oldString = document.modnews.notizia.value.substring(0,8000); 
}}
// -->

//Controllo caratteri massimi nella textarea di risposta news
function countCharsRispNews(d)
{ 
if (document.rispnews.rispnotizia.value.length> 8000) { 
alert('Il limite massimo di caratteri è 8000'); 
document.rispnews.rispnotizia.value = oldString; 
} 

else { 
document.rispnews.rimanenti.value = 8000 - document.rispnews.rispnotizia.value.length; 
oldString = document.rispnews.rispnotizia.value.substring(0,8000); 
}}
// -->

//Controllo caratteri massimi nella textarea di risposta bacheca
function countCharsRispBacheca(d)
{ 
if (document.rispbacheca.rispmessaggio.value.length> 8000) { 
alert('Il limite massimo di caratteri è 8000'); 
document.rispbacheca.rispmessaggio.value = oldString; 
} 

else { 
document.rispbacheca.rimanenti.value = 8000 - document.rispbacheca.rispmessaggio.value.length; 
oldString = document.rispbacheca.rispmessaggio.value.substring(0,8000); 
}}
// -->

//Controllo caratteri massimi nella textarea di modifica risposta news
function countCharsModRispNews(d)
{ 
if (document.modrispnews.rispnotizia.value.length> 8000) { 
alert('Il limite massimo di caratteri è 8000'); 
document.modrispnews.rispnotizia.value = oldString; 
} 

else { 
document.modrispnews.rimanenti.value = 8000 - document.modrispnews.rispnotizia.value.length; 
oldString = document.modrispnews.rispnotizia.value.substring(0,8000); 
}}
// -->

//Controllo caratteri massimi nella textarea di modifica risposta bacheca
function countCharsModRispBacheca(d)
{ 
if (document.modrispbacheca.rispmessaggio.value.length> 8000) { 
alert('Il limite massimo di caratteri è 8000'); 
document.modrispbacheca.rispmessaggio.value = oldString; 
} 

else { 
document.modrispbacheca.rimanenti.value = 8000 - document.modrispbacheca.rispmessaggio.value.length; 
oldString = document.modrispbacheca.rispmessaggio.value.substring(0,8000); 
}}
// -->

//per selezionare tutte le checkbox dei siti web
<!--
function CheckAllWeb() {
for (var i=0;i<document.web.elements.length;i++) {
var e = document.web.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox')) {
e.checked = document.web.allbox.checked;
}
}
}

//per selezionare tutte le checkbox relative allo spostamento della news
<!--
function CheckAllSpostaNews(){
for (var i=0;i<document.sposta_news.elements.length;i++) {
var e = document.sposta_news.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox')) {
e.checked = document.sposta_news.allboxNews.checked;
}
}
}

//per selezionare tutte le checkbox relative allo spostamento del messaggio
<!--
function CheckAllSpostaBacheca(){
for (var i=0;i<document.sposta_bacheca.elements.length;i++) {
var e = document.sposta_bacheca.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox')) {
e.checked = document.sposta_bacheca.allboxBacheca.checked;
}
}
}

//per selezionare tutte le checkbox degli utenti
<!--
function CheckAllUtenti() {
for (var i=0;i<document.utenti.elements.length;i++) {
var e = document.utenti.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox')) {
e.checked = document.utenti.allbox.checked;
}
}
}

//per selezionare tutte le checkbox delle news
<!--
function CheckAllNews() {
for (var i=0;i<document.news.elements.length;i++) {
var e = document.news.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox')) {
e.checked = document.news.allbox.checked;
}
}
}

//per selezionare tutte le checkbox della bacheca
<!--
function CheckAllBacheca() {
for (var i=0;i<document.messaggi.elements.length;i++) {
var e = document.messaggi.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox')) {
e.checked = document.messaggi.allbox.checked;
}
}
}

//per selezionare tutte le checkbox delle risposte di uno dei messaggi in bacheca
<!--
function CheckAllRispBacheca() {
for (var i=0;i<document.risposta_messaggi.elements.length;i++) {
var e = document.risposta_messaggi.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox')) {
e.checked = document.risposta_messaggi.allbox.checked;
}
}
}

//per selezionare tutte le checkbox delle risposte di una delle news nell'apposita sezione
<!--
function CheckAllRispNews() {
for (var i=0;i<document.risposta_news.elements.length;i++) {
var e = document.risposta_news.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox')) {
e.checked = document.risposta_news.allbox.checked;
}
}
}

//per visualizzare i risultati del sondaggio
function risultati() {
   var w = 180;
   var h = 180;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
      window.open("risultati.asp","","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
 }