Get ID of randomly generated element

Get ID of randomly generated element

I have a very basic understanding of coding. I'm using a program called SpreadsheetWEB to make web form calculators. It has a function that allows you to use Javascript to modify things you've created using their software. Long story short, they've changed their software rendering my custom function useless. I inserted my custom code into the "Page Onload" portion of their program as follows:

    <script language="javaScript">
    {
    document.getElementById('btn_Next').style.opacity=0;
    document.getElementById('btn_Next').style.filter='alpha(opacity=0)';
    document.getElementById('btn_Next').click();
    }
    </script>

This worked perfectly when the button itself was statically named btn_Next. However, the newest version of their software is now dynamically generating the ID for the button. Therefore, I need to modify my code to get the randomly generated button ID so that I can perform the above functions on it.

I know this is all goofy, but it's what my company is insisting that we work with, so there's no good way to dig deep on any of the code to build this correctly. If it's at all helpful, here's the output of the new button based on the below code:

    <span id="ccid_FormOutputéC1288éV1289éc1323" class="VSJS_InputBase" style="position: absolute; width: 82px; height: 19px; left: 0px; top: 27px; line-height: normal; z-index: 3;">
   
    <a id="FormOutputéC1288éV1289éc1323" class="VSJS_JButton" type="BUTTON" style="width: 80px; height: 17px; position: absolute; left: 0px; top: 0px; display: block; cursor: pointer; background: -moz-linear-gradient(center top , rgb(221, 221, 221), rgb(187, 187, 187)) repeat scroll 0% 0% transparent; overflow: hidden; text-align: center;">
   
    <span style="position: absolute; left: 7px; top: 1px; width: 70px; border: medium none; -moz-user-select: none;">Next</span>

The value after the "a id=" I believe is the ID of the button, as it changes every time, and when I inspect with Firebug, it points to the above cluster.

I tried to getElements by class and by type, but this didn't work for me. I'm sure it's because there are multiple similar elements.

Thank you in advance for your time assisting me with this issue I am having.