{stored_object name=$blah|cat:'u':$user->id type="newcomp" from="newcomp" assign="newcomp"}

{if $smarty.request.confirmReset}{stored_object name=$blah|cat:'u':$user->id type="signup" destroy="true"}{/if}

{include_php file="shared_handle:newcomp.prepareInvitation"}

<h1 class="underline">Create a Competition: Step 3</h1>
<br />
<h2 class="withBG">
	<div class="topRight hideShow">
		<a href="javascript:toggle('letter');"><img src="./img/icons/hide_show.gif" alt="show/hide" border="0" /></a></div>
	Review Your Invitation:</h2>

<div>Make sure that you are satisfied with the invitation you will be sending to the other competetors.</div>

<form name="compStartForm" method="post" style="margin:0px;">
<input type="hidden" name="pg" value="{toc_next}">
<input type="hidden" name="no_expire" value="true">

{toc_next assign="next"}
{toc_prev assign="prev"}

<div id="letter" align="left" style="display:block;margin:10px;padding:17px;" class="notepaperBG">
	{eval var=$invitationLetter|nl2br}
</div>
<br />

<h2 class="withBG">
	<div class="topRight hideShow">
		<a href="javascript:toggle('enterEmails');"><img src="./img/icons/hide_show.gif" alt="show/hide" border="0" /></a></div>
	Invite Some Competitors:</h2>

<div>Enter a contact name and email address for each person you would like to invite into this competition. Don't worry about gathering everyone's email address right now, you can always add more later.<br /><br /></div>

<div id="enterEmails">
	<table style="margin:10px;">
	<tr>
		<td><div>&nbsp;</div></td>
		<td><h3 class="withBG">Name</h2></td>
		<td><h3 class="withBG">E-Mail</h2></td>
		<td><h3 class="withBG">Relation</h2></td>
	</tr> 
	{section name="contactLoop" loop=$addCount}  {* $addCount is assigned by the handler... *}
	<tr>
		<td><div>#{$smarty.section.contactLoop.iteration}</div></td>
		<td><div><input type="text" class="textInput" name="newcomp[invite][name][{$smarty.section.contactLoop.iteration}]"></div></td>
		<td><div><input type="text" class="textInput" name="newcomp[invite][email][{$smarty.section.contactLoop.iteration}]"></div></td>
		<td><div><input type="text" class="textInput" name="newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]"></div></td>
	</tr>
	{/section}
	</table>
</div>

{stored_object_fill_form object=$newcomp name="newcomp"}

<div class="hBox" style="text-align:right;">
	{if $prev.pageName}<input type="image" src="{$skinFolder}images/btn_back.gif" class="btn_image" onclick="pg.value='{$prev.pageName}';">&nbsp; {/if}
	{if $next.pageName}<input type="image" src="{$skinFolder}images/btn_next.gif" class="btn_image" onclick="pg.value='{$next.pageName}';">{/if}	
</div>

</form>