Holas,
 
Mas o menos como dice TheoriaX:    
Código Javascript
:
Ver originalfunction imagen(id_Img) { //recive id de imagen
    if(document.getElementById('fue_presionado1').value==0){    
        document.getElementById('fue_presionado1').value=1;
        idImagen=id_Img;
        document.getElementById("txtimagen").value= idImagen;
    }
}
        
function celda(id_td){ //recive id de celda
    if(document.getElementById('fue_presionado2').value==0){    
        document.getElementById('fue_presionado2').value=1;
        idCelda=id_td;
        document.getElementById("txtcelda").value=idCelda;
    }
}
  
Y en el HTML:    
Código HTML:
Ver original<td  id="celda1" onclick="celda(this.id)">     <img src="imagenes/blanco.jpg" id ="img_c3"/>         <input type="hidden" id="fue_presionado1" value="0" />  
    <img src="imagenes/0.JPG" id="imagen_1" onclick="imagen(this.id)"/>     <input type="hidden" id="fue_presionado2" value="0" /> 
  
Saludos
Gildus