<div class="box">
  <div class="box-heading"><?php echo $heading_title; ?></div>
  <div class="box-content">
    <?php if ($blog_keyword) { ?>
      <input type="text" value="<?php echo $blog_keyword; ?>" id="filter_blog_keyword" />
    <?php } else { ?>
      <input type="text" value="<?php echo $text_keyword; ?>" id="filter_blog_keyword" onclick="this.value = '';" onkeydown="this.style.color = '#000000'" style="color: #999;" />
    <?php } ?><br /><br />
	<?php if ($filter_blog_title) { ?>
      <input type="checkbox" name="filter_blog_title" value="1" id="filter_blog_title" checked="checked" />
    <?php } else { ?>
      <input type="checkbox" name="filter_blog_title" value="1" id="filter_blog_title" />
    <?php } ?>
    <label for="filter_blog_title"><?php echo $text_blog_title; ?></label><br />
	<?php if ($filter_blog_description) { ?>
      <input type="checkbox" name="filter_blog_description" value="1" id="filter_blog_description" checked="checked" />
    <?php } else { ?>
      <input type="checkbox" name="filter_blog_description" value="1" id="filter_blog_description" />
    <?php } ?>
    <label for="filter_blog_description"><?php echo $text_blog_description; ?></label>
	<br /><br /><a onclick="moduleBlogSearch();" class="button"><span><?php echo $button_search; ?></span></a>
  </div>
</div>
<script type="text/javascript"><!--
$('#search input').keydown(function(e) {
	if (e.keyCode == 13) {
		moduleSearch();
	}
});

function moduleBlogSearch() {	
	url = '<?php echo HTTP_SERVER; ?>';
		
	url += 'index.php?route=extras/blog_search';
		
	var filter_blog_keyword = $('#filter_blog_keyword').attr('value')
	
	if (filter_blog_keyword) {
		url += '&blog_keyword=' + encodeURIComponent(filter_blog_keyword);
	}
	
	var filter_blog_title = $('.box-content input[name=\'filter_blog_title\']:checked').attr('value');
	
	if (filter_blog_title) {
		url += '&filter_blog_title=true';
	}	
	
	var filter_blog_description = $('.box-content input[name=\'filter_blog_description\']:checked').attr('value');
	
	if (filter_blog_description) {
		url += '&filter_blog_description=true';
	}
	
	location = url;
}
//--></script>
