title: Delay displaying of page until everything is loaded
body: <p>I have a page that has a lot going on, and when it finishes loading it looks fine, but I would like for it to load all of the images, etc, then display the page?  Might be another way around this.</p>
  
  <p><a href="http://www.randykrohn.com/gallery/pictures.php?EventID=279" rel="nofollow">http://www.randykrohn.com/gallery/pictures.php?EventID=279</a></p>
  
  <p>Here is the code for the page</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;!-- InstanceBegin template="/Templates/Primary.dwt.php" codeOutsideHTMLIsLocked="false" --&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;!-- InstanceBeginEditable name="doctitle" --&gt;
  &lt;title&gt;Dragboats.com - Photo Gallery -&lt;/title&gt;
  &lt;!-- InstanceEndEditable --&gt;
  &lt;script type="text/javascript" src="../includes/CSSMenuWriter/cssmw/menu.js"&gt;&lt;/script&gt;
  &lt;link href="../includes/CSSMenuWriter/cssmw/menu.css" rel="stylesheet" type="text/css" /&gt;
  &lt;!--[if lte IE 6]&gt;
  &lt;link rel="stylesheet" type="text/css" media="all" href="/includes/CSSMenuWriter/cssmw/menu_ie.css" /&gt;
  &lt;![endif]--&gt;
  &lt;style type="text/css" media="all"&gt;
  &lt;!--
  html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
  }
  
  body {
      background-color: #FEFD8F;
      color: #000;
      font-family: Arial, Helvetica, sans-serif;
      font-size: 12px;
      line-height: 14px;
      margin: 0 0 0 0;
      padding: 0 0 0 0;
      text-align: center;
      background-image: url(http://&lt;?php echo $_SERVER['SERVER_NAME']; ?&gt;/images/main_back.png);
      background-repeat: repeat-x;
  }
  
  h1 {
    color: #FEFD8F;
    background-color:#FF6600;
    margin: 0px 0px 0px 10px;
    font-size: 12px;
    font-weight: bold;
    line-height: 20px;
    text-transform:uppercase;
  }
  
  h2 {
      padding-top: 7px;
      margin: 0px 0px 0px 10px;
      color: #FEFD8F;
      font-size: 12px;
      font-weight: bold;
  }
  
  a,  a:link {
    color: #000;
    font-weight: bold;
    text-decoration: none;
  }
  
  a:visited {
    color:#5E2F00;
    font-weight: bold;
    text-decoration: none;
  }
  
  a:hover {
    color: #fe6d00;
    text-decoration: none;
  }
  
  a:focus {
    color: #fe6d00;
  }
  
  a:active {
    color: #fe6d00;
  }
  
  #outerWrapper {
    margin: 0 auto 0 auto; 
    max-width: 1024px;
    min-width: 1024px;
    text-align: left;
    width: 1024px;
  }
  #outerWrapper #header {
    font-size: 14px;
    font-weight: bold;
    padding: 0px 0px 0px 0px;
  }
  #outerWrapper #header img {
    float: left;
  }
  
  #outerWrapper #contentWrapper .clearFloat {
    clear: both;
    display: block;
  }
  #outerWrapper #footer {
      padding: 11px 0px 0px 0px;
      width: 1024px;
      height: 52px;
      background-image:url(http://&lt;?php echo $_SERVER['SERVER_NAME']; ?&gt;/images/footer.png);
      background-repeat:no-repeat;
      text-align:center;
  }
  
  hr {
    width: 95%;
    height: 2px;
    padding-top: 2px;
    padding-left: 10px;
    padding-bottom: 2px;
  }
  #navbarWrapper {
      display: block;
      width: 1024px;
      height: 30px;
      clear: both;
      margin: 0px; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
      padding: 0px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
      background-image: url(http://&lt;?php echo $_SERVER['SERVER_NAME']; ?&gt;/includes/CSSMenuWriter/cssmw_images/bg.png);
      background-repeat: repeat-x;
      background-position: left top;
      }
  --&gt;
  &lt;/style&gt;
  &lt;style type="text/css" media="print"&gt;
  &lt;!--
  
  body {
    background-color: #fff;
    background-image: none;
    border-color: #000; 
    color: #000;
  }
  --&gt;
  &lt;/style&gt;
  &lt;!--[if IE 5]&gt;
  &lt;style type="text/css"&gt; 
  #outerWrapper #contentWrapper #leftColumn1 {
    width: 170px;
  }
  #outerWrapper #contentWrapper #rightColumn1 {
    width: 170px;
  }
  &lt;/style&gt;
  &lt;![endif]--&gt;
  &lt;!--[if IE]&gt;
  &lt;style type="text/css"&gt; 
  #outerWrapper #contentWrapper #content {
    zoom: 1;
  }
  &lt;/style&gt;
  &lt;![endif]--&gt;
  &lt;!-- InstanceBeginEditable name="head" --&gt;
  &lt;title&gt;Dragboats.com - Photo Gallery - &lt;?php echo $pageTitle; ?&gt;&lt;/title&gt;
  &lt;link rel="stylesheet" type="text/css" href="../includes/styles/full.css"/&gt;
  &lt;link rel="stylesheet" type="text/css" href="../includes/styles/main.css"/&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="../includes/fancybox/jquery.fancybox-1.3.4.pack.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="../includes/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript" src="../includes/jcarousel/lib/jquery.jcarousel.min.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="../includes/jcarousel/skins/tango/skin.css" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript" src="../includes/UI/js/jquery-ui-1.8.7.custom.min.js"&gt;&lt;/script&gt;
  &lt;link type="text/css" href="../includes/UI/css/custom-theme/jquery-ui-1.8.7.custom.css" rel="stylesheet" /&gt;
  &lt;style type="text/css" media="screen"&gt;
  &lt;!--
  #specItems { margin:0 15px 0 15px; padding:0; overflow:auto; color:#222; background:#fff;}
  #specItems ul {margin:0; padding:0; list-style:none; white-space:nowrap; display:table-row;}
  #specItems ul li {display:table-cell; padding:0 3px; background:#fff; vertical-align:top;}
  #specItems ul li div {
      -moz-border-radius: 5px;
      -webkit-border-radius: 5px;
      padding: 5px 5px 5px 8px;
      border: thin solid #FF6D00;
  }
  #specItems ul li div p {margin:2px 4px 0 0; padding:0; font-size:11px; color: #000; font-weight: bold; text-align: center; }
  
  #sizes { margin:0 15px 0 15px; padding:0; overflow:auto; color:#222; background:#fff;}
  #sizes ul {margin:0; padding:0; list-style:none; white-space:nowrap; display:table-row;}
  #sizes ul li {display:table-cell; padding:0 3px; background:#fff; vertical-align:top;}
  #sizes ul li div { border: thin solid #FF6D00;}
  #sizes ul li div p {margin:2px 4px 0 0; padding:0; font-size:11px; color: #F00; font-weight: bold; text-align: right; }
  #sizes ul li .heading { text-align: center; font-weight: bold; font-size: 12px; border-color: #FFF;}
  
  #tip7-title { text-align: left; }
  
  #tip7-title b { display: block; margin-right: 80px; }
  
  #tip7-title span { float: right; }
  
  .pictureThumb {
      float: right;
  }
  .thumbWrapper p {
      width: 130px;
  }
  .thumbWrapper {
      width: 140px;
      text-align: left;
  }
  .comment {
      background: #F3F3C1 url(../../images/comment_grad.gif) repeat-x;
      background-position: 0 0;
      margin: 0 0 0 273px;
      padding: 10px;
      border: 1px #999966 solid;
      border-bottom: none;
      font-size: 12px;
      width: 458px;
  }
  
  .comment-footer {
      background: url(../../images/comment_footer2.gif) no-repeat;
      background-position: 0 0;
      margin: 0 0 0 273px;
      padding: 5px 0 0 38px;
      width: 483px;
      height: 35px;
      font-size: 11px;
  }
  .feature_comment-footer {
        background: url(../../images/feature_comment_footer2.gif) no-repeat;
        background-position: 0 0;
        margin: 0 0 0 273px;
        padding: 5px 0 0 38px;    
        width: 483px;
        height: 35px;
        font-size: 11px;
  }
  .posterInfo {
      margin: 0 0 0 0;
      font-weight: bold;
      line-height: 20px;
      color: #F60;
      font-style: italic;
  }
  .buttonHolder {
      width: 760px;
      text-align: right;
      display: block;
      clear: both;
      margin-bottom: 10px;
      font-size: 9px; 
  }
  .buttonHolder img {
      vertical-align: text-top;
  }
  --&gt;
  &lt;/style&gt;
  &lt;script&gt;
  function fbs_click(u, t) {
      window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&amp;t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
      return false;}
  
  //function formatTitle(title, currentArray, currentIndex, currentOpts) {
   //   var titleSplit = title.split("~~");
  //  var pathSplit = titleSplit[0].split("_");
  //  return '&lt;div id="tip7-title"&gt;&lt;span&gt;&lt;img src="../images/photo_comment.png" border="none" alt="Comment on this photo"/&gt;&lt;a href="javascript:;" onclick="return fbs_click(\'http://&lt;?php echo $_SERVER['SERVER_NAME']; ?&gt;/gallery/picture.php?imgID=' + titleSplit[0] + '\', \'Dragboats.com Photo\' )"&gt;&lt;img src="../images/facebook_l.jpg" border="none" /&gt;&lt;/a&gt;&lt;a href="javascript:;" onclick="addToCart(\'' + titleSplit[0] + '\')"&gt;&lt;img src="../images/addToList.jpg" border="none" class="addToCart" alt="Add This Image To Your Cart"/&gt;&lt;/a&gt;&lt;/span&gt;' + (titleSplit[1] &amp;&amp; titleSplit[1].length ? '&lt;b&gt;' + titleSplit[1] + '&lt;/b&gt;' : '' ) + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '&lt;/div&gt;';
  //}
  
  jQuery(document).ready(function() {
      jQuery('#mycarousel').jcarousel({
          //easing: 'BounceEaseOut',
          scroll: 6,
          animation: 800
      })
  
    //$('.infiniteCarousel').infiniteCarousel();
  
    $("a.pictureThumb").fancybox({
          'type'  : 'image',
          'padding' : '4',
          'overlayColor': '#000000',
          'width': 810,
          'height': 535,
          //'titlePosition' : 'outside',
          //'titleFormat'     : formatTitle,
          //'autoScale'       : true,
          //'autoDimension' : true,
          'transitionIn'  :   'elastic',
          'transitionOut' :   'elastic',
          'speedIn'       :   300, 
          'speedOut'      :   200, 
          'hideOnOverlayClick' : true, 
          'hideOnContentClick': false 
      });
      $("a.calendar_sample").fancybox({
          'type' : 'iframe',
          'width' : 840,
          'height' : 640,
          'overlayColor': '#000000',
          'transitionIn'  :   'elastic',
          'transitionOut' :   'elastic',
          'autoDimensions' :  'true',
          'speedIn'       :   300, 
          'speedOut'      :   200, 
          'hideOnOverlayClick' : false, 
          'hideOnContentClick': false, 
          'centerOnScroll': true
          //'onClosed': function() { parent.location.reload(true); ; } 
      });
      $("a.keychain_sample").fancybox({
          'type' : 'iframe',
          'width' : 660,
          'height' : 560,
          'overlayColor': '#000000',
          'transitionIn'  :   'elastic',
          'transitionOut' :   'elastic',
          'autoDimensions' :  'true',
          'speedIn'       :   300, 
          'speedOut'      :   200, 
          'hideOnOverlayClick' : false, 
          'hideOnContentClick': false, 
          'centerOnScroll': true
          //'onClosed': function() { parent.location.reload(true); ; } 
      });
      $("a.vertcal_sample").fancybox({
          'type' : 'iframe',
          'width' : 445,
          'height' : 740,
          'overlayColor': '#000000',
          'transitionIn'  :   'elastic',
          'transitionOut' :   'elastic',
          'autoDimensions' :  'true',
          'speedIn'       :   300, 
          'speedOut'      :   200, 
          'hideOnOverlayClick' : false, 
          'hideOnContentClick': false, 
          'centerOnScroll': true
          //'onClosed': function() { parent.location.reload(true); ; } 
      });
      $("a.pictureComment").fancybox({
          'type' : 'iframe',
          'width': 400,
          'height' : 280,
          'transitionIn'  :   'elastic',
          'transitionOut' :   'elastic',
          'overlayColor': '#000000',
          'autoDimensions' :  'false',
          'speedIn'       :   300, 
          'speedOut'      :   200, 
          'hideOnOverlayClick' : false, 
          'hideOnContentClick': false, 
          'centerOnScroll': true,
          'onClosed': function() { parent.location.reload(true); } 
      });
      $("a.addToCart").fancybox({
          'type' : 'iframe',
          'width': 830,
          'height' : 520,
          'transitionIn'  :   'elastic',
          'transitionOut' :   'elastic',
          'overlayColor': '#000000',
          'autoDimensions' :  'false',
          'speedIn'       :   300, 
          'speedOut'      :   200, 
          'hideOnOverlayClick' : false, 
          'hideOnContentClick': false, 
          'centerOnScroll': true
          //'onClosed': function() { parent.location.reload(true); ; } 
      });
      $(".showComment.hidden").live('click', function () { 
          //alert(this.id);
          //var adID = this.id.split('_');
          if($('#Comments').is(":visible")) {
              $('#Comments').fadeOut(600);
          }
          $.ajax({
              type: "POST",
              url: "../gallery/comments.php",
              data: "ID="+ this.id,
              success: function(r){
              //alert(r);
              //var allCommentInfo = r.split('_');
              var commentsHolder = 'Comments';
              var eachComment = r.split("**");
              var commentContainer = '';
              arLen = eachComment.length;
              //alert(arLen);
              if(arLen &gt; 1){
              var commentDetails = new Array();
              commentContainer += '&lt;div class="buttonHolder"&gt;&lt;p&gt;&lt;span id="comments-hide" style="cursor: pointer"&gt;CLOSE COMMENTS &lt;img src="../images/close.png" title="Close Comments"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;';
              for (var i=0; i&lt;(arLen - 1); i++){
                  commentDetails = eachComment[i].split("~");
                  //alert(i);
                  commentContainer += '&lt;div class="comment"&gt;';
                  commentContainer += "&lt;p&gt;" + commentDetails[2] + '&lt;/p&gt;&lt;/div&gt;';               
                  commentContainer += "&lt;div class='comment-footer'&gt;";
                  commentContainer += '&lt;div&gt;&lt;p&gt;&lt;span class="posterInfo"&gt;(Posted By: ' + commentDetails[0] + ') - &lt;/span&gt;' + commentDetails[1] + '&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'
  
              }
          if($('#Comments').is(":visible")) {
              $('#Comments').fadeOut(600, function() {
                  $("#Comments").html(commentContainer);
                  $("#Comments").slideDown(600, function() {
              $("#Comments").fadeIn(600);
              });
              });
  
          } else {
          $("#" + commentsHolder).html(commentContainer);
          $("#" + commentsHolder).slideDown(600);
          }
          //alert("#" + allCommentInfo[0] + "ReadText_" + allCommentInfo[1])
              }
          }
  //End  Ajax Callback
  });
  //$(this).removeClass('hidden').addClass('shown');
  //End Main Callback
  });
  //End Document Ready
  $('#comments-hide').live('click', function(){
      $("#Comments").slideUp(600);
      });
  });
  &lt;/script&gt;
  &lt;!-- InstanceEndEditable --&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;!-- InstanceBeginEditable name="Tooltip" --&gt;
  
  &lt;!-- InstanceEndEditable --&gt;
  &lt;div id="outerWrapper"&gt;
    &lt;div id="header"&gt;
  &lt;img src="../images/r1c1.jpg" alt="" width="312" height="73" /&gt;&lt;img src="../images/r1c2.jpg" alt="" width="397" height="73" /&gt;&lt;img src="../images/r1c3.jpg" alt="" width="315" height="73" /&gt;
  &lt;img src="../images/r2c1.jpg" alt="" width="312" height="69" /&gt;&lt;img src="../images/r2c2.jpg" alt="" width="397" height="69" /&gt;&lt;img src="../images/r2c3.jpg" alt="" width="315" height="69" /&gt;
  &lt;/div&gt;
    &lt;div id="navbarWrapper"&gt;
      &lt;?php require_once( $_SERVER['DOCUMENT_ROOT'] . "/includes/CSSMenuWriter/cssmw/menu.php"); ?&gt;
  &lt;/div&gt;
  &lt;!-- InstanceBeginEditable name="Content Area" --&gt;
  &lt;div id="ContentHeader"&gt;&lt;/div&gt;
  &lt;div id="contentWrapper"&gt;
    &lt;div id="leftColumn1"&gt;
      &lt;div class="columnHeadings"&gt;
        &lt;h2&gt;Photo Gallery Images - &lt;?php echo $pageTitle; ?&gt;&lt;/h2&gt;
        &lt;/div&gt;
      &lt;div class="fullWidthDiv"&gt;Below is a set of images from the gallery you chose.  To see additional images, click on the links at the bottom of this section to select the next group of images.&lt;/div&gt;
      &lt;div class="infiniteCarousel"&gt;
    &lt;div class="wrap"&gt;
          &lt;ul id="mycarousel" class="jcarousel-skin-tango"&gt;
            &lt;?php 
        do { ?&gt;
            &lt;li&gt;
              &lt;div class="thumbWrapper"&gt;&lt;a class="pictureThumb" href="picture.php?imgID=&lt;?php $pieces = explode('_', $row_rsPictures['PictureFile']); echo $pieces[0]."_".$pieces[1]."_".$pieces[2]; if ($pieces[3] == "NN"){ echo "_NN_".$pieces[4]."_".$pieces[5]; } else { echo "_".$pieces[3]."_".$pieces[4]; } ?&gt;&amp;thumb=Y"&gt;
                &lt;img src="../images/gallery/&lt;?php $raceYear = explode('_', $row_rsPictures['EventOverlay']); echo $raceYear[0]; ?&gt;/&lt;?php echo $row_rsPictures['EventOverlay']; ?&gt;/thumb/&lt;?php echo $row_rsPictures['PictureFile']; ?&gt;.jpg" alt="FileName: &lt;?php echo $row_rsPictures['PictureFile'];?&gt;"&gt;&lt;/a&gt;&lt;br /&gt;
  &lt;p&gt;
  &lt;?php 
  if($row_rsPictures['TotalComments'] &gt; 0){
      if($row_rsPictures['TotalComments'] &lt; 9){
      $commentCount = $row_rsPictures['TotalComments'];
          } else {
          $commentCount = "More";
          }
  echo '&lt;img src="../images/view_comment'.$commentCount.'.png" id="Comment_'.$row_rsPictures['PictureID'].'"  width="33" height="25" title="View Comments" alt="View Photo Comments" class="showComment hidden" style="cursor: pointer"/&gt;';
  } ?&gt;
  &lt;a class="pictureComment" href="postComment.php?imgID=&lt;?php echo $row_rsPictures['PictureID']; ?&gt;&amp;rf=gallery"&gt;&lt;img src="../images/photo_comment.png" width="33" height="25" title="Comment On This Photo" alt="Comment On This Photo" /&gt;&lt;/a&gt;&lt;a class="facebookShare" rel="nofollow" href="#" class="fb_share_button" onclick="return fbs_click('http://&lt;?php echo $_SERVER['SERVER_NAME']; ?&gt;/gallery/picture.php?imgID=&lt;?php $pieces = explode('_', $row_rsPictures['PictureFile']); echo $pieces[0]."_".$pieces[1]."_".$pieces[2]; if ($pieces[3] == "NN"){ echo "_NN_".$pieces[4]."_".$pieces[5]; } else { echo "_".$pieces[3]."_".$pieces[4]; } ?&gt;', 'Dragboats.com Photo Gallery' )" target="_blank" style="text-decoration:none;"&gt;&lt;img src="../images/facebook.png" width="24" height="25" title="Share on Facebook" alt="Share on Facebook" /&gt;&lt;/a&gt;&lt;a class="addToCart" href="adToCart.php?imgID=&lt;?php echo $row_rsPictures['PictureFile'].'&amp;dbID='.$row_rsPictures['PictureID']; ?&gt;"&gt;&lt;img src="../images/addToList.png" width="35" height="25" title="Add To Shopping List" alt="Add To Shopping List" /&gt;&lt;/a&gt;&lt;/p&gt;
              &lt;/div&gt;
              &lt;/li&gt;
            &lt;?php  
            } while ($row_rsPictures = mysql_fetch_assoc($rsPictures));
            mysql_data_seek($rsPictures, 0);
            ?&gt;
          &lt;/ul&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id="Comments" style="display: none"&gt;&lt;/div&gt;
    &lt;div style="text-align: center; padding-right: 15px; font-size: 10px"&gt;Gallery Image Sets: &lt;?php
  $TFM_Previous = $pageNum_rsPictures - 10;
  if ($TFM_Previous &gt;= 0) {
     printf('...&lt;a href="'."%s?pageNum_rsPictures=%d%s", $currentPage, $TFM_Previous, $queryString_rsPictures.'"&gt;');
     echo "[Previous "."10"." sets] &lt;/a&gt;...";
     //Basic-UltraDev Previous X pages SB
  }
  ?&gt;
    &lt;?php
  for ($i = $TFM_startLink; $i &lt;= $TFM_endLink; $i++) {
    $TFM_LimitPageEndCount = $i -1;
    if($TFM_LimitPageEndCount != $pageNum_rsPictures) {
      printf('&lt;a href="'."%s?pageNum_rsPictures=%d%s", $currentPage, $TFM_LimitPageEndCount, $queryString_rsPictures.' " class="pageLinkInActive"&gt;');
      echo "$i&lt;/a&gt;";
    }else{
      echo "&lt;span class='pageLinkActive'&gt;$i&lt;/span&gt;";
    }
  if($i != $TFM_endLink) echo(" ");}
  ?&gt;
    &lt;?php
  $TFM_Next = $pageNum_rsPictures + 10;
  $TFM_Last = $totalPages_rsPictures+1;
  if ($TFM_Next - 1 &lt; $totalPages_rsPictures) { 
    printf('...&lt;a href="'."%s?pageNum_rsPictures=%d%s", $currentPage, $TFM_Next, $queryString_rsPictures.'"&gt;');
      echo "[Next "."10"." of ".$TFM_Last." sets] &lt;/a&gt;...";
  }
  ?&gt;
  &lt;/div&gt;
      &lt;div class="columnFooters"&gt; &lt;/div&gt;
      &lt;div class="columnHeadings"&gt;
        &lt;h2&gt;available print sizes&lt;/h2&gt;
        &lt;/div&gt;
      &lt;div id="sizes"&gt;&lt;ul&gt;
        &lt;li&gt;&lt;div style="height: 120px; width: 180px;"&gt;&lt;p&gt;20x30&lt;br /&gt;$65/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li&gt;&lt;div style="height: 96px; width: 120px;"&gt;&lt;p&gt;16x20&lt;br /&gt;$45/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li&gt;&lt;div style="height: 78px; width: 114px;"&gt;&lt;p&gt;13x19&lt;br /&gt;$40/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li&gt;&lt;div style="height: 72px; width: 108px;"&gt;&lt;p&gt;12x18&lt;br /&gt;$30/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li&gt;&lt;div style="height: 66px; width: 84px;"&gt;&lt;p&gt;11x14&lt;br /&gt;$25/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li&gt;&lt;div style="height: 48px; width: 60px;"&gt;&lt;p&gt;8x10&lt;br /&gt;$15/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li&gt;&lt;div style="height: 30px; width: 42px;"&gt;&lt;p style="font-size: 10px; line-height: 9px;"&gt;5x7&lt;br /&gt;$10/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li&gt;&lt;div style="height: 24px; width: 36px;"&gt;&lt;p style="font-size: 10px; line-height: 9px;"&gt;4x6&lt;br /&gt;$5/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;/ul&gt;&lt;/div&gt;
      &lt;div class="columnFooters"&gt;&lt;/div&gt;
      &lt;div class="columnHeadings"&gt;
        &lt;h2&gt;SPECIALTY ITEMS&lt;/h2&gt;
        &lt;/div&gt;
      &lt;div class="fullWidthDiv"&gt;Click on the icon to see a sample and additional information or volume discounts&lt;/div&gt;
  &lt;div id="specItems"&gt;&lt;ul&gt;
        &lt;li&gt;&lt;div&gt;&lt;p&gt;Digital File&lt;br&gt;&lt;img src="../images/gallery/digital_file.jpg" alt="Digital File" width="100" height="100" /&gt;&lt;br&gt;
          $125/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li&gt;&lt;div&gt;&lt;p&gt;Keychains&lt;br /&gt;
              &lt;a class="keychain_sample" href="keychainSample.php?imgID=&lt;?php $pieces = explode('_', $sampleFile); echo $pieces[0]."_".$pieces[1]."_".$pieces[2]; if ($pieces[3] == "NN"){ echo "_NN_".$pieces[4]."_".$pieces[5]; } else { echo "_".$pieces[3]."_".$pieces[4]; } ?&gt;"&gt;&lt;img src="keychain.php?imgID=&lt;?php $pieces = explode('_', $sampleFile); echo $pieces[0]."_".$pieces[1]."_".$pieces[2]; if ($pieces[3] == "NN"){ echo "_NN_".$pieces[4]."_".$pieces[5];; } else { echo "_".$pieces[3]."_".$pieces[4]; } ?&gt;&amp;thumb=Y" border="0"&gt;&lt;/a&gt;&lt;br&gt;$5/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li&gt;
          &lt;div&gt;&lt;p&gt;Vertical&lt;br /&gt;Calendars&lt;br /&gt;
              &lt;a class="vertcal_sample" href="vertCalender_sample.php?imgID=&lt;?php $pieces = explode('_', $sampleFile); echo $pieces[0]."_".$pieces[1]."_".$pieces[2]; if ($pieces[3] == "NN"){ echo "_NN_".$pieces[4]."_".$pieces[5]; } else { echo "_".$pieces[3]."_".$pieces[4]; } ?&gt;"&gt;&lt;img src="vertCalender.php?imgID=&lt;?php $pieces = explode('_', $sampleFile); echo $pieces[0]."_".$pieces[1]."_".$pieces[2]; if ($pieces[3] == "NN"){ echo "_NN_".$pieces[4]."_".$pieces[5]; } else { echo "_".$pieces[3]."_".$pieces[4]; } ?&gt;&amp;thumb=Y" border="0"&gt;&lt;/a&gt;&lt;br&gt;$35/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
             &lt;li&gt;
          &lt;div&gt;&lt;p&gt;Wide&lt;br /&gt;Calendars&lt;br /&gt;&lt;a class="calendar_sample" href="calender.php?imgID=&lt;?php $pieces = explode('_', $sampleFile); echo $pieces[0]."_".$pieces[1]."_".$pieces[2]; if ($pieces[3] == "NN"){ echo "_NN_".$pieces[4]."_".$pieces[5]; } else { echo "_".$pieces[3]."_".$pieces[4]; } ?&gt;"&gt;&lt;img src="calenderSample.php?imgID=&lt;?php $pieces = explode('_', $sampleFile); echo $pieces[0]."_".$pieces[1]."_".$pieces[2]; if ($pieces[3] == "NN"){ echo "_NN_".$pieces[4]."_".$pieces[5]; } else { echo "_".$pieces[3]."_".$pieces[4]; } ?&gt;&amp;thumb=Y" border="0"&gt;&lt;/a&gt;&lt;br&gt;$35/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li&gt;&lt;div&gt;&lt;p&gt;Mousepads&lt;br /&gt;&lt;img src="mousepad.php?imgID=&lt;?php $pieces = explode('_', $sampleFile); echo $pieces[0]."_".$pieces[1]."_".$pieces[2]; if ($pieces[3] == "NN"){ echo "_NN_".$pieces[4]."_".$pieces[5];; } else { echo "_".$pieces[3]."_".$pieces[4]; } ?&gt;&amp;thumb=Y" border="0"&gt;&lt;br&gt;$17.50/ea&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
      &lt;div class="columnFooters"&gt;&lt;/div&gt;
      &lt;/div&gt;    
    &lt;br class="clearFloat" /&gt;
  &lt;/div&gt;
  &lt;!-- InstanceEndEditable --&gt;
  &lt;div id="ContentFooter"&gt;&lt;/div&gt;
  &lt;div id="footer"&gt;&lt;a href="http://&lt;?php echo $_SERVER['SERVER_NAME']; ?&gt;/&lt;?php if(isset($_SESSION['svUserID'])) { echo "logout"; } else { echo "login"; } ?&gt;.php"&gt;&lt;?php if(isset($_SESSION['svUserID'])) { echo "LOGOUT"; } else { echo "LOGIN"; } ?&gt;&lt;/a&gt; || &lt;a href="http://&lt;?php echo $_SERVER['SERVER_NAME']; ?&gt;"&gt;HOME&lt;/a&gt; || &lt;a href="../classifieds/main.php"&gt;CLASSIFIEDS&lt;/a&gt; || &lt;a href="../cart/view_cart.php"&gt;CART&lt;/a&gt; || &lt;a href="main.php"&gt;PICTURES&lt;/a&gt; || &lt;a href="../merch/main.php"&gt;MERCHANDISE&lt;/a&gt; || &lt;a href="../video/main.php"&gt;VIDEOS&lt;/a&gt; || &lt;a href="../video"&gt;SCHEDULES&lt;/a&gt; || &lt;a href="../results.php"&gt;RESULTS&lt;/a&gt; || &lt;a href="../downloads.php"&gt;DOWNLOADS&lt;/a&gt; || &lt;a href="../rides/main.php"&gt;RIDES&lt;/a&gt; || &lt;a href="../rides"&gt;SERVICES&lt;/a&gt; || &lt;a href="../contact.php"&gt;CONTACT US&lt;/a&gt;&lt;br /&gt;
  SITE CREATED AND MAINTAINED BY &lt;a href="http://www.finishline-productions.com" target="_blank"&gt;FINISHLINE PRODUCTIONS&lt;/a&gt; - COPYRIGHT 1997 - &lt;?php echo date("Y"); ?&gt; - &lt;a href="../docs/privacy.php"&gt;PRIVACY POLICY&lt;/a&gt; - &lt;a href="../docs/usage.php"&gt;TERMS OF USE&lt;/a&gt; - &lt;a href="../docs/returns.php"&gt;RETURN POLICY&lt;/a&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;!-- InstanceEnd --&gt;&lt;/html&gt;
  &lt;/html&gt;
  &lt;?php
  mysql_free_result($rsPictures);
  ?&gt;
  </code></pre>
  
  <p>Thanks for you help!</p>