<script type="text/javascript">

    // Function to show / hide additional attribute areas for namesuggested domains
    function handleNameSuggestAttributes(index,tld) {
        if(document.getElementById('extraAttributes-' + tld)) {
            if(index != -1) {
                document.getElementById('extraAttributes-' + tld).style.visibility = 'visible';
                document.getElementById('extraAttributes-' + tld).style.display = '';
            } else {
                document.getElementById('extraAttributes-' + tld).style.visibility = 'hidden';
                document.getElementById('extraAttributes-' + tld).style.display = 'none';
            }
        }
        return null;
    }
</script>
<?php if($this->domainError || (isset($this->domainStatus) && $this->domainStatus == -2)) { ?>
<!-- Show any domain errors -->
    <div id="error">
        <table class="ts2" cellspacing="0">
          <tr>
            <td colspan="6" style="font-size:16px; font-weight:bold; color:red;"><?php echo ($this->domainError)?$this->domainError:$this->lang("An unknown error has occurred.");?></td>
          </tr>
        </table>
    </div>
<?php } else { ?>
	<?php if($this->searchType == 'register') { ?>
		<!-- Handle registrations -->
        <?php if($this->domainStatus == 1 && !$this->domainNameSuggest) { ?>
            <!-- Domain is NOT available & we are NOT doing NameSuggest so nothing further to do. -->
            <div id="domainRegistered">
                <table class="ts2" cellspacing="0">
                  <tr>
                    <td colspan="6" style="font-size:16px; font-weight:bold; color:red;" id="textAlreadyRegistered"><?php echo $this->domainName." ".$this->lang('is not currently available!');?></td>
                  </tr>
                </table>
            </div>
        <?php } ?>

            <?php if($this->domainStatus == 0 || $this->domainNameSuggest) { ?>
            <!-- Domain IS availalbe OR we are doing NameSuggest so we have something to show -->
            <div id="domainAvailable">
                <table class="ts2" border="0" cellspacing="0">
                    <?php if($this->domainStatus == 0) { ?>
                      <tr>
                        <td colspan="6" style="font-size:16px; font-weight:bold; color:#090;" id="textAvailable"><?php echo $this->domainName." ".$this->lang('is available to register!');?></td>
                      </tr>
                    <?php } else { ?>
                      <tr>
                        <td colspan="6" style="font-size:16px; font-weight:bold; color:red;" id="textAlreadyRegistered"><?php echo $this->domainName." ".$this->lang('is not currently available!');?></td>
                      </tr>
                    <?php } ?>
             
             <?php if($this->domainNameSuggest) { ?>
                  <tr>
                    <?php if ( count($this->nameSuggestReturn) > 0 ) { ?>
                      <?php foreach($this->nameSuggestReturn AS $key) { ?>
                        <?php if($key['status'] == 1) { ?>
                            <td align="center" >
                                <strong>.<?php echo $key['tld'];?></strong>
                                <br /><?php echo $this->lang('from')." ".$key['fromPrice'];?><br /><br />
                                <select name="<?php echo $key['tld'];?>-registrationTerm" disabled>
                                    <option value="-1"><?php echo $this->lang('Not Available'); ?> &nbsp;</option>
                                </select>
                            </td>
                        <?php } elseif($key['status'] == 0) { ?>
                            <td align="center" style="background:#E9F2F7;">
                                <strong>.<?php echo $key['tld'];?></strong>
                                <br /><?php echo $this->lang('from')." ".$key['fromPrice'];?><br /><br />
                                <select name="<?php echo $key['tld'];?>-registrationTerm" onchange="handleNameSuggestAttributes(this.options[this.selectedIndex].value, '<?php echo $key['tld'];?>');">
                                    <?php if($key['searchedFor'] != true) { ?>
                                        <option value="-1" selected>Select a term</option>
                                    <?php } ?>
                                    <?php foreach($key['price'] AS $price) { ?>
                                        <?php if($price['price'] !== ''){?>
                                            <option value="<?php echo $price['period'];?>"><?php echo $price['period'];?> <?php if($price['period'] == 1) { echo $this->lang("Year"); } else { echo $this->lang("Years"); } ?> - <?php echo $price['price'];?></option>
                                        <?php } ?>
                                    <?php } ?>
                                </select>
                            </td>
                        <?php } ?>
                      <?php } ?>
                  <?php } ?>
                  </tr>
              <?php } else { ?>
                  <tr>
                    <td class="label"><?php echo $this->lang("Registration Term");?>:</td>
                    <td><select name="<?php echo $this->requestTld;?>-registrationTerm">
                            <?php foreach($this->domainPricing AS $key) { ?>
                                <?php if($key['price'] !== ''){?>
                                    <option value="<?php echo $key['period'];?>"><?php if($key['period'] == 0) { echo $this->lang("One Time"); } elseif($key['period'] == 1) { echo $key['period'].' '.$this->lang("Year"); } else { echo $key['period'].' '.$this->lang("Years"); } ?> - <?php echo $key['price'];?></option>
                                <?php } ?>
                            <?php } ?>
                        </select>
                        <br /><span style="font-size:11px; color:#666;"><?php echo $this->lang("Select the Registration Term for this domain name.");?></span>
                    </td>
                   </tr>
              <?php } ?>
                </table>
            </div>  
            <?php if(isset($this->extraAttributes)) { ?>
                <?php foreach($this->extraAttributesReturn AS $key) { ?>
                <!-- Domain Extra Attributes options <?php echo $key['tld'];?> -->
                <div id="extraAttributes-<?php echo $key['tld'];?>" <?php if(!$key['visible']) {?> style="visibility:hidden; display:none;" <?php } ?>>
                    <h3><?php echo $this->lang("Additional Information Required for .".$key['tld']." Domains");?></h3>
                    <table class="ts2" cellspacing="0" style="margin-top:20px;">
                    <?php foreach($key['attributes'] AS $attribute => $value) { ?>
                        <tr>
                            <td class="label"><?php echo @$value['name'];?>:</td>
                            <td>
                            <?php if(@count($value['options']) == 0) { ?>
                                <input type="text" name="<?php echo $key['tld'];?>-EA-<?php echo $attribute;?>" size="40">
                            <?php } else { ?>
                                <select name="<?php echo $key['tld'];?>-EA-<?php echo $attribute;?>">
                                <?php foreach($value['options'] AS $option => $optionValue) { ?>
                                    <option qtip="<?php echo $optionValue['description']; ?>" value="<?php echo $optionValue['value'];?>"><?php echo $option;?></option>
                                <?php } ?>
                                </select>
                          <?php } ?>
                                <br /><span style="font-size:11px; color:#666;"><?php echo $value['description']; ?></span>
                            </td>
                        </tr>
                    <?php } ?>
                    </table>
                </div>
                <?php } ?>
        <?php } ?>
        
        <?php if ( (isset($this->domainAddons) && count($this->domainAddons) > 0) || ( isset($this->customFields) && count($this->customFields) > 0) ) { ?>
            <h3><?php echo $this->lang("Configure Product");?></h3>
            <p class="pagedesc">
                <?php if ( (isset($this->domainAddons) && count($this->domainAddons) > 0) && ( isset($this->customFields) && count($this->customFields) > 0) ) { ?>
                    <?php echo $this->lang("Please fill in the product fields below and check through our available add-ons. (* indicates a required field)");?>
                <?php } else if ( isset($this->customFields) && count($this->customFields) > 0) { ?>
                    <?php echo $this->lang("Please fill in the product fields below. (* indicates a required field)");?>
                <?php } else if ( isset($this->domainAddons) && count($this->domainAddons) > 0 ) {?>
                    <?php echo $this->lang("Please check through our available add-ons.");?>
                <?php } ?>
            </p>
        <?php } ?>
                
        <?php if ( count($this->customFields) > 0) { ?>
        <table class="ts2" cellspacing="0">
	<?php foreach ( $this->customFields as $field ) { ?>
            <tr>
	
		<td class="label"><?php if($field['required']) { echo '*'; } ?> <?php echo $this->lang($field['name']);?>:</td>
		<td>
			<?php if ( $field['type'] == typeTEXTFIELD ) { ?>
				<input value="<?php echo $field['savedValue']; ?>" class="<?php if($field['required']) { echo 'required'; } ?>" <?php if(isset($field['isDomain'])) { echo 'id="subDomain"'; } ?> name="PCT_<?php echo $field['id']; ?><?php if(isset($field['isDomain'])) { echo "_1"; } ?>" type="text" onkeypress="return noenter(event);"  />

                <?php if(isset($field['isDomain'])) { ?>
                    <?php if(isset($this->subDomains)) { ?>
                        . <select class="dropdown" id="subDomainTld" name="subDomainTld">
                            <option value="0"><?php echo $this->lang('Choose a Subdomain');?></option>
                            <?php foreach($this->subDomains AS $key) { ?>
                                <?php if ( strlen($key) > 0 ) { ?>
                                <option value="<?php echo $key; ?>"><?php echo $key; ?></option>
                                <?php } ?>
                            <?php } ?>
                        </select>
                    <?php } ?>
                    <a class="button small white" style="margin-bottom:0px;cursor:pointer;" id="buttonSubDomainCheck" onclick="checkAvailabilitySubDomain();"> <?php echo $this->lang('Check Availability'); ?> &raquo;</a>
                    <div id="subDomainSearchResults"></div>
                <?php } ?>

            <?php } else if ( $field['type'] == typeCOUNTRY ) { ?>
                    <select class="dropdown" name="PCT_<?php echo $field['id']; ?>">
                    <?php foreach ( $field['select_options'] as $option ) { ?>
                        <option value="<?php echo $option['value']; ?>" <?php echo ($option['value'] == $this->DefaultCountry)? 'selected="selected"' : ''; ?> ><?php echo $option['label']; ?></option>
                    <?php } ?>
                    </select>
			<?php } else if ( $field['type'] == typeYESNO ) { ?>
				<select class="dropdown" name="PCT_<?php echo $field['id']; ?>">
					<option value="1" <?php echo $field['selectedyes']; ?>><?php echo $this->lang('Yes'); ?></option>
					<option value="0" <?php echo $field['selectedno']; ?>><?php echo $this->lang('No'); ?></option>
				</select>
			<?php } else if ( $field['type'] == typeTEXTAREA ) { ?>
				<textarea name="PCT_<?php echo $field['id']; ?>" class="<?php echo $field['class']; ?>" style="display: inline-block; width: 300px; vertical-align: top;" cols="40" rows="6"><?php echo $field['savedValue']; ?></textarea>
			<?php } else if ( $field['type'] == TYPEDATE ) { ?>
				<span style="display: inline-block">
					<input class="<?php echo $field['class']; ?>" type="text" name="PCT_<?php echo $field['id']; ?>" id="PCT_<?php echo $field['id']; ?>" size="10" value="<?php echo $field['savedValue']; ?>" onkeypress="return noenter(event);" readonly=true>
					<script type="text/javascript">
                        $(document).ready(function(){
                            datefields.push("PCT_<?php echo $field['id']; ?>");
                        });
					</script>
				</span>
			<?php } else if ( $field['type'] == typeDROPDOWN ) { ?>
				<?php if ( isset($field['select_options']) ) { ?>
				<select name="PCT_<?php echo $field['id']; ?>" class="dropdown">
				<?php foreach ( $field['select_options'] as $option ) { ?>
					<option size="30" value="<?php echo $option['value']; ?>"<?php echo $option['selected']; ?>><?php echo $option['label']; ?></option>
				<?php } ?>
				</select>
				<?php } ?>
			<?php } ?>
			<?php if ( strlen(@$field['desc']) >0 ) { ?>
			<br />
			<span style="font-size:11px; color:#666;"><?php echo $this->lang($field['desc']);?></span>
			<?php } ?>
		</td>
	</tr>
	<?php } ?>
</table>
<script type="text/javascript">
    $(document).ready(function(){
        createExtJsDateFields();
    });
</script>
<?php } ?>
                
                
            <?php if(isset($this->domainAddons) && is_array($this->domainAddons)) { ?>
				<!-- Domain Addons options -->
				<div id="domainAddons">
					<h3><?php echo $this->lang("Domain Addons");?></h3>
					<table class="ts2" cellspacing="0" style="margin-top:20px;">
						<?php foreach ( $this->domainAddons as $addon ) { ?>
						<tr>
							<td class="label"><?php echo $this->lang($addon['name']);?>:</td>
							<td>
								<?php if ( @$addon['radio_buttons'] == '0' ) { ?>
								<select name="addonSelect_<?php echo $addon['id']; ?>" class="dropdown">
									<?php foreach ( $addon['prices'] as $price ) { ?>
									<option value="addon_<?php echo $addon['id']; ?>_<?php echo $price['price_id']; ?>_<?php echo $price['recurringprice_cyle']; ?>" <?php echo $price['price_selected']; ?>><?php echo $price['price']; ?></option>
									<?php } ?>
								</select>
								<?php } else { ?>
									<?php foreach ( $addon['prices'] as $price ) { ?>
								<span>
									<input type="radio" name="addonSelect_<?php echo $addon['id']; ?>" class="dropdown" id="addon_<?php echo $addon['id']; ?>_<?php echo $price['price_id']; ?>_<?php echo $price['recurringprice_cyle']; ?>" value="addon_<?php echo $addon['id']; ?>_<?php echo $price['price_id']; ?>_<?php echo $price['recurringprice_cyle']; ?>" style="background:none; border:0px;" <?php echo $price['price_selected']; ?>/>
									<?php echo $price['price']; ?>
								</span>
								<br/>
									<?php } ?>
								<?php } ?>
								<?php if ( strlen($addon['desc']) > 0 ) { ?>
								<br />
								<span style="font-size:11px; color:#666;"><?php echo $this->lang($addon['desc']);?></span>
								<?php } ?>
							</td>
						</tr>
				<?php } ?>
					</table>
				</div>
			<?php } ?>	
			<script type="text/javascript">
                            function submitDomainOnRegister()
                            {
 
              
                        <?php if($this->domainNameSuggest) { ?>
                                $("[name$='registrationTerm']").each(function(el){
                                    if ( $(this).val() > 0 ) {
//                                        jQuery('#domainForm').unbind('submit').submit();
				                          $("#domainForm").submit(); 
                                    }
                                });
                        <?php } else { ?>      
                                if('<?php echo $this->domainName;?>' == document.getElementById('registerName').value + '.' + document.getElementById('registerTld').options[document.getElementById('registerTld').selectedIndex].text) {
                                    //jQuery('#domainForm').unbind('submit').submit();
                                    $("#domainForm").submit(); 
                                } else{
                                    searchDomain(document.getElementById('registerName').value,document.getElementById('registerTld').options[document.getElementById('registerTld').selectedIndex].text, 'register', true); 
                                    return false;
                                }
                        <?php } ?>
                        
                            }
			</script>
            <a class="button small white" style="cursor:pointer" onclick="submitDomainOnRegister();"> <?php echo $this->lang('Continue'); ?> &raquo;</a>
			
        <?php } ?>
	<?php } elseif($this->searchType == 'transfer') { ?>
		<!-- Handle transfers -->
		<div id="domainRegistered">
                    <table class="ts2" cellspacing="0">
                        <tr>
                                <?php 
                                if ( $this->domainStatus == '1' ) { ?>
                                     <td colspan="6" style="font-size:16px; font-weight:bold; color:#090;" id="textAvailable"><?php echo $this->domainName." ".$this->lang('is available to transfer!'); ?></td>
                                <?php } else {?>
                                    <td colspan="6" style="font-size:16px; font-weight:bold; color:red;" id="textAlreadyRegistered"><?php echo $this->domainName." ".$this->lang('is not available to transfer!'); ?></td>
                                <?php                                
                                }
                                ?>                          
                        </tr>
                    </table>
		</div>
                <?php if ( $this->domainStatus == '1' ) { ?>
                <h3><?php echo $this->lang("Configure Product");?></h3>
        <p class="pagedesc">
	<?php if ( (isset($this->domainAddons) && count($this->domainAddons) > 0) && ( isset($this->customFields) && count($this->customFields) > 0) ) { ?>
		<?php echo $this->lang("Please fill in the product fields below and check through our available add-ons. (* indicates a required field)");?>
	<?php } else if ( isset($this->customFields) && count($this->customFields) > 0) { ?>
		<?php echo $this->lang("Please fill in the product fields below. (* indicates a required field)");?>
	<?php } else if ( isset($this->domainAddons) && count($this->domainAddons) > 0 ) {?>
            	<?php echo $this->lang("Please check through our available add-ons.");?>
        <?php } ?>
        </p>

		<div id="transferOptions">
			<h3><?php echo $this->lang("Transfer Options");?></h3>
			<table class="ts2" cellspacing="0" style="margin-top:20px;">
				<tr>
					<td class="label"><?php echo $this->lang("Transfer Term");?>:</td>
					<td><select name="transferTerm">
							<?php foreach($this->domainPricing AS $key) { ?>
								<?php if($key['transfer'] !== ''){?>
									<option value="<?php echo $key['period'];?>"><?php if($key['period'] == 0) { echo $this->lang("One Time"); } elseif($key['period'] == 1) { echo $key['period'].' '.$this->lang("Year"); } else { echo $key['period'].' '.$this->lang("Years"); } ?> - <?php echo $key['transfer'];?></option>
								<?php } ?>
							<?php } ?>
						</select>
						<br /><span style="font-size:11px; color:#666;"><?php echo $this->lang("Select the transfer term for this domain.");?></span></td>
				</tr>
				<tr>
					<td class="label"><?php echo $this->lang("EPP Code");?>:</td>
					<td><input type="text" name="eppCode"><br /><span style="font-size:11px; color:#666;"><?php echo $this->lang("Enter the EPP transfer code from your existing registrar here (if you have one).");?></span></td>
				</tr>
                                
                                <?php if ( $this->transferCheckList ) { ?>
                                <tr>
                                    <td class="label"><?php echo $this->lang("Is the domain unlocked?");?></td>
                                    <td><input type="checkbox" name="domain_unlocked" class="required"><br /><span style="font-size:11px; color:#666;"><?php echo $this->lang("Please ensure your domain is not locked.");?></span></td>
                                </tr>
                                <tr>
                                    <td class="label"><?php echo $this->lang("Is private registration turned off?");?></td>
                                    <td><input type="checkbox" name="private_registration" class="required"><br /><span style="font-size:11px; color:#666;"><?php echo $this->lang("Please ensure private registration is not turned on for your domain.");?></span></td>
                                </tr>
                                 <tr>
                                    <td class="label"><?php echo $this->lang("Do you have access to the e-mail address listed as the registrant?");?></td>
                                    <td><input type="checkbox" name="email_address" class="required"><br /><span style="font-size:11px; color:#666;"><?php echo $this->lang("Please ensure that you have access to the e-mail address that is listed as the registrant.");?></span></td>
                                </tr>
                                <?php } ?>
			</table>
		</div>                
        <?php if ( count($this->customFields) > 0) { ?>
<table class="ts2" cellspacing="0">
	<?php foreach ( $this->customFields as $field ) { ?>
	<tr>
	
		<td class="label"><?php if($field['required']) { echo '*'; } ?> <?php echo $this->lang($field['name']);?>:</td>
		<td>
			<?php if ( $field['type'] == typeTEXTFIELD ) { ?>
				<input value="<?php echo $field['savedValue']; ?>" class="<?php if($field['required']) { echo 'required'; } ?>" <?php if(isset($field['isDomain'])) { echo 'id="subDomain"'; } ?> name="PCT_<?php echo $field['id']; ?><?php if(isset($field['isDomain'])) { echo "_1"; } ?>" type="text" onkeypress="return noenter(event);"  />

                <?php if(isset($field['isDomain'])) { ?>
                    <?php if(isset($this->subDomains)) { ?>
                        . <select class="dropdown" id="subDomainTld" name="subDomainTld">
                            <option value="0"><?php echo $this->lang('Choose a Subdomain');?></option>
                            <?php foreach($this->subDomains AS $key) { ?>
                                <?php if ( strlen($key) > 0 ) { ?>
                                <option value="<?php echo $key; ?>"><?php echo $key; ?></option>
                                <?php } ?>
                            <?php } ?>
                        </select>
                    <?php } ?>
                    <a class="button small white" style="margin-bottom:0px;cursor:pointer;" id="buttonSubDomainCheck" onclick="checkAvailabilitySubDomain();"> <?php echo $this->lang('Check Availability'); ?> &raquo;</a>
                    <div id="subDomainSearchResults"></div>
                <?php } ?>

            <?php } else if ( $field['type'] == typeCOUNTRY ) { ?>
                    <select class="dropdown" name="PCT_<?php echo $field['id']; ?>">
                    <?php foreach ( $field['select_options'] as $option ) { ?>
                        <option value="<?php echo $option['value']; ?>" <?php echo ($option['value'] == $this->DefaultCountry)? 'selected="selected"' : ''; ?> ><?php echo $option['label']; ?></option>
                    <?php } ?>
                    </select>
			<?php } else if ( $field['type'] == typeYESNO ) { ?>
				<select class="dropdown" name="PCT_<?php echo $field['id']; ?>">
					<option value="1" <?php echo $field['selectedyes']; ?>><?php echo $this->lang('Yes'); ?></option>
					<option value="0" <?php echo $field['selectedno']; ?>><?php echo $this->lang('No'); ?></option>
				</select>
			<?php } else if ( $field['type'] == typeTEXTAREA ) { ?>
				<textarea name="PCT_<?php echo $field['id']; ?>" class="<?php echo $field['class']; ?>" style="display: inline-block; width: 300px; vertical-align: top;" cols="40" rows="6"><?php echo $field['savedValue']; ?></textarea>
			<?php } else if ( $field['type'] == TYPEDATE ) { ?>
				<span style="display: inline-block">
					<input class="<?php echo $field['class']; ?>" type="text" name="PCT_<?php echo $field['id']; ?>" id="PCT_<?php echo $field['id']; ?>" size="10" value="<?php echo $field['savedValue']; ?>" onkeypress="return noenter(event);" readonly=true>
					<script type="text/javascript">
                        $(document).ready(function(){
                            datefields.push("PCT_<?php echo $field['id']; ?>");
                        });
					</script>
				</span>
			<?php } else if ( $field['type'] == typeDROPDOWN ) { ?>
				<?php if ( isset($field['select_options']) ) { ?>
				<select name="PCT_<?php echo $field['id']; ?>" class="dropdown">
				<?php foreach ( $field['select_options'] as $option ) { ?>
					<option size="30" value="<?php echo $option['value']; ?>"<?php echo $option['selected']; ?>><?php echo $option['label']; ?></option>
				<?php } ?>
				</select>
				<?php } ?>
			<?php } ?>
			<?php if ( strlen(@$field['desc']) >0 ) { ?>
			<br />
			<span style="font-size:11px; color:#666;"><?php echo $this->lang($field['desc']);?></span>
			<?php } ?>
		</td>
	</tr>
	<?php } ?>
</table>
<script type="text/javascript">
              $(document).ready(function(){
                  createExtJsDateFields();
              });
</script>
<?php } ?>
                
                
            <?php if(isset($this->domainAddons) && is_array($this->domainAddons)) { ?>
				<!-- Domain Addons options -->
				<div id="domainAddons">
					<h3><?php echo $this->lang("Domain Addons");?></h3>
					<table class="ts2" cellspacing="0" style="margin-top:20px;">
						<?php foreach ( $this->domainAddons as $addon ) { ?>
						<tr>
							<td class="label"><?php echo $this->lang($addon['name']);?>:</td>
							<td>
								<?php if ( @$addon['radio_buttons'] == '0' ) { ?>
								<select name="addonSelect_<?php echo $addon['id']; ?>" class="dropdown">
									<?php foreach ( $addon['prices'] as $price ) { ?>
									<option value="addon_<?php echo $addon['id']; ?>_<?php echo $price['price_id']; ?>_<?php echo $price['recurringprice_cyle']; ?>" <?php echo $price['price_selected']; ?>><?php echo $price['price']; ?></option>
									<?php } ?>
								</select>
								<?php } else { ?>
									<?php foreach ( $addon['prices'] as $price ) { ?>
								<span>
									<input type="radio" name="addonSelect_<?php echo $addon['id']; ?>" class="dropdown" id="addon_<?php echo $addon['id']; ?>_<?php echo $price['price_id']; ?>_<?php echo $price['recurringprice_cyle']; ?>" value="addon_<?php echo $addon['id']; ?>_<?php echo $price['price_id']; ?>_<?php echo $price['recurringprice_cyle']; ?>" style="background:none; border:0px;" <?php echo $price['price_selected']; ?>/>
									<?php echo $price['price']; ?>
								</span>
								<br/>
									<?php } ?>
								<?php } ?>
								<?php if ( strlen($addon['desc']) > 0 ) { ?>
								<br />
								<span style="font-size:11px; color:#666;"><?php echo $this->lang($addon['desc']);?></span>
								<?php } ?>
							</td>
						</tr>
				<?php } ?>
					</table>
				</div>
			<?php } ?>	
	
		<script type="text/javascript">
                    function submitDomainOnTransfer()
                    {
                                        
                    if('<?php echo $this->domainName;?>' == document.getElementById('transferName').value + '.' + document.getElementById('transferTld').options[document.getElementById('transferTld').selectedIndex].text){
//                        jQuery('#domainForm').unbind('submit').submit();
                        $("#domainForm").submit(); 
                    }else{				
                        searchDomain(document.getElementById('transferName').value,document.getElementById('transferTld').options[document.getElementById('transferTld').selectedIndex].text, 'transfer', true); 
                        return false;
                    }
                    }
		</script>
                <a class="button small white" style="cursor:pointer;" id="submitButton" onclick="submitDomainOnTransfer();"> <?php echo $this->lang('Continue'); ?> &raquo;</a>
                <?php } ?>
    <?php } elseif($this->searchType == 'selfmanage') { ?>
                
    	<!-- Handle SelfManage Nameservers -->
		<div id="defaultNameservers">
			<h3><?php echo $this->lang("Our Nameservers");?></h3>
			<?php echo $this->lang('In order to use your Domain with our services you will need to configure the domain to point to the following DNS Nameservers');?>:
			<table class="ts2" cellspacing="0" style="margin-top:20px;">
				<?php foreach($this->defaultNameservers AS $nameserver) { ?>
					<tr>
						<td><strong><?php echo $nameserver['hostname'];?></strong></td>
					 </tr>
				<?php } ?>
			</table>
		</div>
    
	<?php } ?>   
<?php } ?>