function Strip(string) {
   var s_str = string.length
   for (var i=0; i<string.length; i++) {
      if (" " != string.substring(i,i+1)) {
         s_str = i;
         break;
      }
   }
   if (s_str == string.length) {
      return "";
   }
   for (i=string.length-1; i>=0; i--) {
      if (" " != string.substring(i,i+1)) {
         var s_end = i;
         break;
      }
   }
   return string.substring(s_str,s_end+1);
}


function pausa(secondi) {
   var tempoattesa = setTimeout("location.href='index.asp'", secondi*1000)
}


function go(sel) {
         document.location.href=sel[sel.selectedIndex].value
}


// Funzione che apre una nuova finestra personalizzata
function popup(nomefile, larghezza, altezza, x, y) {
   win_popup = window.open(nomefile,"popup","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=" + larghezza + ",height=" + altezza); 
   if(x && y); {
     x = parseInt(x);
     y = parseInt(y);
     win_popup.moveTo(x, y);
  }
}
