// <script language=javascript src=cook_funcs.js></script>
var PicFmt=read_cookie("PicFormat");
if (PicFmt == "gallery") {
	document.write('<script language=javascript>');
	document.write('document.write(\'<table border=3>\');');
	document.write('for (i=0;i<PicVar;i++){');
	document.write('    document.write(\'<tr><td align=center valign=center><img src="\' + ');
	document.write('                    ListOfPix[i].PicVal + \'" height=360 border=0></td>\');');
	document.write('    document.write(\'<td align=justify valign=top><p>\' + ListOfPix[i].TxtVal + ');
	document.write('                   \' (\' + ListOfPix[i].DatVal + \')</td></tr>\');');
	document.write('}');
	document.write('document.write(\'</table>\');');
	document.write('</script>');
}else{
	document.write('<center>');
	document.write('<form name="PhotoAlbum">');
	document.write('<table border=0>');
	document.write('	<tr>');
	document.write('		<td>');
	document.write('			<!-- build the photo album -->');
	document.write('			<table style="padding:0px; margin:0px" border=0 cellspacing=0><tr align=center>');
	document.write('				<!-- build the left-hand page of the photo album -->');
	document.write('				<td bgcolor=f9f9f9 style="background-image: url(\'images/parchment.jpg\'); background-repeat: repeat; background-attachment: scroll; width: 400px; height: 400px; border-left: 4px groove #888888; border-top: 2px groove #888888; border-bottom: 4px groove #888888; margin: 0px; padding: 10px; background-position: 0% 50%">');
	document.write('					<div id="PhotoPage">');
	document.write('						<script language=javascript>');
	document.write('							document.write(\'<img src="\' + ListOfPix[current].PicVal + \'" border=0 height=\' + ListOfPix[current].hVal + ');
	document.write('							               \' width=\' + ListOfPix[current].wVal + \'>\');');
	document.write('						</script>');
	document.write('					</div>');
	document.write('				</td>');
	document.write('');
	document.write('				<!-- put in the "spiral" -->');
	document.write('				<td style="background-image: url(\'images/parchmentring.jpg\'); background-repeat: repeat; background-attachment: scroll; width: 36px; height: 400px; border-top: 2px groove #888888; border-bottom: 4px groove #888888; background-position: 0% 50%" border=0> ');
	document.write('				</td>');
	document.write('				');
	document.write('				<!-- build the right-hand page of the photo album -->');
	document.write('				<td style="background-image: url(\'images/parchment.jpg\'); background-repeat: repeat; background-attachment: scroll; width: 400px; height: 400px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 8pt; font-family: verdana; color: #000044; border-right: 4px groove #888888; border-top: 2px groove #888888; border-bottom: 4px groove #888888; margin-left: 0px padding-right 20px; padding: 5px; background-position: 0% 50%" valign=top>');
	document.write('				                                          ');
	document.write('					<div id="Journal">');
	document.write('						<script language=javascript>');
	document.write('							document.write(\'<br>\' + ListOfPix[current].DatVal + \'<p style="text-align:justify; text-indent:25px">\' + ListOfPix[current].TxtVal);');
	document.write('						</script>');
	document.write('					</div>');
	document.write('				</td>');
	document.write('			</table>');
	document.write('');
	document.write('			<!-- build the controls -->');
	document.write('			<p>');
	document.write('			<table border=0 align="center">');
	document.write('				<tr align=center>');
	document.write('					<td>');
	document.write('						<!-- First the navigation buttons -->');
	document.write('						<input type=button value="<" onClick="PreviousPic();" style="font:8pt verdana,helvetica,arial; text-align:center"> ');
	document.write('						<input type=button value="random" onClick="RandomPic();" style="font:8pt verdana,helvetica,arial"> ');
	document.write('						<input type=button value=">" onClick="NextPic();" style="font:8pt verdana,helvetica,arial; text-align:center">');
	document.write('						<p>');
	document.write('');
	document.write('						<!-- now the list of photos -->');
	document.write('						<SELECT size=12 style=\'font:8pt verdana\' name=\'PicList\' onChange=\'ShowPic(PhotoAlbum.PicList.options.selectedIndex);\'>');
	document.write('							<script language=javascript>');
	document.write('								TotalImages = PicVar;');
	document.write('								for (loop=0; loop < TotalImages; loop++)');
	document.write('								{');
	document.write('									if( loop == current){');
	document.write('										document.write("<option value=" + ListOfPix[loop].PicVal + " SELECTED>" + ListOfPix[loop].TitVal + "</option>");');
	document.write('									    }else{');
	document.write('										document.write("<option value=" + ListOfPix[loop].PicVal + ">" + ListOfPix[loop].TitVal + "</option>");');
	document.write('									}');
	document.write('');
	document.write('								}');
	document.write('							</script>');
	document.write('						</SELECT>');
	document.write('					</td>');
	document.write('				</tr>');
	document.write('			</table>');
	document.write('		</td>');
	document.write('	</tr>');
	document.write('</table>');
	document.write('</form>');
	document.write('</center>');
	document.write('');
}
document.write('<p>');
document.write('<center>');
document.write('<SCRIPT Language=Javascript>');
document.write('document.write("<font face=\'Arial\' size=\'2\'><span style=\'font-variant: small-caps\'>This album currently contains  " + PicVar + "  photos and was last modified on  "+lmonth + " " + date + ", " + fyear +". ");');

if (PicFmt == "gallery"){
	document.write("document.write(\"<br>Click <A HREF=\" + location.href + \" onclick=write_cookie('PicFormat','album','','')>here</A> return to the photo-album view.</span></font>\");");
}else{
	document.write("document.write(\"<br>If one or more pictures aren't appearing above, you can click <A HREF=\" + location.href + \" onclick=write_cookie('PicFormat','gallery','','')>here</A> for a simpler gallery view.</span></font>\");");
}
document.write('</script>');
document.write('</center>');
document.write('<p align="left">&nbsp;');
document.write('<p align="center">');
document.write('<a href="javascript:window.close()"><img border="0" src="images/close-button.gif" width="140" height="50"></a></p>');
