	
var newwin;
function imgpopup(url)
{
	newwin=window.open(url,'name','height=457,width=450');
	if (window.focus) {
		newwin.focus()
	}
}
var newerwin;
function imgpopup600(url)
{
	newerwin=window.open(url,'name','height=500,width=600');
	if (window.focus) {
		newerwin.focus()
	}
}

// SEEN IN SLIDESHOW THUMBNAILS
function shownow(whichpic){
	var source=whichpic.getAttribute('href');
	var titletext=whichpic.getAttribute('title');
	var describit=document.getElementById('desc');
	var placer=document.getElementById('slideshow');
	var title=document.getElementById('desc_title');
	//alert('You got ShowHref '+source);
	placer.setAttribute('src',source);
}
function showpic(whichpic){
	var source=whichpic.getAttribute('src');
	var titletext=whichpic.getAttribute('title');
	var sourceit=source.replace("_th","");
	var describit=document.getElementById('desc');
	var placer=document.getElementById('slideshow');
	var title=document.getElementById('desc_title');
	var set_i=titletext.charAt(5);
	i=set_i;
	alert(set_i);
	alert('You got ShowPicSource '+sourceit);
	alert('You got ShowPicTitle '+titletext);
	placer.setAttribute('src',sourceit);
}
function slideshow_thumb (){
	if(!document.getElementsByTagName) return false;
	if(!document.getElementById) return false;
	if(!document.getElementById("slide_thumbs_box")) return false;
	
	var thumbbox=document.getElementById("slide_thumbs_box");
	var thumblinks=thumbbox.getElementsByTagName("a");
	var thumbnail=thumbbox.getElementsByTagName("img");
	var describeit=document.getElementById('desc');
	var title=document.getElementById('desc_title');
	
	for(var i=0; i<thumblinks.length; i++){
	thumblinks[i].onclick=function(){
		shownow(this);
		return false;
		}
	}		
}

window.onload = function(){
	if(!document.getElementById("slide_thumbs_box")) return false;
	slideshow_thumb ();
}		