Buenas a todos.

Código Javascript :

document.getElementById('otrasnoticias').innerHTML+="<a id='onews<?php echo $i ?>' href='#'><?php echo $titulo ?></a><br>";
      $("#onews<?php echo $i;?>").click(function(){
         $("#contenido").html("<?php echo $contenido ?>");
         $("#titulo").html("<?php echo $titulo ?>");
         $("#fecha").html(" <?php echo $fecha ?>");
         $("#irNoticia").attr("href", "http://www.talpagina.es/ficha.asp?fec=1&ord=1&pag=<?php echo $i+1 ?>");
         document.getElementById('punto').scrollIntoView(true);
         });


Esto me genera:

Código HTML :

<div id="otrasnoticias">
Noticias que no han sido mapeadas:
<br>
<a id="onews0" href="#">PRESENTACIÓN VIDEO PROMOCIONAL DE LA AXARQUÍA EN LA FERIA INTERNACIONAL DE TURISMO</a>
<br>
<a id="onews1" href="#">COMUNICADO DE PRENSA</a>
<br>
<a id="onews3" href="#">MI SANTA MAMI</a>
<br>
<a id="onews8" href="#">MI SANTA MAMI NOSEANDE</a>
<br>
</div>

Código Javascript :

      $("#onews3").click(function(){
         $("#contenido").html("MI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMIMI SANTA MAMI");
         $("#titulo").html("MI SANTA MAMI");
         $("#fecha").html(" 11/11/2011");
         $("#irNoticia").attr("href", "http://www.talpagina.es/ficha.asp?fec=1&ord=1&pag=4");
         document.getElementById('punto').scrollIntoView(true);
         });
$("#onews1").click(function(){
         $("#contenido").html("LAMADRE QUE ME PARIO>");
         $("#titulo").html("COMUNICADO");
         $("#fecha").html(" 15/02/2012");
         $("#irNoticia").attr("href", "http://www.talpagina.es/ficha.asp?fec=1&ord=1&pag=2");
         document.getElementById('punto').scrollIntoView(true);
         });


Y sólo me funciona el ultimo, si meto 3, el 2do (que ahora es el último) deja de funcionar.

A ver si veis el fallo por que me esta volviendo loco, gracias y saludos.