<script type="text/javascript" src="includes/jscript/jqueryui.js"></script>
<script type="text/javascript" src="templates/orderforms/{$carttpl}/js/main.js"></script>
<link rel="stylesheet" type="text/css" href="templates/orderforms/{$carttpl}/style.css" />
<link rel="stylesheet" type="text/css" href="templates/orderforms/{$carttpl}/uistyle.css" />
<div class="wrapper purple-content">
    	<div class="container">
        	<div class="content-heading white whmcsportal">
    			<h2>{$pagetitle}</h2>
                <small>{if $domain eq "register"}{$LANG.registerdomain}{else}{$LANG.transferdomain}{/if}</small>
            </div>
            <div class="view-cart">
            	<a href="{$smarty.server.PHP_SELF}?a=view"><i class="fa fa-shopping-cart"></i></a>
            </div>
		</div>
    </div>
    <div class="wrapper purple optionbar small">
    	<div class="container">
        <ul>
{foreach key=num item=productgroup from=$productgroups}
{if $gid eq $productgroup.gid}
<li class="active"><a href="{$smarty.server.PHP_SELF}?gid={$productgroup.gid}">{$productgroup.name}</a><span></span></li>{else}<li><a href="{$smarty.server.PHP_SELF}?gid={$productgroup.gid}">{$productgroup.name}</a><span></span></li>{/if}{/foreach}{if $loggedin}<li><a href="{$smarty.server.PHP_SELF}?gid=addons">{$LANG.cartproductaddons}</a><span></span></li>{if $renewalsenabled}<li><a href="{$smarty.server.PHP_SELF}?gid=renewals">{$LANG.domainrenewals}</a><span></span></li>{/if}{/if}{if $registerdomainenabled}<li {if $domain eq "register"}class="active"{/if}><a href="{$smarty.server.PHP_SELF}?a=add&domain=register">{$LANG.registerdomain}</a><span></span></li>{/if}{if $transferdomainenabled}<li {if $domain eq "transfer"}class="active"{/if}><a href="{$smarty.server.PHP_SELF}?a=add&domain=transfer">{$LANG.transferdomain}</a><span></span></li>{/if}</ul>
</div>
</div>
    <div class="wrapper" id="maincontent">
	<div class="container">
			
            <div class="whmcssection clientarea domainsectionwhmcs" id="knowledgebase">

{if !$loggedin && $currencies}
<div class="currencychooser">
{foreach from=$currencies item=curr}
<a href="cart.php?a=add&domain={$domain}&currency={$curr.id}"><img src="images/flags/{if $curr.code eq "AUD"}au{elseif $curr.code eq "CAD"}ca{elseif $curr.code eq "EUR"}eu{elseif $curr.code eq "GBP"}gb{elseif $curr.code eq "INR"}in{elseif $curr.code eq "JPY"}jp{elseif $curr.code eq "USD"}us{elseif $curr.code eq "ZAR"}za{else}na{/if}.png" border="0" alt="" /> {$curr.code}</a>
{/foreach}
</div>
<div class="clear"></div>
{/if}

<p class="domainregtitle">{if $domain eq "register"}{$LANG.registerdomaindesc}{else}{$LANG.transferdomaindesc}{/if}</p>

{if $errormessage}<div class="errorbox">{$errormessage|replace:'<li>':' &nbsp;#&nbsp; '} &nbsp;#&nbsp; </div><br />{/if}

<form onsubmit="checkavailability();return false">
<div class="row" style="padding:30px 0 45px 0;text-align:center;">
<input type="text" name="sld" id="sld" size="25" value="{$sld}" class="textbox" placeholder="websitehere" style="max-width:330px;font-size:24px; margin-right:15px;"/><select name="tld" id="tld" class="select" style="width:75px;">
{foreach key=num item=listtld from=$tlds}
<option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>
{/foreach}
</select> &nbsp; <input type="submit" value=" {$LANG.checkavailability} " class="btn btn-md btn-blue" style="margin:-2px 0 0 0"/>
</div>
</form>

<div id="loading" class="loading"><img src="images/loading.gif" border="0" alt="Loading..." /></div>

<form method="post" action="cart.php?a=add&domain={$domain}">

<div id="domainresults"></div>

</form>

{literal}
<script language="javascript">
function checkavailability() {
    jQuery("#loading").slideDown();
    jQuery.post("cart.php", { a: "domainoptions", sld: jQuery("#sld").val(), tld: jQuery("#tld").val(), checktype: '{/literal}{$domain}{literal}', ajax: 1 },
    function(data){
        jQuery("#domainresults").html(data);
        jQuery("#domainresults").slideDown();
        jQuery("#loading").slideUp();
    });
}{/literal}
{if $sld}{literal}
jQuery(document).ready(function(){
    checkavailability();
});
{/literal}{/if}
</script>

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