function scorri_data(primo,secondo)
{
if (document.getElementById(primo).value.length == 2)
   {
    document.getElementById(secondo).focus();
   }
}

function reset_campo(nome,testo) {
valore = nome;
	if (document.getElementById(nome).value=='') 	{
			if (testo) {
				if (testo != '')
				{
				valore = testo;
				}
			}
		document.getElementById(nome).value=valore;
		document.getElementById(nome).className='grigio';
	}
}

function svuota_campo(nome,testo) {
valore = nome;
	if (testo) {
		if (testo != '') {
			valore = testo;
		}
	}
	if (document.getElementById(nome).value==valore) {
		document.getElementById(nome).className='';
		document.getElementById(nome).value='';	
	}
}

function str_min_max(str,min,max)
{
 if (max == 0)         
 { 
  return(str.length >= min); 
 } else {
  return((str.length >= min) && (str.length <= max));
 }
}
function check_search()
{
/* c = document.scheda.IDstato_band;
 if (c.value == "0")
 { 
 alert("Selezionare lo stato attuale della band");
 c.focus();
 return false;
 } */
 c = document.scheda.nome_band;
 if (!str_min_max(c.value,2,0))
 { 
 alert("Inserire il nome della band");
 c.focus();
 return false;
 } 
} 
