   document.write('<CENTER>');   var exp;    if(pageName.toLowerCase() == submitPage.toLowerCase())  {  submitRevisedFields();  }   else  {   if(pageName.toLowerCase() == registrationAdultsPage.toLowerCase() ||  pageName.toLowerCase() == registrationKidsPage.toLowerCase())  {        document.write('<a onClick="resetForm(); handleOverCompButtons(0);" ');  document.write('onmouseout="handleOutCompButtons(0);" ');  document.write('onmouseover="handleOverCompButtons(0);" ');  document.write('onmousedown="handleClickCompButtons(0);">');  document.write('<img style="border: 0px solid ;" hspace="0" vspace="0" ');  document.write('src="CompButtons/' + buttonsCompMenu[0] + '.' + compButtonsImageExtension + '" name="' + buttonsCompMenu[0] + '" ');  document.write('alt="' + buttonsCompMenu[0] + '"></a>');    document.write(' &nbsp; &nbsp; &nbsp; &nbsp;' + ' &nbsp; &nbsp; &nbsp; &nbsp;' + ' &nbsp; &nbsp; &nbsp; &nbsp;');    document.write('<a onClick="saveFields(); handleOverCompButtons(1);" ');  document.write('onmouseout="handleOutCompButtons(1);" ');  document.write('onmouseover="handleOverCompButtons(1);" ');  document.write('onmousedown="handleClickCompButtons(1);">');  document.write('<img style="border: 0px solid ;" hspace="0" vspace="0" ');  document.write('src="CompButtons/' + buttonsCompMenu[1] + '.' + compButtonsImageExtension + '" name="' + buttonsCompMenu[1] + '" ');  document.write('alt="' + buttonsCompMenu[1] + '"></a>');      reloadForm();    if(getCookie(formSubmittedOnceCookie) == '3' )  resetForm();                  setCookie(formSubmittedOnceCookie, '0', exp);        if(pageName.toLowerCase() == registrationKidsPage.toLowerCase())  setCookie(formKidsRegCookie, '1', exp);  else  setCookie(formKidsRegCookie, '0', exp);      document.write('<br><br><br><br><br><br><br><br>');  }      var localDisabled = disbledButton;  var imageName = 'chk_off.gif';    function handleClickTextbox()   {  if (document.images)   {   if(imageName == 'chk_off.gif')  {  imageName = 'chk_on.gif';  localDisabled = buttonsCompMenu[3];    }  else if(imageName == 'chk_on.gif')  {  imageName = 'chk_off.gif';  localDisabled = disbledButton;    }  document.images['textboxAgree'].src = 'CompButtons/' + imageName;    document.images['subButton'].src='CompButtons/' + localDisabled + '.' + compButtonsImageExtension;    }  }        if(pageName.toLowerCase() == revisePage.toLowerCase())  {       previewRegistration();  document.write('<br><br>');     document.write('<table style="width: 650px; text-align: left; margin-left: auto; margin-right: auto;" border="0" cellpadding="0" cellspacing="0">');  document.write('<tbody><tr><td>');    document.write('<br>(Must agree to view the submit button.) <br><br> ');  document.write('<a onClick="handleClickTextbox();"> ');  document.write('<img style="width: 12px; height: 12px;" name="textboxAgree" alt="checkbox to view the submit button" src="CompButtons/chk_off.gif"></a>');  document.write(' &nbsp;&nbsp;By checking this box I agree that: ');  document.write('<br>1- &nbsp;I have read the competition info.');  document.write('<br>2- &nbsp;I understand that changes that entail ADDING into events');  document.write('<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;after the deadline can be made ONLY if there is space available.');  document.write('<br>3- &nbsp;I understand that late registrations are accepted only if they do not affect any event.');  document.write('<br>4- &nbsp;I understand that there is a $15 late fee per person for new registrations after the deadline.');  document.write('<br>5- &nbsp;Payment of late registrants will be accepted at the door only.');   document.write('<br><br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;');    document.write(' </td></tr></tbody></table>');      document.write('<br><br>');      document.write('<table style="width: 400px;" border="0" cellpadding="0" cellspacing="0">');  document.write('<tbody> ');  document.write('<tr> ');  document.write('<td style="text-align: center; width: 200px;">');    document.write('<a onClick="history.back(); handleOverCompButtons(2);" ');  document.write('onmouseout="handleOutCompButtons(2);" ');  document.write('onmouseover="handleOverCompButtons(2);" ');  document.write('onmousedown="handleClickCompButtons(2);">');  document.write('<img style="border: 0px solid ;" hspace="0" vspace="0" ');  document.write('src="CompButtons/' + buttonsCompMenu[2] + '.' + compButtonsImageExtension + '" name="' + buttonsCompMenu[2] + '" ');  document.write('alt="' + buttonsCompMenu[2] + '"></a>');     document.write('</td> ');  document.write('<td style="text-align: center; width: 200px;">');     document.write('<a onClick=location.href="' + submitPage + '.html' + '">');  document.write('<img style="border: 0px solid ;" hspace="0" vspace="0" ');  document.write('src="CompButtons/' + localDisabled + '.' + compButtonsImageExtension + '" name="subButton" ');  document.write('alt=""></a>');     document.write('</td>');  document.write('</tr>');  document.write('</tbody>');  document.write('</table>');      document.write('<br><br><br><br><br><br><br><br>');  }      if(pageName.toLowerCase() == contactusPage.toLowerCase())  {    }           if(pageName.toLowerCase() == thankxPage.toLowerCase() ||  pageName.toLowerCase() == registrationPage.toLowerCase() )   eraseAllCookies();      }                  function resetContactUsForm()  {  document.contactUsForm.elements[3].value = '';  document.contactUsForm.elements[4].value = '';  document.contactUsForm.elements[5].value = '';  }     function submitContactUsForm()  {  if( isEmail(document.contactUsForm.elements[3].value) )  document.contactUsForm.submit();   else  alert('The email address you entered does not appear to be valid');  }        function resetOptionField()  {  if(document.formationTeamForm.elements[5].value=='Optional')  document.formationTeamForm.elements[5].value = '';   }    function resetFormationTeamForm()  {  document.formationTeamForm.elements[3].value = '';  document.formationTeamForm.elements[4].value = '';  document.formationTeamForm.elements[5].value = 'Optional';   document.formationTeamForm.elements[6].value = '';  document.formationTeamForm.elements[7].value = '';  document.formationTeamForm.elements[8].value = '';  document.formationTeamForm.elements[9].value = '';  }     function submitFormationTeamForm()  {  if( isEmail(document.formationTeamForm.elements[6].value) )  document.formationTeamForm.submit();   else  alert('The email address you entered does not appear to be valid');   }       if(pageName.toLowerCase() != submitPage.toLowerCase())  {    document.write('<div style="text-align: center;"><img style="width: 800px; height: 22px;" alt="SJSU Ballroom Dance Club" src="images/sjsubdcbar.png"><br></div>');    document.write('<div style="text-align: center;">');    document.write('<small style="font-style: italic;">');  document.write('<a href="http://' + getRootName() + '">BDC Main Page</a>&nbsp;&nbsp;&nbsp;&nbsp;');  document.write('<a href="' + competitionPage + '.htm">Competition Main</a>&nbsp;&nbsp;&nbsp;&nbsp;');  document.write('<a href="' + infoPage + '.html">Information</a>&nbsp;&nbsp;&nbsp;&nbsp;');  document.write('<a href="' + schedulePage + '.html">Schedule</a>&nbsp;&nbsp;&nbsp;&nbsp;');  document.write('<a href="' + barrettBallroomPage + '.html">Barrett Ballroom</a>&nbsp;&nbsp;&nbsp;&nbsp;');  document.write('<a href="' + parkingPage + '.html">Parking</a>&nbsp;&nbsp;&nbsp;&nbsp;');  document.write('<a href="' + registrationPage + '.html">Registration</a>&nbsp;&nbsp;&nbsp;&nbsp;');  document.write('<a href="' + registrationTeamsPage + '.html">Reg Formation Teams</a>&nbsp;&nbsp;&nbsp;&nbsp;');  document.write('<a href="' + contactusPage + '.html">Contact us</a>');  document.write('</small>');   }             document.write('<CENTER>');                  