wp_nonce_field($nonce_action);
?>

<div id="poststuff">
<div id="moremeta">
<div id="grabit" class="dbx-group">

<fieldset id="categorydiv" class="dbx-box">
<h3 class="dbx-handle"><?php 
_e('Categories');
?>
</h3>
<div class="dbx-content">
<p id="jaxcat"></p>
<ul id="categorychecklist"><?php 
dropdown_link_categories(get_option('default_link_category'));
?>
</ul>
</div>
</fieldset>

<fieldset class="dbx-box">
<h3 class="dbx-handle"><?php 
_e('Target');
?>
</h3>
<div class="dbx-content">
<label for="link_target_blank" class="selectit">
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php 
echo $link->link_target == '_blank' ? 'checked="checked"' : '';
?>
	<p id="link-category-add" class="wp-hidden-child">
		<input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" />
		<input type="button" id="category-add-sumbit" class="add:categorychecklist:linkcategorydiv button" value="<?php _e( 'Add' ); ?>" />
		<?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?>
		<span id="category-ajax-response"></span>
	</p>
</div>

<ul id="category-tabs">
	<li class="ui-tabs-selected"><a href="#categories-all"><?php _e( 'All Categories' ); ?></a></li>
	<li class="wp-no-js-hidden"><a href="#categories-pop"><?php _e( 'Most Used' ); ?></a></li>
</ul>

<div id="categories-all" class="ui-tabs-panel">
	<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
		<?php dropdown_link_categories(); ?>
	</ul>
</div>

<div id="categories-pop" class="ui-tabs-panel" style="display: none;">
	<ul id="categorychecklist-pop" class="categorychecklist form-no-clear">
		<?php wp_popular_terms_checklist('link_category'); ?>
	</ul>
</div>

</div>
</div>

<?php do_meta_boxes('link', 'normal', $link); ?>

<h2><?php _e('Advanced Options'); ?></h2>