<div class="relatedposts">

<?php
$categories = get_the_category($post->ID);
if ($categories) {
	$category_ids = array();
	foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
	$args=array(
		'category__in' => $category_ids,
		'post__not_in' => array($post->ID),
		'showposts'=>3, // Number of related posts that will be shown.
		'caller_get_posts'=>1
	);
	$my_query = new wp_query($args);
	if( $my_query->have_posts() ) {
		echo '<h3>Related Products</h3><ul>';
		while ($my_query->have_posts()) {
		$my_query->the_post();
?>
			<li>
			<?php $thumb = get_post_meta($post->ID, 'Thumbnail', $single = true); ?>
			<?php if($thumb !== '') { ?>
			<a href="<?php the_permalink() ?>"><img style="border: none;" alt="" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $thumb; ?>&amp;h=55&amp;w=55&amp;zc=1" /></a>
			<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>

			<?php } else { echo ''; } ?>
			<?php } echo '</ul>'; }
			} ?>
</div>