<?php

// register.tpl
// -----------------------------------------------------------------------------
// Register template
//
// Revision   > $Rev: 151 $
// Date		  > $Date: 2009-11-25 11:59:38 +0000 (Wed, 25 Nov 2009) $
// Author     > RAK for DML
// Copyright  > (C) Digital Mail Limited (2005-2009)
// -----------------------------------------------------------------------------

?>

<!------------------------>
<!-- REGISTER COMPONENT -->
<!------------------------>

<script language="javascript" type="text/javascript">

// CREATE 'PUBLIC' JS INTERFACE FOR COMPONENT
dmx.<?=$comp_name;?> = new Object();
dmx.<?=$comp_name;?>.name  = '<?=$comp_name;?>';
dmx.<?=$comp_name;?>.xclass = 'register';

// DECLARE VARIABLES
// Are the optional registration details open
dmx.<?=$comp_name;?>.open = false;

// -------------------------------------------------------------------------------------------------
// COMPONENT METHODS

dmx.<?=$comp_name;?>.toggle = function()
{
	if (dmx.<?=$comp_name;?>.open)
	{
		$('<?=$comp_name;?>_optional').style.display = 'none';
		$('<?=$comp_name;?>_txt').innerHTML = 'Show';
		dmx.<?=$comp_name;?>.open = false;
	}
	else
	{
		$('<?=$comp_name;?>_optional').style.display = 'block';
		$('<?=$comp_name;?>_txt').innerHTML = 'Hide';
		dmx.<?=$comp_name;?>.open = true;
	}
}

</script>

<style type="text/css">

#<?=$comp_name;?>_optional
{
	display: none;
}

</style>

<div class="dmb0" style="<?=$comp_width;?>">
<div class="dmx">
<div class="register">
<div class="<?=$comp_name;?>">

<?php if ($showheader && $showborder) : ?>
<h1 class="bordered">Create your account</h1>
<?php elseif ($showheader) : ?>
<h1>Create your account</h1>
<?php endif; ?>

<?php if ($showborder) : ?>
<div class="border" style="<?=$box_size;?>">
<?php else: ?>
<div style="<?=$box_size;?>">
<?php endif; ?>

<?php if (!$err_msg) : ?>

<?php if ($showpreamble) : ?>
<p>
The fields maked with an orange arrow ( <img src="<?=$dmx_glib;?>interface/obligatory_field_10.gif" alt="" width="10" height="14" border="0"> ) are obligatory.
</p>
<?php endif; ?>

<form action="<?=DMX_SELF;?>" method="post" name="<?=$comp_name?>">
<input type="hidden" name="dmx_comp_class" value="register">
<input type="hidden" name="dmx_comp_name" value="<?=$comp_name?>">
<input type="hidden" name="dmx_rc" value="<?=$rc_forms;?>">
<input type="hidden" name="dmb1_SessRef" value="">

<table style="width: 100%; padding: 0px;">

<?php if ($comp_err_msg) : ?>
<tr>
	<td colspan="4"><span class="error"><?=$comp_err_msg;?></span></td>
</tr>
<?php elseif ($comp_msg) : ?>
<tr>
	<td colspan="4"><?=$comp_msg;?><br></td>
</tr>
<?php endif; ?>

<?php if ($showpreamble) : ?>
<tr>
	<td colspan="4"><h2>Name and contact details</h2></td>
</tr>
<?php endif; ?>

<tr>
	<td style="text-align: right; white-space: nowrap;">
		Title
		&nbsp;
	</td>
	<td style="width: 1%"><img src="<?=$dmx_glib;?>interface/obligatory_field_10.gif" alt="" width="10" height="14" border="0"></td>
	<td>
		<select name="dmx_title" class="form_select">
			<?=$title_drop_down;?>
		</select>
	</td>
	<?php if ($showpreamble) : ?>
	<td rowspan="6" style="padding-left: 20px;">
		Name and contact details<br>
		<small>We require your name and contact details to create an account. Numbers are registered in the name supplied, and the email address is used as your login ID.</small>
	</td>
	<?php else : ?>
	<td rowspan="6"></td>
	<?php endif; ?>
</tr>
<tr>
	<td style="text-align: right; white-space: nowrap;">
		First name
		&nbsp;
	</td>
	<td style="width: 1%"><img src="<?=$dmx_glib;?>interface/obligatory_field_10.gif" alt="" width="10" height="14" border="0"></td>
	<td><input name="dmx_first" value="<?=$form['value']['dmx_first'];?>" type="text" class="form_text_field<?=$form['error']['dmx_first'];?>" size="20" maxlength="60"></td>
</tr>
<tr>
	<td style="text-align: right; white-space: nowrap;">
		Last name
		&nbsp;
	</td>
	<td><img src="<?=$dmx_glib;?>interface/obligatory_field_10.gif" alt="" width="10" height="14" border="0"></td>
	<td><input name="dmx_last" value="<?=$form['value']['dmx_last'];?>" type="text" class="form_text_field<?=$form['error']['dmx_last'];?>" size="20" maxlength="60"></td>
