Q:

Change text color on mouseover caption

I'm trying to set up a page where there will be several titles in a row, with a descriptive paragraph below. When the user scrolls over the titles, the paragraph will change corresponding to the title they are hovering over. I would like each title to be a different color, and the font color of the paragraph should change to match the title's color. The problem I'm having is getting the paragraph's color to change.
Here's my example: 
<script type="text/javascript">
function onover(caption)
{document.getElementById('text').innerHTML=caption;}
{document.getElementById('text2').innerHTML=caption;}
</script>

<a onmouseover="onover('Paragraph 1')" style="color:green">Title 1</a>
<a onmouseover="onover('Paragraph 2')" style="color:red">Title 2</a>
</br>
<div id="text" style="color:green">Paragraph 1</div>
<div id="text2" style="color:red"></div>

A:

Updated Since OP wanted to replace the text,   
<script type="text/javascript">
       function onover(caption,color) {
          document.getElementById('text').innerHTML=caption;
          document.getElementById('text').style.color=color;
          document.getElementById('text2').style.color=color;
   } 
</script>

<a onmouseover="onover('Paragraph 1','green')" style="color:green" id='one'>Title 1</a>
<a onmouseover="onover('Paragraph 2','red')" style="color:red">Title 2</a>
</br>
<div id="text" style="color:green">Paragraph 1</div>

Demo
Update 2

