<!-- content_cash_desk/address_shipping.tpl -->
<div class="full_box">
	<div class="title_wrapper">
		<div class="title"><h2>Lieferanschrift</h2></div>
		<div class="clear"></div>
	</div>

	<div class="box_content">
		<div id="shipping_address_container" class="box_padder">
			<select class="formatted" id="shipping_address_select" name="shipping[address]" size="1">
                                {if $guest_order == 1}
                                    <option value="-1" style="font-weight:bold;color:#000000;">Lieferanschrift von Rechnungsadresse &uuml;bernehmen</option>
                                    <option value="-2" {if $personal_data.shipping.address == -2}selected="selected"{/if} style="font-weight:bold;color:#990000;">Lieferanschrift von Rechnungsadresse abweichend</option>
                                {else}
                                <option value="-1" style="font-weight:bold;color:#000000;">Lieferanschrift von Rechnungsadresse &uuml;bernehmen</option>
				<option value="" style="font-weight:bold;color:#990000;">Neue Adresse anlegen</option>
				{foreach from=$addresses key=address_id item=address}
					<option value="{$address_id}" {if $personal_data.shipping.address == $address_id}selected="selected"{/if}>
                                            {*{$address->firstname} {$address->surname}, {if $address->company}{$address->company}, {/if}{$address->city}*}
                                            {if $address->honorific == 0}
                                                Herr {$address->firstname} {$address->surname}
                                            {else if $address->honorific == 1}
                                                Frau {$address->firstname} {$address->surname}
                                            {else}
                                                Firma {$address->company}
                                            {/if}
                                            ,{$address->street} {$address->house_number}, {$address->zip_code} {$address->city},
                                            {foreach from=$countries item=country}
                                                {if $country->id == $address->country}
                                                    {$country->name}
                                                {/if}
                                            {/foreach}
                                        </option>
				{/foreach}
                                {/if}
			</select>
			<br /><br />

			<div class="shipping_address_form_container" style="display:none;">
				<div class="consists_of_3">
					<div style="width:213px;float:left;">
                                                <label class="obligatory">Anrede <span>*</span></label>
						<select id="shipping_honorific" class="formatted obligatory" name="shipping[honorific]" title="">
							<option value=""{if $personal_data.shipping.honorific == ''} selected{/if}>Bitte w&auml;hlen...</option>
							<option value="0"{if $personal_data.shipping.honorific == 0} selected{/if}>Herr</option>
							<option value="1"{if $personal_data.shipping.honorific == 1} selected{/if}>Frau</option>
							<option value="2"{if $personal_data.shipping.honorific == 2} selected{/if}>Firma</option>
						</select>
					</div>

					<div style="width:213px;margin-left:20px;float:left;">
                                                <label class="address_person">Vorname <span>*</span></label>
						<input type="text" id="shipping_firstname" class="formatted obligatory" name="shipping[firstname]" value="{if $personal_data.shipping.firstname}{$personal_data.shipping.firstname}{/if}" title="Vorname" />
					</div>

					<div style="width:213px;margin-left:20px;float:left;">
                                                <label class="address_person">Nachname <span>*</span></label>
						<input type="text" id="shipping_surname" class="formatted obligatory" name="shipping[surname]" value="{if $personal_data.shipping.surname}{$personal_data.shipping.surname}{/if}" title="Nachname" />
					</div>
					<br style="clear:left;" />
				</div>
				<br />

				<div class="consists_of_1">
					<div style="width:680px;float:left;">
                                                <label class="address_company">Firma <span>*</span></label>
						<input type="text" id="shipping_company" class="formatted" name="shipping[company]" value="{if $personal_data.shipping.company}{$personal_data.shipping.company}{/if}" title="Firma" />
					</div>
					<br style="clear:left;" />
				</div>
				<br />

				<div class="consists_of_2 split_2_1">
					<div style="width:446px;float:left;">
                                                <label class="obligatory">Stra&szlig;e <span>*</span></label>
						<input type="text" id="shipping_street" class="formatted obligatory" name="shipping[street]" value="{if $personal_data.shipping.street}{$personal_data.shipping.street}{/if}" title="Straße" />
					</div>

					<div style="width:213px;margin-left:20px;float:left;">
                                                <label class="obligatory">Hausnummer <span>*</span></label>
						<input type="text" id="shipping_house_number" class="formatted obligatory" name="shipping[house_number]" value="{if $personal_data.shipping.house_number}{$personal_data.shipping.house_number}{/if}" title="Hausnummer" />
					</div>
					<br style="clear:left;" />
				</div>
				<br />

				<div class="consists_of_3">
					<div style="width:213px;float:left;">
                                                <label class="obligatory">PLZ <span>*</span></label>
						<input type="text" id="shipping_zip_code"  class="formatted obligatory" name="shipping[zip_code]" value="{if $personal_data.shipping.zip_code}{$personal_data.shipping.zip_code}{/if}" title="PLZ" />
					</div>

					<div style="width:213px;margin-left:20px;float:left;">
                                                <label class="obligatory">Ort <span>*</span></label>
						<input type="text" id="shipping_city" class="formatted obligatory" name="shipping[city]" value="{if $personal_data.shipping.city}{$personal_data.shipping.city}{/if}" title="Ort" />
					</div>

					<div style="width:213px;margin-left:20px;float:left;">
                                                <label class="obligatory">Land <span>*</span></label>
						<select id="shipping_country" class="formatted obligatory" name="shipping[country]" title="">
							<option value="">Land</option>
							{foreach from=$countries item=country}
								<option value="{$country->id}" {if ($personal_data.shipping.country > 0 && $personal_data.shipping.country == $country->id) || (!$personal_data.shipping.country && $default_address_country_id == $country->id)}selected{/if}>{$country->name}</option>
							{/foreach}
						</select>
					</div>
					<br style="clear:left;" />
				</div>
				<br />
                                {if $guest_order != 1}
				<div class="consists_of_2 split_2_1">
					<div id="shipping_save_message" style="float:left;font-weight:bold;"></div>
					<div style="float:right;">
						<input id="cashdesk_button_save_shipping" type="button" class="button" value="&gt;&gt; Daten speichern" />
					</div>
					<br style="clear:both;" />
				</div>
                                {/if}
			</diV>

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