Need help converting a table

Need help converting a table

This may not look long but I promise this is not for the lighthearted  

I have the following table I am trying to modify via jquery...

  1. <table id="mtable" cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:collapse;">
        <tbody><tr>
            <td>
            <span id="mspan" class="merror"></span>
            <table width="100%">
            <tbody><tr>
                <td nowrap="nowrap">User name:</td>
                <td width="100%"><input name="mname" type="text" id="mname" autocomplete="off" class="ms-inputuserfield" style="width:99%;"></td>
            </tr>
            <tr>
                <td nowrap="nowrap">Password:</td>
                <td width="100%"><input name="mpassword" type="password" id="mpassword" autocomplete="off" class="ms-inputuserfield" style="width:99%;"></td>
            </tr>
            <tr>
                <td colspan="2" align="right"><input type="submit" name="mlogin" value="Sign In" id="mlogin"></td>
            </tr>
            <tr>
                <td colspan="2"><input id="mremember" type="checkbox" name="mremember"><label for="mremember">Sign me in automatically</label></td>
            </tr>
            <tr>
                <td colspan="2" class="mdescriptiontext" style="text-align:center">
                <br>
                <a id="mreset" href="/location.htm">Reset</a>
                </td>
            </tr>
            </tbody></table>
        </td>
        </tr>
    </tbody></table>





























..And my goal is to convert it to this...

  1. <table id="mtable" cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:collapse;">
    <tbody><tr>
    <td>
    <div id="loginerror">
    <span id="mspan" class="merror"></span>
    </div>
    </td>
    <td>
      <div id="loginusername">
      <input name="mname" type="text" id="mname" autocomplete="off" class="ms-inputuserfield" style="width:99%;">
      </div>
    </td>
    <td>
      <div id="loginpassword">
      <input name="mpassword" type="password" id="mpassword" autocomplete="off" class="ms-inputuserfield" style="width:99%;">
      </div>
    </td>
    <td>
    <div id="loginsubmit">
    <input type="submit" name="mlogin" value="Sign In" id="mlogin">
    </div>
    </td>
    </tr>
    </tbody>
    </table>

























I'm basically..
removing the <tr>'s ,
adding <div> tags with ids around the content in each td
...and elemenating a couple td's towards the bottom.

thats it.  Any help would be awesome!  I need to learn how to convert complex tables, but just don't know where to start...what should be my weapon of choice in this situation?

Thanks for any help!

*Break through the ice and never look back*