<?php get_header(); ?>

<div class="content">
  <?php $i = 1; ?>
	<?php if (have_posts()) : ?>
   <?php while (have_posts()) : the_post(); ?>
     <?php if ($i == 1 && !in_category(17) ) { ?>
    
   <div class="post one" id="post-<?php the_ID(); ?>">
   	<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> <span class="chrondate"><?php the_author_posts_link('nickname') ?></span></h2>
		<div class="entrymeta"><p>Stamped: <?php the_date() ?> <? the_time() ?> | <?php edit_post_link('e','',''); ?> <?php comments_popup_link('0', '1', '%'); ?><br />
		                          Tagged: <?php if (function_exists('UTW_ShowTagsForCurrentPost')) {  UTW_ShowTagsForCurrentPost("commalist"); } ?></p></div>
	   <div class="entry">
      <?php the_content("[...]"); ?> 
		</div><!-- end entry -->
	</div>		
	
	<?php comments_template(); ?>
	<script>
    function toggle(obj) {
    	var el = document.getElementById(obj);
    	el.style.display = (el.style.display != 'none' ? 'none' : '' );
    }
  </script>		
	<div class="leftcontent">		
	  <h3 class="widgettitle">Previous Posts</h3>
	   <?php } elseif (in_category(17)) { ?>
		 
   <div class="post aside" id="post-<?php the_ID(); ?>" style="padding-bottom:0em;">
   	<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> <span class="chrondate"><?php the_author_posts_link('nickname') ?></span></h3>
	   <div class="entry">
      <?php the_content("[...]"); ?> 
		</div><!-- end entry -->
	</div>

		 <?php } else { ?>
		
   <div class="post notone" id="post-<?php the_ID(); ?>" style="padding-bottom:0em;">
   	<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> <span class="chrondate"><?php the_author_posts_link('nickname') ?></span> <a href="javascript:toggle('entry<?php the_ID(); ?>')">&raquo;</a></h3>
		<div class="entry" id="entry<?php the_ID(); ?>" style="display:none;">
      <?php the_content("[...]"); ?> 
		</div><!-- end entry -->
		<div class="entrymeta"><p><?php the_date('n-j-Y') ?> <? the_time() ?> | <?php edit_post_link('e','',''); ?> <?php comments_popup_link('0', '1', '%'); ?><br />
		                          <?php if (function_exists('UTW_ShowTagsForCurrentPost')) {  UTW_ShowTagsForCurrentPost("commalist"); } ?></p></div>
	</div>

	   <?php } if (!in_category(17)) { $i++; }?>
  	<?php endwhile; ?>
  </div>
  <div class="rightcontent">
		<?php get_sidebar(); ?>
	</div>
	<?php else : ?>
	
	<h2>What you seek is misplaced or lost</h2>

<p>You seemed to have found a mislinked file, page, or search query with no results. If you feel you have reached this page in error, double check the URL and try again. If you insist that what you are looking for should exist on this very page, reread this statement and try again.</p>

	<?php endif; ?>
	
		<div class="clear"></div>	
		<div class="nextprevious">
			<div class="alignleft"><p><?php next_posts_link('&laquo; Previous') ?></p></div>
			<div class="alignright"><p><?php previous_posts_link('Next &raquo;') ?></p></div>
		<div class="clear"></div>
		</div>
	
</div><!-- end content -->

</div><!-- close page -->
<?php include (TEMPLATEPATH . "/bottom_index.php"); ?>
<?php get_footer(); ?>