// ************************************************************************
// 
//   COPYRIGHT (C) 2002-2006 by David Nason
// 
//   ALL RIGHTS RESERVED
// 
//   MODULE:       showimg.js
// 
//   DESCRIPTION:  
// 
//   HISTORY:
//    10 Apr 2002  David Nason
//                 Created.
// 
// ************************************************************************

var vidW = 225;
var vidH = 185;

var theImages = new Array();
theImages[0] = 'lZWzzLl-SmY';
theImages[1] = 'F4IeWIRACW0';
theImages[2] = 'cOy9Mr4-1bo';
theImages[3] = '3dbIAnVJaWc';
theImages[4] = 'nO255mfDOQU';
theImages[5] = '3hTwskQlLdw';
theImages[6] = 'N05JmHs7i1o';
theImages[7] = 'd7ajxuUmWGo';
theImages[8] = 'xy_9nFYCoUI';
theImages[9] = 'JIHmNIOAAl8';
theImages[10] = 'UXOIHrbCBpU';
theImages[11] = 'qsAToIYRl_s';
theImages[12] = '6VZ3sT1BMCM';
theImages[13] = 'sNQNb_Px0NM';
theImages[14] = '9MeIHb5Unmg';
theImages[15] = '5gt4-efBlko';
	 

var lowImages = new Array();
lowImages[0] = '';
lowImages[1] = '';
lowImages[2] = '';
lowImages[3] = '';
lowImages[4] = '';
lowImages[5] = '';
lowImages[6] = '';
lowImages[7] = '';
lowImages[8] = '';
lowImages[9] = '';
lowImages[10] = '';
lowImages[11] = '';
lowImages[12] = '';
lowImages[13] = '';
lowImages[14] = '';
lowImages[15] = '';

var altText = new Array();
altText[0] = 'Camp Orkila slideshow<br>March 2006';
altText[1] = 'Camp Orkila<br>100th Anniversary Weekend<br>June 2006';
altText[2] = 'Orcas seen from the Clipper enroute to Orkila';
altText[3] = 'Camp Orkila 100th Anniversary';
altText[4] = 'Camp Colman';
altText[5] = 'Riding the Giant Swing';
altText[6] = 'Riding the Giant Swing';
altText[7] = 'Pottery';
altText[8] = 'Wishboat ceremony &quot;attacked.&quot;';
altText[9] = 'Potlatch 2003';
altText[10] = 'Winter Camp 2006<br>Camp Lake Wenatchee';
altText[11] = 'Snow Play at Paradise';
altText[12] = 'Pinewood Derby';
altText[13] = 'Pinewood Derby';
altText[14] = 'Pinewood Derby';
altText[15] = 'Pinewood Derby';


function setSrc(newImg)
{
	if (newImg) {
		document.all.grpImg.src = newImg;
	}
}

function showImg(strInputName, start, count, dotext, dobtn, doloop, doplay)
{
	var p = count;
	var whichImage = Math.floor(Math.random()*p) + start;

	if (getClientAreaWidth() <= 800) {
		maxwid = 'width="580"';
	} else {
		maxwid = '';
	}

	if (strInputName) {
		if (strInputName.indexOf('.jpg') != -1) {
			document.write('<img id="grpImg" src="'+strInputName+'" border="0" '+maxwid+' align="center" alt="Tyee Nation images - refresh the page for more...">');
		} else {
			document.write('<object width="'+vidW+'" height="'+vidH+'"><param name="movie" value="http://www.youtube.com/v/'+strInputName+'"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'+strInputName+'" type="application/x-shockwave-flash" wmode="transparent" width="'+vidW+'" height="'+vidH+'"></embed></object>');
		}

	} else {
		if (theImages[whichImage].indexOf('.jpg') != -1) {
			document.write('<img id="grpImg" src="'+theImages[whichImage]+'" lowsrc="'+lowImages[whichImage]+' border="0" '+maxwid+' align="center" alt="Tyee Nation images - '+altText[whichImage] +' - refresh the page for more...">');
		} else {
//			document.write('<object width="'+vidW+'" height="'+vidH+'"><param name="movie" value="http://www.youtube.com/cp/vjVQa1PpcFNrabBtAvuE6rAy5KyUtecFbKAoSZDr6m4="></param><param name="wmode" value="transparent"></params><embed src="http://www.youtube.com/cp/vjVQa1PpcFNrabBtAvuE6rAy5KyUtecFbKAoSZDr6m4=&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="'+vidW+'" height="'+vidH+'"></embed></object>');
//			document.write('<object width="'+vidW+'" height="'+vidH+'"><param name="movie" value="http://www.youtube.com/p/F05341C842E65E91"></param><param name="wmode" value="transparent"></param><embed enableJavascript="false" allowScriptAccess="never" allownetworking="internal" src="http://www.youtube.com/p/F05341C842E65E91&autoplay=1&loop=1" type="application/x-shockwave-flash" wmode="transparent" width="'+vidW+'" height="'+vidH+'"></embed></object>');
//			document.write('<object width="'+vidW+'" height="'+vidH+'"><param name="movie" value="http://www.youtube.com/cp/vjVQa1PpcFNrabBtAvuE6m57OLT5zGsXDVECz_tQaGA="></param><param name="wmode" value="transparent"></params><embed src="http://www.youtube.com/cp/vjVQa1PpcFNrabBtAvuE6m57OLT5zGsXDVECz_tQaGA=&autoplay=1&loop=1" type="application/x-shockwave-flash" wmode="transparent" width="'+vidW+'" height="'+vidH+'"></embed></object>');
				
			document.write('<object width="'+vidW+'" height="'+vidH+'"><param name="movie" value="http://www.youtube.com/v/'+theImages[whichImage]+'&hl=en&fs=1&rel=0&autoplay='+doplay+'&loop='+doloop+'"></param><param name="wmode" value="transparent"></param><param name="allowFullScreen" value="true"></param><embed enableJavascript="false" allowScriptAccess="never" allownetworking="internal" src="http://www.youtube.com/v/'+theImages[whichImage]+'&hl=en&fs=1&rel=0&autoplay='+doplay+'&loop='+doloop+'" type="application/x-shockwave-flash" wmode="transparent" width="'+vidW+'" height="'+vidH+'"></embed></object>');

			if (dotext && altText[whichImage]) {
				document.write('<h4 style=margin:0px;>'+altText[whichImage]+'</h4>');
			}
			if (dobtn) {
				if (!dotext)
					document.write('<br>');
				document.write('<input type="button" value="Show another..." onClick="history.go(0)">');
			}
		}
	}
}

function showSlideShow(album, title, dobtn, ssW, ssH)
{
	if (title) {
		document.write('<h3 style=margin:0px;>'+title+'</h3>');
	}
	if (ssW == 0) { ssW = vidW };
	if (ssH == 0) { ssH = vidH };
	document.write('<embed type="application/x-shockwave-flash" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" width="'+ssW+'" height="'+ssH+'" flashvars="host=picasaweb.google.com&captions=1&RGB=0x000000&feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Ftyeenation%2Falbumid%2F'+album+'%3Fkind%3Dphoto%26alt%3Drss" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
	if (dobtn) {		
		document.write('<br><br><input type="button" value="Show again..." onClick="history.go(0)">');
	}
}
