function ShowPageControls()
{
	document.write ("<table border=0 cellspacing=0 cellpadding=0 align=right>");
	document.write ("<tr><td>&nbsp;</td>");
	document.write ("<td style='padding: 4px 5px 5px 5px'><span class=itemname2><b><font size=2>Page:</font></b></span></td>");
	
    if ( CurrentPage != 1 )
    {
		document.write ("<td><a href=" + pageid + ".html?page=" + String(CurrentPage-1) + "><img src=http://site.premiumpearl.com/graphics/arrow-paginate-prev.gif width=23 height=15 alt=\"Previous Page\" border=0></a></td>");
    }
    for (var i = 0; i < pages.length; i++ )
    {
      if ( i != CurrentPage - 1 )
      {
        document.write ("<td style='padding: 4px 5px 5px 5px'><a href=" + pageid + ".html?page=" + String(i + 1) + " class=link2><font size=2>" + (i+1) + "</font></a><td>")
      }
      else
      {
        document.write ("<td style='padding: 4px 5px 5px 5px'><span class=itemname2><font size=2><b>" + String(i+1) + "</b></font></span></td>")
      }
    }
	
	if ( CurrentPage != pages.length )
    {
        document.write ("<td><a href=" + pageid + ".html?page=" + String(CurrentPage+1) + "><img src=http://site.premiumpearl.com/graphics/arrow-paginate-next.gif width=23 height=15 alt=\"Next Page\" border=0></a></td>")
    }
	
	document.write ("<td><a href=" + pageid + ".html?page=0><img src=http://site.premiumpearl.com/graphics/btn-viewall.gif width=70 height=15 alt=\"View All\" border=0 hspace=5></a></td>");	
    document.write ("</td></tr></table>");
}

function ShowPage()
{
  if ( pages.length > 1 && CurrentPage > 0 ) 
  {
    ShowPageControls();
    document.write("<br><br><br>");
  }
  if ( CurrentPage > 0 )
  {
    document.write( String(pages[CurrentPage - 1]).replace(/`/gi, "'") );
  }
  else
  {
    for (var i = 1; i <= pages.length; i++ )
    {
        document.write( String(pages[i - 1]).replace(/`/gi, "'") );
    }
  }
  if ( pages.length > 1 && CurrentPage > 0 ) 
  {
    document.write("<br>");
    ShowPageControls();
  }
}
