Adding mouseover elements to div

Adding mouseover elements to div

I am after adding a mouseover (and mouseout) to a div tag, however this mouseover and mouseout will require an element id passing to it to work. Currently the tag is

<DIV class="mc-c" onMouseOver='document.getElementById("ID1").className="mc-h-on"' onMouseOut='document.getElementById("ID1").className="mc-h-off"'><DIV id="ID1"></DIV></DIV>


but the tag will soon become

<DIV class="mc-c"><DIV id="ID1"></DIV></DIV>[/


The ID1 is generated when rendering the HTML and there may be multiple of these tags (each with a different ID#).

I would like to add the same functionality as the first bit of code to the second, does anyknow know of this. I have been able to add mouse overs to DIV's already, however passing a variable to it I am struggling with. Many thanks in advance.