<?php

// orderdealership.tpl
// -----------------------------------------------------------------------------
// Order Dealership template
//
// Revision   > $Rev: 80 $
// Date		  > $Date: 2009-06-25 12:24:44 +0100 (Thu, 25 Jun 2009) $
// Author     > RAK for DML
// Copyright  > (C) Digital Mail Limited (2005-2009)
// -----------------------------------------------------------------------------

?>

<!-------------------------------->
<!-- ORDER DEALERSHIP 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 = 'orderdealership';

// DEFINE INFOTEXT
dmx.<?=$comp_name;?>.info = new Object();
dmx.<?=$comp_name;?>.info.email = '<b>Email address:<\/b> The email address <br>you want us to use to contact you';
dmx.<?=$comp_name;?>.info.pin = '<b>Email address:<\/b> The email address <br>you want us to use to contact you';
dmx.<?=$comp_name;?>.info.repeat_pin = '<b>Repeat PIN:<\/b> Repeat the 4-digit security<br>code you chose in the last step';
dmx.<?=$comp_name;?>.info.mem_date = '<b>Memorable date:<\/b> A date<br>in format DD/MM/YYYY';
dmx.<?=$comp_name;?>.info.mem_word = '<b>Memorable word:<\/b> A word that<br>will be used in account security<br>checks to establish your ID';

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

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

</script>

<style type="text/css">

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

.dmb0 .formline
{
	width: 100%;
	margin: 5px 0px;
	clear: both;
	line-height: 100%;
}

.dmb0 .fcolumn_1
{
	width: 200px;
	text-align: right;
	float: left;
	margin: 3px 0px;
	padding: 4px 15px 0px 0px;
}
.dmb0 .fcolumn_2
{
	margin: 2px 2px;
	float: left;
}

.dmb0 .fcolumn_3
{
	margin: 2px 0px;
	padding: 2px 0px;
}

.dmb0 .oblig
{
	background-image: url("<?=$dmx_glib;?>interface/obligatory_field_10.gif");
	background-position: top right;
	background-repeat: no-repeat;
}

.dmb0 .freeform
{
	width: 100%;
	height: 80px;
	margin-top: 5px;
}

</style>

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

<?php if ($showheader && $showborder) : ?>
	<h1 class="bordered">Register as a dealer</h1>