</tr>
<tr>
	<td style="text-align: right; white-space: nowrap;">
		Daytime tel
		&nbsp;
	</td>
	<td><img src="<?=$dmx_glib;?>interface/obligatory_field_10.gif" alt="" width="10" height="14" border="0"></td>
	<td><input name="dmx_tel_day" value="<?=$form['value']['dmx_tel_day'];?>" type="text" class="form_text_field<?=$form['error']['dmx_tel_day'];?>" size="20" maxlength="60"></td>
</tr>
<tr>
	<td style="text-align: right; white-space: nowrap;">
		Mobile
		&nbsp;
	</td>
	<td></td>
	<td><input name="dmx_tel_mobile" value="<?=$form['value']['dmx_tel_mobile'];?>" type="text" class="form_text_field<?=$form['error']['dmx_tel_mobile'];?>" size="20" maxlength="60"></td>
</tr>
<tr>
	<td style="text-align: right; white-space: nowrap;">
		<span class="infotext">Email<span class="tipcontents"><b>Email:</b> The email address you want us to use when contacting you</span></span>
		&nbsp;
	</td>
	<td><img src="<?=$dmx_glib;?>interface/obligatory_field_10.gif" alt="" width="10" height="14" border="0"></td>
	<td><input name="dmx_email" value="<?=$form['value']['dmx_email'];?>" type="text" class="form_text_field<?=$form['error']['dmx_email'];?>" size="30" maxlength="60"></td>
</tr>
<tr>
	<td style="text-align: right; white-space: nowrap;">
		<span class="infotext">Newsletter<span class="tipcontents"><b>Newsletter:</b> A monthly newsletter, containing tips, product announcements and special offers</span></span>
		&nbsp;
	</td>
	<td></td>
	<td colspan="2"><input name="dmx_newslevel" value="2" type="checkbox" style="margin-left: 0px;" <?=($form['value']['dmx_newslevel'] ? 'checked="checked"' : '');?>> Subscribe to {SUB:company_brandname}'s monthly newsletter</td>
</tr>

<?php if ($showpreamble) : ?>
<tr><td colspan="4"><h2>Login and telephone support ID</h2></td></tr>
<?php else : ?>
<tr><td colspan="4"><img src="<?=$dmx_glib;?>clear.gif" width="1" height="10" alt=""></td></tr>
<?php endif; ?>

<tr>
	<td style="text-align: right; white-space: nowrap;">
		<span class="infotext">PIN<span class="tipcontents"><b>PIN:</b> Your 4-digit personal identification number</span></span>
		&nbsp;
	</td>
	<td style="width: 1%"><img src="<?=$dmx_glib;?>interface/obligatory_field_10.gif" alt="" width="10" height="14" border="0"></td>
	<td><input name="dmx_pin1" value="<?=$form['value']['dmx_pin1'];?>" type="password" class="form_text_field<?=$form['error']['dmx_pin1'];?>" size="4" maxlength="4"></td>
	<?php if ($showpreamble) : ?>
	<td rowspan="4" style="padding-left: 20px;">
		Login and telephone support ID<br>
		<small>Your PIN is use whenever you log in to your number controls. The memorable date and word are used by our support team to verify your identity before giving out any private information, or making any changes to your account.</small>
	</td>
	<?php else : ?>
	<td rowspan="4"></td>
	<?php endif; ?>
</tr>
<tr>
	<td style="text-align: right; white-space: nowrap;">
		<span class="infotext">Repeat PIN<span class="tipcontents"><b>Repeat PIN:</b> Repeat the 4-digit number</span></span>
		&nbsp;
	</td>
	<td><img src="<?=$dmx_glib;?>interface/obligatory_field_10.gif" alt="" width="10" height="14" border="0"></td>
	<td><input name="dmx_pin2" value="<?=$form['value']['dmx_pin2'];?>" type="password" class="form_text_field<?=$form['error']['dmx_pin2'];?>" size="4" maxlength="4"></td>
</tr>
<tr>
	<td style="text-align: right; white-space: nowrap;">
		<span class="infotext">Memorable date<span class="tipcontents"><b>Memorable date:</b> A date in format DD/MM/YYYY</span></span>
		&nbsp;
	</td>
	<td><img src="<?=$dmx_glib;?>interface/obligatory_field_10.gif" alt="" width="10" height="14" border="0"></td>
	<td><input name="dmx_mem_date" value="<?=$form['value']['dmx_mem_date'];?>" type="text" class="form_text_field<?=$form['error']['dmx_mem_date'];?>" size="10" maxlength="10"> <small>(DD/MM/YYYY)</small></td>
</tr>
<tr>
	<td style="text-align: right; white-space: nowrap;">
		<span class="infotext">Memorable word<span class="tipcontents"><b>Memorable word:</b> A word that will be used in account security checks to establish your ID</span></span>
		&nbsp;
	</td>
	<td><img src="<?=$dmx_glib;?>interface/obligatory_field_10.gif" alt="" width="10" height="14" border="0"></td>
	<td><input name="dmx_mem_word" value="<?=$form['value']['dmx_mem_word'];?>" type="text" class="form_text_field<?=$form['error']['dmx_mem_word'];?>" size="23" maxlength="60"></td>
