I'm trying to produce a loop that loads a random image from the posts, although also locating the excerpt of the specific page. I've done the random publish part, but cannot have it to retrieve the page excerpt... I believe I might need to query the web pages in their own individual loop but I am unsure how to get this done. I've installed the function to obtain page excerpt support etc. however i think I'm doing a problem inside the loop, any help could be appreciated.

<div class="postimage">
<?php if (have_posts()) :
while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('blog-post-image'); ?></a>
  <div class="borderimage"></div>
  <div class="tagline"><h1><?php the_excerpt('$page_id=8'); ?> </h1>
<?php endwhile; else : endif; ?>

query_posts replaces the worldwide $wp_query, which you won't want to do since you need to keep that question for the page. Do this rather...

if (have_posts()){
        the_post(); //global $post now has the page in it
        $args = array("posts_per_page"=>1,"orderby"=>"rand");
        $random_posts = get_posts($args); //returns an array
        $random_post = $random_posts[0];
        //do your stuff... 
        //$post contains the original page
        //$random_post contains the random post