<div class="colsitem"><?php if ($pname) { ?><div class="titlephoto"><?php echo $pname ?></div><?php } ?><a id="thumb<?php echo $photoid ?>" href="<?php echo $filepath ?>photos/<?php echo $photoid ?>.jpg" onclick="return hs.expand(this, { slideshowGroup: <?php echo $id ?> } )">
<img src="<?php echo $codepath ?>includes/image.php?image=<?php echo $imagepath ?>photos/<?php echo $photoid ?>.jpg&amp;nwidth=400" alt="<?php echo $photo ?> <?php echo $phcount ?>" title="<?php echo $photo ?>" class="pphoto"></a></div>