<?php if ($pid=='') { 
$pid="1";
}?>
<?php if ($photopath=='') { 
$photopath="home/";
}?>
<div style="width: 100%;">

<img src="image.php?image=<?php echo $photoroot ?>/flash/<?php echo $photopath ?><?php echo $pid ?>.jpg" width="100%" alt="">

</div>