Y si , bien no esta
por que haces esto 
echo "<script language='javascript' type='text/javascript'>\n"; 
    echo "function validar(){\n"; 
    echo "var email = document.getElementByName("email").value;\n"; 
    echo "var telefono = document.getElementByName("telefono").value;\n"; 
    echo "if(email="" && telefono="")\n"; 
    echo "{\n"; 
    echo "alert('Por favor introduzca su email o teléfono para que podamos contestar su solicitud. Muchas gracias');\n";
     echo "return false;\n"; 
    echo "}\n"; 
    echo "}\n";   
    echo "</script>\n"; 
no hace falta que la pases por php. y la script tambien esta mal
simplemente la pones dentro del head 
Tenes muchos otros errores, compará   
Código HTML:
Ver original- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
- <html xmlns="http://www.w3.org/1999/xhtml"> 
- <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
-   
- <script type="text/javascript"> 
- //<![CDATA[ 
- function validar(){ 
- var email = document.getElementById("email").value; 
- var telefono = document.getElementById("telefono").value;  
- if((email == "")||(telefono == "")){ 
- alert('Ingrese su Email y su teléfono'); 
- return false; 
- } 
- } 
- //]]> 
- <form action="email.php" onsubmit="return validar();"> 
- <input type="text" name="email" id="email" /><br /> 
- <input type="text" name="telefono" id="telefono" /> 
Saludos