</tr>

<tr>
	<td colspan="4">
		<br />
		<a href="#" class="options" onclick="this.blur(); dmx.<?=$comp_name;?>.toggle(); return false;"><span id="<?=$comp_name;?>_txt">Show</span> optional additional registration details</a>
	</td>
</tr>
</table>

<div id="<?=$comp_name;?>_optional">
	<table style="width: 100%; padding: 0px;">
	<?php if ($showpreamble) : ?>
	<tr><td colspan="4"><h2>Optional number ownership details</h2></td></tr>
	<?php else : ?>
	<tr><td colspan="4"><img src="<?=$dmx_glib;?>clear.gif" width="1" height="10" alt=""></td></tr>
	<?php endif; ?>

	<tr>
		<td style="text-align: right; white-space: nowrap;">
			Company / Name
			&nbsp;
		</td>
		<td></td>
		<td><input name="dmx_company" value="<?=$form['value']['dmx_company'];?>" type="text" class="form_text_field<?=$form['error']['dmx_company'];?>" size="20" maxlength="60"></td>
		<?php if ($showpreamble) : ?>
		<td rowspan="8" style="padding-left: 20px;">
			Number ownership registration<br>
			<small>Sometimes numbers are registered on behalf of a company, or third-party individual, These details should be entered here.</small>
		</td>
		<?php else : ?>
		<td rowspan="8"></td>
		<?php endif; ?>
	</tr>
	<tr>
		<td style="text-align: right; white-space: nowrap;">
			Address
			&nbsp;
		</td>
		<td></td>
		<td><input name="dmx_addr1" value="<?=$form['value']['dmx_addr1'];?>" type="text" class="form_text_field<?=$form['error']['dmx_addr1'];?>" size="30" maxlength="60"></td>
	</tr>
	<tr>
		<td></td>
		<td></td>
		<td><input name="dmx_addr2" value="<?=$form['value']['dmx_addr2'];?>" type="text" class="form_text_field<?=$form['error']['dmx_addr2'];?>" size="30" maxlength="60"></td>
	</tr>
	<tr>
		<td style="text-align: right; white-space: nowrap;">
			Town / City
			&nbsp;
		</td>
		<td></td>
		<td><input name="dmx_towncity" value="<?=$form['value']['dmx_towncity'];?>" type="text" class="form_text_field<?=$form['error']['dmx_towncity'];?>" size="20" maxlength="60"></td>
	</tr>
	<tr>
		<td style="text-align: right; white-space: nowrap;">
			Postcode / ZIP
			&nbsp;
		</td>
		<td></td>
		<td><input name="dmx_pc_zip" value="<?=$form['value']['dmx_pc_zip'];?>" type="text" class="form_text_field<?=$form['error']['dmx_pc_zip'];?>" size="12" maxlength="60"></td>
	</tr>
	<tr>
		<td style="text-align: right; white-space: nowrap;">
			Country
			&nbsp;
		</td>
		<td></td>
		<td>
			<select name="dmx_country" class="form_select">
				<?=$country_drop_down;?>
			</select>
		</td>
	</tr>
		<td style="text-align: right; white-space: nowrap;">
			Telephone
			&nbsp;
		</td>
		<td></td>
		<td><input name="dmx_tel_home" value="<?=$form['value']['dmx_tel_home'];?>" type="text" class="form_text_field<?=$form['error']['dmx_tel_home'];?>" size="20" maxlength="60"></td>
	</tr>
	<tr>
		<td style="text-align: right; white-space: nowrap;">
			Fax
			&nbsp;
		</td>
		<td></td>
		<td><input name="dmx_fax" value="<?=$form['value']['dmx_fax'];?>" type="text" class="form_text_field<?=$form['error']['dmx_fax'];?>" size="20" maxlength="60"></td>
	</tr>
</table>
</div>

<br />

<input type="hidden" name="dmx_action" value="register">
<div class="grabut_right_<?=$grabut_suffix;?>"><ul><li><a href="" onclick="tst_submit_form(document.forms.<?=$comp_name;?>); event.cancelBubble=true; return false;">Register</a></li></ul></div>

<?php if ($showborder) : ?><br /><br /><?php endif; ?>

</form>

<?php else : ?>
<!-- ERROR HANDLING -->
	<div style="vertical-align: middle;">
	<img src="<?=$dmx_glib;?>interface/error_32.gif" alt="" width="36" height="32" border="0" style="float: left; padding: 0 10px 0 0;"><span class="error">WE'RE SORRY<br><?=$err_msg;?>
	</div>
<!-- END ERROR HANDLING -->
<?php endif; ?>

</div>

</div>
</div>
</div>
</div>

<!---------------------------->
<!-- END REGISTER COMPONENT -->
<!---------------------------->
