<?php get_header(); ?>

	<div id="content" class="searchresults">

        <div id="sponsored-links-wide">
                <?php include(TEMPLATEPATH . "/adwide.php"); ?>
        </div>

	<?php if (have_posts()) : ?>

		<h1 class="pagetitle">Search results</h1>
		
		<?php include (TEMPLATEPATH . "/searchform.php"); ?>

		<div class="navigation"><div class="previous"><?php previous_posts_link('&laquo; Previous results') ?></div><div class="next"><?php next_posts_link('Next results &raquo;') ?></div></div>

		<?php while (have_posts()) : the_post(); ?>
		<div class="post" id="post-<?php the_ID(); ?>">
				<h1 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
				<div class="postmetadata">by <?php the_author() ?> — published on <?php the_time('F jS, Y') ?> <?php edit_post_link('Edit this entry','',''); ?></div>
				
				<div class="entry">
					<?php //the_content('Read the rest of this entry &raquo;'); // FIXME: i should create a function the_search_excerpt like the excerpt that takes the text from the article, trims all the tags (skipping all filters for the_content in order to skip the bsuite hiliter) and hilites search terms in results, copying the code from bsuite hiliter for that purpose, a la google.  plus define a right and proper hilite style system.  submit that function to the wordpress devs. ) ?>
					<?php the_excerpt(); ?>
				</div>
		<!--
				<div class="postmetadata">
				<div class="comments-slug">
				<?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?>
				</div>
				<div class="categories-slug">
				categories: <?php the_category(', ') ?>
				</div>
				</div>-->

			</div>
	
		<?php endwhile; ?>

		<div class="navigation"><div class="previous"><?php previous_posts_link('&laquo; Previous results') ?></div><div class="next"><?php next_posts_link('Next results &raquo;') ?></div></div>


	<?php else : ?>

		<h1 class="pagetitle">Oops... not found!</h1>
		<?php include (TEMPLATEPATH . '/searchform.php'); ?>

	<?php endif; ?>
		
	</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>
