Hola tom2000.
Prueba asi:
Código PHP:
<html>
<head>
<script language="JavaScript">
function funcion(){
var i;
var msg = "Debes rellenar al menos un campo";
var todosVacios = true;
for (i = 0; i < 7; i++)
todosVacios = todosVacios && (document.form1.elements[i].value == "");
if (todosVacios)
alert(msg);
else
document.form1.submit();
}
</script>
</head>
<body>
<form name="form1">
<input type="text" name="el0"><br>
<input type="text" name="el1"><br>
<input type="text" name="el2"><br>
<input type="text" name="el3"><br>
<input type="text" name="el4"><br>
<input type="text" name="el5"><br>
<input type="text" name="el6"><br>
<input type="button" name="btn" value="Enviar" onclick="funcion()">
</form>
</body>
</html>
Saludos.
NOTA: Matdor, tienes razón, lo que apuntas es un error