<input type="text" name="search" id="livesearchinput" class="searchbox" onfocus="this.value=''" onkeyup="loadKBArticles(event, this, true, '');" value="Search..." />
<p class="searchdesc"><?php echo $this->lang("Live article search - please enter 4 or more characters to begin.")." "; ?><span id="kb_wrap_searchingarticles" class="searchdesc" style="display:none;"><?php echo $this->lang('Searching...'); ?></span></p>
<div id="kb_wrap" style="padding-top:10px;"></div>
<div id="kb_wrap_buttons" style="display:none;" class="buttonsbox"><?php echo $this->lang("Couldn't find what you were looking for?"); ?>&nbsp;<a href="#"><?php echo $this->lang("Submit a Ticket"); ?></a></div>


<h3 style="margin-top:20px;">
	<a href="index.php?fuse=knowledgebase&amp;view=KB_MainView&amp;public=1"><?php echo $this->lang("Top");?></a> /
	<?php if(@$this->parentCategoryName) { ?>
    	<a href="index.php?fuse=knowledgebase&amp;view=KB_CategoriesView&amp;categoryId=<?php echo $this->parentCategoryID;?>&amp;public=1"><?php echo $this->parentCategoryName;?></a> /
	<?php } // End parentCategoryName ?>
	<a href="index.php?fuse=knowledgebase&amp;view=KB_CategoriesView&categoryId=<?php echo $this->category['categoryId'];?>&amp;public=1"><?php echo $this->category['categoryName'];?><!-- (<?php echo $this->category['categoryCounter'];?>) --></a>
</h3>

<?php if($this->category['categoryDescription']) { ?>
	<p><?php echo $this->category['categoryDescription']; ?></p>
<?php } // End if ?>

  
<?php if(count($this->category['articles']) > 0) { ?>
	<h4><?php echo $this->lang('Article List'); ?></h4>
	<ul class="artlist">
    <?php foreach($this->category['articles'] as $article) { ?>
        <li><img src="templates/<?php echo $this->gTemplateName; ?>/images/public/icon_article.png" alt="icon" class="icon" /> <a href="index.php?fuse=knowledgebase&amp;view=KB_viewArticle&amp;articleId=<?php echo $article['articleCategoryId']; ?>"><?php echo $article['articleCategoryName']; ?></a><?php if($article['articleExcerpt']) { echo "<br>".$article['articleExcerpt']; } ?></li>
<?php } ?>
	</ul>
<?php } else { ?>
    <?php echo $this->lang("There are no articles to display in this category.");?>
<?php } // End Articles ?>

<?php if(count($this->subCategories) > 0) { ?>
	<h4><?php echo $this->lang('Subcategories'); ?></h4>
	<?php foreach($this->subCategories AS $category) { ?>
		<div class="<?php echo $category['categoryDivClass'];?>">
			<div class="viewall right"><a href="index.php?fuse=knowledgebase&amp;view=KB_CategoriesView&amp;categoryId=<?php echo $category['categoryId']; ?>&amp;showall=1"><?php echo $this->lang("View all articles"); ?> &raquo;</a></div>
			<h3 class="cattitle"><img src="templates/<?php echo $this->gTemplateName; ?>/images/kb/folder.png" alt="icon" class="icon" />&nbsp;<a href="index.php?fuse=knowledgebase&amp;view=KB_CategoriesView&amp;categoryId=<?php echo $category['categoryId']; ?>&amp;showall=1"><?php echo $category['categoryName']; ?></a><!-- (<?php echo $category['categoryCounter']; ?>)--></h3>

			<ul class="catbox">
				<?php if (count($category['articles'])==0) { ?>
					<li class="none"><?php echo $this->lang("No Articles"); ?></li>
				<?php } else { ?>
					<?php foreach ($category['articles'] as $article) { ?>
							<li><img src="templates/<?php echo $this->gTemplateName; ?>/images/public/icon_article.png" alt="icon" class="icon" /> <a href="index.php?fuse=knowledgebase&amp;view=KB_viewArticle&amp;articleId=<?php echo $article['articleCategoryId']; ?>"><?php echo $article['articleCategoryName']; ?></a></li>
					<?php } //end loop through articles ?>
				<?php } //end if no articles ?>
			</ul>
		</div>
	<?php } // End Sub Categories Loop ?>
	
    <div class="clear"></div>
    
<?php } // End Sub Categories ?> 