/*
=========================================================================================================
2008-03-11 Tiny Slideshow - first used on Kenairesort.com - sam.fullman@verizon.net
Instructions: 
------------------------
1. create a div tag with an id="myexmple" or similar, and put images inside of it.  EACH IMAGE MUST HAVE AN ALT ATTRIBUTE, and no other image in the div can have the alt attribute.  
2. Place the image you want to show first a the top of the code, and set class="tssdb"; set the class of the other images to "tssdn".
3. Call this function AFTER the div tag: <script language="javascript">tinyslideshow('myexample');</script>
THAT'S ALL THERE IS TO IT

*/
//styles for tinyslideshow
document.write('<style id="tinyslideshowCSS" type="text/css">');
document.write('.tssdb{ display:block; }');
document.write('.tssdn{ display:none; }');
document.write('.tssInstr{ font-weight:900; }');
document.write('.tssText{ padding:0px 15px 0px 0px; }');
document.write('</style>');
var tinyslideshowLocation='top';
var tinyslideshowStartHTML='<span class="tssInstr">Click on each link to see the picture</span><br />';
function tinyslideshow(node,idx){
	var a=g(node).childNodes;
	if(typeof idx=='undefined'){
		//build the link list
		var str='';
		var j=0;
		for(i in a){
			if(!(alt=a[i].alt))continue;
			j++;
			str+='<a class="tssText" title="Click here to view this picture" href="#" onclick="return tinyslideshow(\''+node+'\',\''+j+'\')">'+alt+'</a> ';
		}
		if(tinyslideshowLocation=='top'){
			g(node).innerHTML=tinyslideshowStartHTML + str + g(node).innerHTML;
		}else{ /*bottom of div*/
			g(node).innerHTML+=tinyslideshowStartHTML + str;
		}
		return;
	}
	//show the appropriate image
	var j=0;
	for(i in a){
		if(!(alt=a[i].alt))continue;
		j++
		a[i].className=(j==idx?'tssdb':'tssdn');
	}
	return false;
}
/*
===================================== end tinyslideshow() =============================================
*/

