grazie x il suggerimento e x la spiegazione ma non saprei come modificare il codice esistente, puoi aiutarmi ? :

codice:
function validate(theform)

{
	var i=0,Q= theform.elements,L=Q.length;
	
	for (var a = 0; a < L; a++){
	
		var campo = Q[a];
		if( campo.value===''){
			campo.style.backgroundColor='orange';
			++i;
		}
		else campo.style.backgroundColor='';
	}
	
	if(i){
	
		alert('I campi segnalati sono obbligatorio in questo form.');
		return false;
	}

   
var re = new RegExp("^([0-9]{2}) : ([0-9]{2})$", "");

if (!theform.ORA.value.match(re))
    {
      alert("L\'\orario va inserito nel formato hh:mm !");
      theform.ORA.focus();
      theform.ORA.select();
      return(false);
    } 

     	
	return(true);
  
}