<?php elseif ($showheader) : ?>
	<h1>Register as a dealer</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="orderdealership">
	<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="">
	
	<?php if ($comp_err_msg) : ?>
		<span class="error"><?=$comp_err_msg;?></span>
	<?php elseif ($comp_msg) : ?>
		<?=$comp_msg;?>
	<?php endif; ?>
	
	<?php if ($showpreamble) : ?>
		<h2>Company name and contact details</h2>
	<?php endif; ?>
	
	<div class="formline">
		<div class="fcolumn_1 oblig">Company name</div>
		<div class="fcolumn_2"><input name="dmx_companyname" value="<?=$form['value']['dmx_companyname'];?>" type="text" class="form_text_field<?=$form['error']['dmx_companyname'];?>" size="25" maxlength="60" /></div>
		<div class="fcolumn_3">&nbsp;e.g. Piper Solutions</div>
	</div>
	<div class="formline">
		<div class="fcolumn_1 oblig">Brand name</div>
		<div class="fcolumn_2"><input name="dmx_brandname" value="<?=$form['value']['dmx_brandname'];?>" type="text" class="form_text_field<?=$form['error']['dmx_brandname'];?>" size="25" maxlength="60" /></div>
		<div class="fcolumn_3">&nbsp;e.g. PipSolTel (no spaces)</div>
	</div>
	<div class="formline">
		<div class="fcolumn_1 oblig">Contact name</div>
		<div class="fcolumn_2"><input name="dmx_contactname" value="<?=$form['value']['dmx_contactname'];?>" type="text" class="form_text_field<?=$form['error']['dmx_contactname'];?>" size="25" maxlength="60" /></div>
		<div class="fcolumn_3">&nbsp;e.g. Peter Piper</div>
	</div>
	<div class="formline">
		<div class="fcolumn_1 oblig">Contact email</div>
		<div class="fcolumn_2"><input name="dmx_contactemail" value="<?=$form['value']['dmx_contactemail'];?>" type="text" class="form_text_field<?=$form['error']['dmx_contactemail'];?>" size="25" maxlength="60" /></div>
		<div class="fcolumn_3">&nbsp;e.g. peter@piper.com</div>
	</div>
	<div class="formline">
		<div class="fcolumn_1 oblig">Customer service email</div>
		<div class="fcolumn_2"><input name="dmx_custservemail" value="<?=$form['value']['dmx_custservemail'];?>" type="text" class="form_text_field<?=$form['error']['dmx_custservemail'];?>" size="25" maxlength="60" /></div>
		<div class="fcolumn_3">&nbsp;e.g. enquiries@piper.com</div>
	</div>
	<div class="formline">
		<div class="fcolumn_1 oblig">Telephone</div>
		<div class="fcolumn_2"><input name="dmx_contactphone" value="<?=$form['value']['dmx_contactphone'];?>" type="text" class="form_text_field<?=$form['error']['dmx_contactphone'];?>" size="25" maxlength="60" /></div>
		<div class="fcolumn_3">&nbsp;e.g. +44-161-123-4567</div>
	</div>
	<div class="formline">
		<div class="fcolumn_1 oblig">Fax</div>
		<div class="fcolumn_2"><input name="dmx_contactfax" value="<?=$form['value']['dmx_contactfax'];?>" type="text" class="form_text_field<?=$form['error']['dmx_contactfax'];?>" size="25" maxlength="60" /></div>
		<div class="fcolumn_3">&nbsp;e.g. +44-161-123-4568</div>
	</div>
	<div class="formline">
		<div class="fcolumn_1">Main website URL</div>
		<div class="fcolumn_2"><input name="dmx_mainwebsiteurl" value="<?=$form['value']['dmx_mainwebsiteurl'];?>" type="text" class="form_text_field<?=$form['error']['dmx_mainwebsiteurl'];?>" size="25" maxlength="60" /></div>
		<div class="fcolumn_3">&nbsp;e.g. www.peterpiper.com</div>
	</div>
	
	<?php if ($showpreamble) : ?>
		<h2>Tell us about your existing business</h2>
	<?php endif; ?>
	
	<div class="formline">
		<div class="fcolumn_1">Number of business customers</div>
		<div class="fcolumn_2"><input name="dmx_custbasebiz" value="<?=$form['value']['dmx_custbasebiz'];?>" type="text" class="form_text_field<?=$form['error']['dmx_custbasebiz'];?>" size="8" maxlength="8" /></div>
		<div class="fcolumn_3">&nbsp;e.g. 50</div>
	</div>
	<div class="formline">
		<div class="fcolumn_1">Number of residential customers</div>
		<div class="fcolumn_2"><input name="dmx_custbaseres" value="<?=$form['value']['dmx_custbaseres'];?>" type="text" class="form_text_field<?=$form['error']['dmx_custbaseres'];?>" size="8" maxlength="8" /></div>
		<div class="fcolumn_3">&nbsp;e.g. 750</div>
	</div>	
	<br />
	<div class="formline">
		<div class="fcolumn_1">Do you already sell</div>
		<div class="fcolumn_2">
			<input name="dmx_sellinboundnum" type="checkbox" <?=$form['value']['dmx_sellinboundnum'];?> />&nbsp;Inbound telephone numbers?<br />
			<input name="dmx_selltelserv"    type="checkbox" <?=$form['value']['dmx_selltelserv'];?> />&nbsp;Telecoms services?<br />
			<input name="dmx_selltelhard"    type="checkbox" <?=$form['value']['dmx_selltelhard'];?> />&nbsp;Telecoms hardware?
		</div>
		<div class="fcolumn_3">&nbsp;</div>
	</div>

	<br style="clear: both;" /><br />
	
	What products are you particularly interested in selling?<br />
	<textarea name="dmx_prodfocus" class="freeform"><?=$form['value']['dmx_prodfocus'];?></textarea>
	
	<br />

	Comments and suggestions:<br />
	<textarea name="dmx_comments" class="freeform"><?=$form['value']['dmx_comments'];?></textarea>

	<br />
	
	<input type="hidden" name="dmx_dealer_type" value="<?=$dealer_type;?>">
	<input type="hidden" name="dmx_action" value="orderdealership">
	<div class="grabut_right_<?=$grabut_suffix;?>"><ul><li><a href="" onclick="tst_submit_form(document.forms.<?=$comp_name;?>); event.cancelBubble=true; return false;">Apply for Dealership</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 DEALER COMPONENT -->
<!----------------------------------->
