{if !$showingLoginPage}

{if $themesettings.general.themelayout == "1"}
{include file="$template/core/layouts/footers/layout-left.tpl"}
{else}
{include file="$template/core/layouts/footers/default.tpl"}
{/if}

{/if}
{if $showingLoginPage}
	<script>
		$("p:contains('Powered by')").remove();
	</script>
{/if}

{if $themesettings.clientarea.viandq eq "outer-layout"}
<div id="fullpage-overlay" class="w-hidden">
    <div class="outer-wrapper">
        <div class="inner-wrapper">
            <img src="{$WEB_ROOT}/assets/img/overlay-spinner.svg">
            <br>
            <span class="msg"></span>
        </div>
    </div>
</div>
{/if}

<div class="modal system-modal fade" id="modalAjax" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
				<h5 class="modal-title"></h5>
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span>
					<span class="sr-only">{lang key='close'}</span>
				</button>
            </div>
            <div class="modal-body">
                {$LANG.loading}
            </div>
            <div class="modal-footer">
                <div class="pull-left loader">
                    <i class="fas fa-circle-notch fa-spin"></i> {$LANG.loading}
                </div>
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    {$LANG.close}
                </button>
                <button type="button" class="btn btn-primary modal-submit">
                    {$LANG.submit}
                </button>
            </div>
        </div>
    </div>
</div>

<form method="get" action="{$currentpagelinkback}">
    <div class="modal fade modal-localisation" id="modalChooseLanguage" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-body">
					<button type="button" class="close text-light" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>

					{if $languagechangeenabled && count($locales) > 1}
						<h4 class="pt-2 mt-0 pb-3">{lang key='chooselanguage'}</h4>
						<div class="row item-selector">
							<input type="hidden" name="language" value="">
							{foreach $locales as $locale}
								<div class="col-6 col-sm-4">
									<a href="#" class="item{if $language == $locale.language} active{/if}" data-value="{$locale.language}">
										<span class="iti-flag {$locale.countryCode|lower}"></span>
										<span>{$locale.localisedName}</span>
									</a>
								</div>
							{/foreach}
						</div>
					{/if}
					{if !$loggedin && $currencies}
						<p class="h5 pt-5 pb-3">{lang key='choosecurrency'}</p>
						<div class="row item-selector currency">
							<input type="hidden" name="currency" value="">
							{foreach $currencies as $selectCurrency}
								<div class="col-6 col-sm-4">
									<a href="#" class="item{if $activeCurrency.id == $selectCurrency.id} active{/if}" data-value="{$selectCurrency.id}">
										{$selectCurrency.prefix} <!-- $selectCurrency.code -->
									</a>
								</div>
							{/foreach}
						</div>
					{/if}
				</div>
				<div class="modal-footer">
					<button type="submit" class="btn btn-block btn-primary">{lang key='apply'}</button>
				</div>
			</div>
		</div>
	</div>
</form>

{include file="$template/includes/generate-password.tpl"}

{if $themesettings.cookieconsent.cconsent}
{include file="$template/core/includes/cookieconsent.tpl"}
{/if}

{if !$showingLoginPage}
{if $themesettings.general.enablepromo}
	{if $themesettings.general.edatec}
	<script>
	   var x = setInterval( function(){ t(); } , 1000);
	   var date_ = "{$themesettings.general.proend} 00:00";
	   function t() {
		 var now = new Date().getTime();
		 var countDownDate = new Date(date_).getTime();
		 var distance = countDownDate - now;

		 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
		 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
		 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
		 var seconds = Math.floor((distance % (1000 * 60)) / 1000);

		 if (distance > 0) {

			document.getElementById("offer-Days").innerHTML = days.toString().length < 2 ? "0"+days : days  ;
			document.getElementById("offer-Hours").innerHTML =  hours.toString().length < 2 ? "0"+hours : hours  ;
			document.getElementById("offer-Minutes").innerHTML =  minutes.toString().length < 2 ? "0"+minutes : minutes;
			document.getElementById("offer-Seconds").innerHTML =  seconds.toString().length < 2 ? "0"+seconds : seconds;
		 }else{
		   clearInterval(x);
		   $('.cros-latest-promo').remove();
		 }
		 
	   }
	</script>
	{/if}
{/if}
{/if}


{if $adminMasqueradingAsClient || $adminLoggedIn}
	{if $themesettings.customcolors.developermod}
		{include file="$template/core/includes/theme-footer.tpl"}
	{/if}
{/if}

{$footeroutput}
</body>
</html>