
var cat=new Array();
var cat_name=new Array();
var cat_desc=new Array();

cat[0]="cfoc";
cat_name[0]="Typical training at OCS and CFOCS";
cat_desc[0]="Pictures depicting life at the Officer Candidate School and as it later became known as, the  Canadian Officer Candidate School";

cat[1]="appr";
cat_name[1]="Sapper Apprentice program";
cat_desc[1]="The Sapper Apprentice program ran from 1953 - 1967. A total of 847 young men who had not yet reached their 17th birthday completed the two year program.";

cat[2]="rcse";
cat_name[2]="Royal Canadian School of Military Engineering (RCSME)";
cat_desc[2]="Royal Canadian School of Military Engineering (RCSME) was so-named on 01 October 1946. 1942 - 1946 it was known as A6 - Canadian Engineer Training Centre (CETC).";

cat[3]="cfse";
cat_name[3]="Various Courses and Misc Photos";
cat_desc[3]="108 courses were run annually";

cat[4]="tran";
cat_name[4]="Training Areas";
cat_desc[4]="The Training Areas provided the trainee  with the capability of proving what he/she had learned in the classroom. These pages are dedicated to those that, sadly, paid the supreme sacrifice during that training.";

cat[5]="supp";
cat_name[5]="Base Photographer Photos";
cat_desc[5]="Gordon Croucher was a photographer in 1957 and sent these pictures from his collection.";

cat[6]="civi";
cat_name[6]="216 Workshop";
cat_desc[6]="Jack Mitchell's Retirement";

cat[7]="depn";
cat_name[7]="Dependants";
cat_desc[7]="Dependants have many wonderful memories of Chilliwack. The PMQ's were among the safest living areas in all of Canada. One big community.  Truly one big family.";

cat[8]="misc";
cat_name[8]="Miscellaneous";
cat_desc[8]="Many photos don't fit into the regular categories, and have been slotted into this miscellaneous category.";


	function cat_list(n) {
		document.write('<table bgcolor="#000000" border=0 cellspacing=0 cellpadding=0 width=100%><tr><td>')
		document.write('<table  border =0 cellspacing=3 cellpadding=3 bgcolor="#000000" width=100%>')
		document.write('<tr><td bgcolor="#cccc66" align=right><p><b>Gallery Categories</b></p></td></tr>')
		for (count=0; count < cat.length; count++)  {
		document.write('<tr><td bgcolor="#cccc66" align=right><p class="menu"><b><a href="p_'+cat[count]+'.html">'+cat_name[count]+' <img src="i_pict.gif" border=0 align=top  alt="thumbnails"></a>&nbsp;<a href="d_'+cat[count]+'.html"><img src="i_desc.gif" border=0 align=top  alt="descriptions"></a></b></p></td></tr>')
		}
	document.write('</td></tr></table>')
	document.write('</table>')


	}

	function cat_long(n) {
		for (count=0; count < cat.length; count++)  {
		document.write('<p><b>'+cat_name[count]+'</b><br> '+cat_desc[count]+'<br>')
		document.write('<b>browse by:')
		document.write(' <a href="p_'+cat[count]+'.html"><img src="i_pict.gif" border=0  alt=""> Thumbnail</a> ')
		document.write('<a href="d_'+cat[count]+'.html"><img src="i_desc.gif" border=0  alt=""> Description</a></b></p></b>')
		}
	}

	function bak_pic_show(c,p) {
		var picture=open('blank.html', 'picture');
		picture.document.open();
		picture.document.write('<img src="'+cat[c]+'/'+cat[c]+p+'.jpg"  alt="picture">');
		picture.document.close();
	}

	function pic_show(c,p) {
		var pct=open('', 'picture', 'width=550, height=480, resizable=yes, scrollbars=yes');
		pct.document.write('<html><head><title>'+pic[p]+' - CFBCHS</title>')
		pct.document.write('<link rel="stylesheet" href="main.css" type="text/css">')
		pct.document.write('</head>')
		pct.document.write('<body bgcolor="#660033" text="#000000" link="#660033" vlink="#800080" alink="#ff0000" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINWIDTH="0" MARGINHEIGHT="0">')
		pct.document.write('<table bgcolor="#000000" border=0 cellspacing=0 cellpadding=0 width=100%><tr><td>')
		pct.document.write('<table bgcolor="#000000" border=0 cellspacing=3 cellpadding=3  width=100%>')
		pct.document.write('<tr><td bgcolor="#660033" width=1><img src="smallcrest.gif"  alt="CFBCHS Crest"></td>')
		pct.document.write('<td bgcolor="#660033"><p><span class="yellow"> CFB&nbsp;Chilliwack&nbsp;Historical&nbsp;Society &gt; Gallery &gt; '+cat_name[c]+' &gt; <br><b>'+pic[p]+'</b></span></p></td>')
		pct.document.write('</tr></table></table>')
		pct.document.write('<table bgcolor="#000000" border=0 >')
		pct.document.write('<tr><td><img src="'+cat[c]+'/'+cat[c]+p+'.jpg" align=left></td>')
		pct.document.write('<td bgcolor="#CCCC66" valign=top><div class="body">')
		pct.document.write('<p>'+long_desc[p]+'</p>')
		pct.document.write('<form><input type="button" value="Close" onClick="self.close()"')
		pct.document.write('</div></td></tr>')

		pct.document.write('</table>')
		pct.document.write('</body></html>')
	}


	function thumb(n) {
		document.write('<div class="body">')
		document.write('<table bgcolor="#cccc66">')
		for (a=0; a < 2; a++)  {
		document.write('<tr>')

		for (b=0; b < 5; b++)  {
		var count=(a*5)+b
		document.write('<td valign=top>')
		document.write('<p><b>'+pic[count]+'</b></p></td>')
		}

		document.write('</tr><tr>')
		for (b=0; b < 5; b++)  {
		var count=(a*5)+b
		document.write('<td valign=top><a href="#" onclick="pic_show('+n+','+count+');"><img src="'+cat[n]+'/'+cat[n]+count+'t.jpg"  alt=" '+pic[count]+' "></a>')
		document.write('<p>'+short_desc[count]+'</p><br>')  
		document.write('</td>')
		}
		document.write('</tr>')
		}	
		document.write('</table>')
		document.write('</div>')

	}

	function describe(n) {
		document.write('<div class="body">')
		for (count=0; count < 10; count++)  {
		document.write('<a href="#" onclick="pic_show('+n+','+count+');"><h2>'+pic[count]+'</h2></a>')
		document.write('<p>'+long_desc[count]+'</p>')  
		}
		document.write('</div>')

	}

	function cat_head(g) {
		document.write('<h1>'+cat_name[ctg]+'</h1>')
		document.write('<p>'+cat_desc[ctg]+'</p>')
		if (g==1) 
			document.write('<p>Select a thumbnail to view a larger picture.  <i>Pictures will open in a new window</i></p>');
		if (g==2)
			document.write('<p>Select a title to view the picture.  <i>Pictures will open in a new window</i></p>');
	}
